SvgTransform Class
https://svgwg.org/svg2-draft/coords.html#InterfaceSVGTransform
public sealed class SvgTransformProperties
| Name | Description |
|---|---|
| Angle | Gets the angle, in degrees, of a rotation or skew transform, and 0 for the other types. |
| Matrix | The matrix of the transform (https://svgwg.org/svg2-draft/coords.html#__svg__SVGTransform__matrix); modifying it changes the type to SVG_TRANSFORM_MATRIX. |
| Type | Gets the type of the transform, one of the SVG_TRANSFORM_* constants. |
Angle
SvgTransform.csGets the angle, in degrees, of a rotation or skew transform, and 0 for the other types.
public float Angle { get; }Property value
See also
Matrix
SvgTransform.csThe matrix of the transform (https://svgwg.org/svg2-draft/coords.html#__svg__SVGTransform__matrix); modifying it changes the type to SVG_TRANSFORM_MATRIX.
public DomMatrix Matrix { get; }Property value
See also
Type
SvgTransform.csGets the type of the transform, one of the SVG_TRANSFORM_* constants.
public ushort Type { get; }Property value
See also
Methods
| Name | Description |
|---|---|
| SetMatrix(DomMatrix2DInit?) | Sets the transform to the given matrix and its type to SVG_TRANSFORM_MATRIX. |
| SetRotate(float, float, float) | Sets the transform to a rotation by the given angle, in degrees, around the given center. |
| SetScale(float, float) | Sets the transform to a scale by the given factors. |
| SetSkewX(float) | Sets the transform to a skew along the x axis by the given angle, in degrees. |
| SetSkewY(float) | Sets the transform to a skew along the y axis by the given angle, in degrees. |
| SetTranslate(float, float) | Sets the transform to a translation by the given offsets. |
SetMatrix(DomMatrix2DInit?)
SvgTransform.csSets the transform to the given matrix and its type to SVG_TRANSFORM_MATRIX.
public void SetMatrix(DomMatrix2DInit? matrix = null)SetRotate(float, float, float)
SvgTransform.csSetScale(float, float)
SvgTransform.csSetSkewX(float)
SvgTransform.csSets the transform to a skew along the x axis by the given angle, in degrees.
SetSkewY(float)
SvgTransform.csSets the transform to a skew along the y axis by the given angle, in degrees.
SetTranslate(float, float)
SvgTransform.csConstants
| Name | Description |
|---|---|
| SvgTransformMatrix | The type of a transform defined by a matrix. |
| SvgTransformRotate | The type of a rotation. |
| SvgTransformScale | The type of a scale. |
| SvgTransformSkewX | The type of a skew along the x axis. |
| SvgTransformSkewY | The type of a skew along the y axis. |
| SvgTransformTranslate | The type of a translation. |
| SvgTransformUnknown | The type of a transform that is not one of the other types. |
SvgTransformMatrix
The type of a transform defined by a matrix.
public const ushort SvgTransformMatrix = 1SvgTransformRotate
The type of a rotation.
public const ushort SvgTransformRotate = 4SvgTransformScale
The type of a scale.
public const ushort SvgTransformScale = 3SvgTransformSkewX
The type of a skew along the x axis.
public const ushort SvgTransformSkewX = 5SvgTransformSkewY
The type of a skew along the y axis.
public const ushort SvgTransformSkewY = 6SvgTransformTranslate
The type of a translation.
public const ushort SvgTransformTranslate = 2SvgTransformUnknown
The type of a transform that is not one of the other types.
public const ushort SvgTransformUnknown = 0