Interface ISvgMask
interface ISvgMask
Extends ISvgNode
Represents an SVG mask element.
element defines an alpha mask for compositing the current object into the background.
A mask is used/referenced using the mask property.
See also - ISvgNode.
Methods
setX()
Sets the x attribute, which represents the X-coordinate of the mask’s position. This attribute defines the x-axis coordinate of the top-left corner of the masking area. Default value is -10.0 withvoidsetX(SvgLengthx)
SvgUnit::Percentage
Parameters
x
SvgLength — Required
SvgLength the value to set as the X position of the mask.
setY()
Sets the y attribute, which represents the Y-coordinate of the mask’s position. This attribute defines the y-axis coordinate of the top-left corner of the masking area. Default value is -10.0 withvoidsetY(SvgLengthy)
SvgUnit::Percentage
Parameters
y
SvgLength — Required
SvgLength the value to set as the Y position of the mask.
setWidth()
Sets the width attribute, which represents the width of the mask area. This attribute defines the width of the masking area. Default value is 120.0 withvoidsetWidth(SvgLengthwidth)
SvgUnit::Percentage
Parameters
width
SvgLength — Required
SvgLength the value to set as the width of the mask.
setHeight()
Sets the height attribute, which represents the height of the mask area. This attribute defines the height of the masking area. Default value is 120.0 withvoidsetHeight(SvgLengthheight)
SvgUnit::Percentage
Parameters
height
SvgLength — Required
SvgLength the value to set as the height of the mask.
setMaskUnits()
Sets the maskUnits attribute, which defines the coordinate system used for positioning and sizing the mask element. This attribute applies to the x, y, width, and height attributes of the mask, determining whether the mask’s dimensions are relative to the user coordinate system (userSpaceOnUse) or the bounding box of the target object (objectBoundingBox). Default value isvoidsetMaskUnits(SvgBoundingBoxUnitsmaskUnits)
SvgBoundingBoxUnits::OBJECT_BOUNDING_BOX
Parameters
maskUnits
SvgBoundingBoxUnits — Required
SvgBoundingBoxUnits The coordinate system to apply.
setMaskContentUnits()
Sets the maskContentUnits attribute, which defines the coordinate system used for the contents of the mask element. This attribute determines whether the mask’s content is positioned relative to the user coordinate system (userSpaceOnUse) or the bounding box of the target object (objectBoundingBox). Default value isvoidsetMaskContentUnits(SvgBoundingBoxUnitsmaskContentUnits)
SvgBoundingBoxUnits::OBJECT_BOUNDING_BOX
Parameters
maskContentUnits
SvgBoundingBoxUnits — Required
SvgBoundingBoxUnits The coordinate system to apply.

