Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

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()

void setX(SvgLength x)
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 with SvgUnit::Percentage

Parameters

x
SvgLength — Required SvgLength the value to set as the X position of the mask.

setY()

void setY(SvgLength y)
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 with SvgUnit::Percentage

Parameters

y
SvgLength — Required SvgLength the value to set as the Y position of the mask.

setWidth()

void setWidth(SvgLength width)
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 with SvgUnit::Percentage

Parameters

width
SvgLength — Required SvgLength the value to set as the width of the mask.

setHeight()

void setHeight(SvgLength height)
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 with SvgUnit::Percentage

Parameters

height
SvgLength — Required SvgLength the value to set as the height of the mask.

setMaskUnits()

void setMaskUnits(SvgBoundingBoxUnits maskUnits)
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 is SvgBoundingBoxUnits::OBJECT_BOUNDING_BOX

Parameters

maskUnits
SvgBoundingBoxUnits — Required SvgBoundingBoxUnits The coordinate system to apply.

setMaskContentUnits()

void setMaskContentUnits(SvgBoundingBoxUnits maskContentUnits)
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 is SvgBoundingBoxUnits::OBJECT_BOUNDING_BOX

Parameters

maskContentUnits
SvgBoundingBoxUnits — Required SvgBoundingBoxUnits The coordinate system to apply.
Last modified on October 29, 2026