Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. SVGAngle

SVGAngle

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since ⁨July 2015⁩.

TheSVGAngle interface is used to represent a value that can be an<angle> or<number> value.

TheSVGAngle returned fromSVGAnimatedAngle.animVal andSVGAnimatedAngle.baseVal is read only, but theSVGAngle returned fromSVGSVGElement.createSVGAngle() is writable. When designated as read only, attempts to modify the object will result in an exception being thrown.

AnSVGAngle object can be associated with a particular element. The associated element is used to determine which element's content attribute to update if the object reflects an attribute. Unless otherwise described, anSVGAngle object is not associated with any element.

EverySVGAngle object operates in one of two modes:

  1. Reflect the base value of a reflected animatable attribute (being exposed through thebaseVal member of anSVGAnimatedAngle),
  2. Be detached, which is the case forSVGAngle objects created withSVGSVGElement.createSVGAngle().

Instance properties

SVGAngle.unitType

The type of the value as specified by one of theSVG_ANGLETYPE_* constants defined on this interface.

SVGAngle.value

The value as a floating point value, in user units. Setting this attribute will causevalueInSpecifiedUnits andvalueAsString to be updated automatically to reflect this setting.

SVGAngle.valueInSpecifiedUnits

The value as a floating point value, in the units expressed byunitType. Setting this attribute will causevalue andvalueAsString to be updated automatically to reflect this setting.

SVGAngle.valueAsString

The value as a string value, in the units expressed byunitType. Setting this attribute will causevalue,valueInSpecifiedUnits, andunitType to be updated automatically to reflect this setting.

Instance methods

SVGAngle.convertToSpecifiedUnits()

Preserve the same underlying stored value, but reset the stored unit identifier to the givenunitType. Object attributesunitType,valueInSpecifiedUnits, andvalueAsString might be modified as a result of this method.

SVGAngle.newValueSpecifiedUnits()

Reset the value as a number with an associated unitType, thereby replacing the values for all of the attributes on the object.

Static properties

SVG_ANGLETYPE_UNKNOWN (0)

Some unknown type of value.

SVG_ANGLETYPE_UNSPECIFIED (1)

A unitless<number> interpreted as a value in degrees.

SVG_ANGLETYPE_DEG (2)

An<angle> with adeg unit.

SVG_ANGLETYPE_RAD (3)

An<angle> with arad unit.

SVG_ANGLETYPE_GRAD (4)

An<angle> with agrad unit.

Specifications

Specification
Scalable Vector Graphics (SVG) 2
# InterfaceSVGAngle

Browser compatibility

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp