Class SVGGraphicsElement
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
The SVGGraphicsElement interface represents SVG elements whose primary purpose is to directly render graphics into a group.
[Value("SVGGraphicsElement")]
public class SVGGraphicsElement : SVGElement, ElementCSSInlineStyle, GlobalEventHandlers, SVGElementInstance, HTMLOrSVGElement, SVGTests
- Inheritance
-
SVGGraphicsElement
- Implements
- Derived
- Inherited Members
Remarks
Constructors
SVGGraphicsElement()
public SVGGraphicsElement()
Properties
Transform
The transform read-only property of the SVGGraphicsElement interface reflects the computed value of the transform property and its corresponding {{SVGAttr("transform")}} attribute of the given element.
[Value("transform")]
public SVGAnimatedTransformList Transform { get; }
Property Value
- SVGAnimatedTransformList
An SVGAnimatedTransformList object.
Remarks
Methods
GetBBox(SVGBoundingBoxOptions)
The SVGGraphicsElement.getBBox() method allows us to determine
the coordinates of the smallest rectangle in which the object fits. The coordinates
returned are with respect to the current SVG space (after the application of all
geometry attributes on all the elements contained in the target element).
[Value("getBBox")]
public DOMRect GetBBox(SVGBoundingBoxOptions options = null)
Parameters
optionsSVGBoundingBoxOptions
Returns
- DOMRect
The returned value is an SVGRect object, which defines the bounding box.
This value is irrespective of any transformation attribute applied to it or the parent
elements.
Remarks
NOTE
getBBox()must return the actual bounding box at
the time the method was called—even in case the element has not yet been rendered. It
also does not account for any transformation applied to the element or its parents.
NOTE
getBBoxreturns different values than
GetBoundingClientRect(), as the
latter returns value relative to the viewport
GetCTM()
The getCTM() method of the SVGGraphicsElement interface represents the matrix that transforms the current element's coordinate system to its SVG viewport's coordinate system.
[Value("getCTM")]
public DOMMatrix? GetCTM()
Returns
Remarks
GetScreenCTM()
The getScreenCTM() method of the SVGGraphicsElement interface represents the matrix that transforms the current element's coordinate system to the coordinate system of the SVG viewport for the SVG document fragment.
[Value("getScreenCTM")]
public DOMMatrix? GetScreenCTM()