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 ISvgNode

interface ISvgNode
Extends com.amazon.apmf.IStandard Represents a generic SVG node in an SVG scene graph. The interface defines the common behavior and properties shared by all SVG elements, including attributes, styles, and hierarchical relationships (parent and child nodes).

Methods

setTransform()

void setTransform(com.amazon.kepler.uitoolkit.graphics.AffineMatrix matrix)
This method applies a transformation matrix to the current node. The transformation matrix modifies the coordinate space of the node, enabling operations such as translation, rotation, scaling, or skewing.

Parameters

matrix
com.amazon.kepler.uitoolkit.graphics.AffineMatrix — Required AffineMatrix the affine transformation matrix to be applied to the node.

appendChild()

void appendChild(ISvgNode* child)
Appends a child node to this node.

Parameters

child
ISvgNode* — Required ISvgNode The child node to append.

setClipRule()

void setClipRule(SvgFillRule clipRule)
Sets the clip rule for the node. The clipRule attribute only applies to graphics elements that are contained within a clipPath element. That attribute works as the fillRule attribute, except that it applies to clipPath definitions. Default value is SvgFillRule::NON_ZERO

Parameters

clipRule
SvgFillRule — Required SvgFillRule The new clipRule to apply.

setColor()

void setColor(com.amazon.kepler.uitoolkit.graphics.Color color)
Sets the color of the node.

Parameters

color
com.amazon.kepler.uitoolkit.graphics.Color — Required Color the new color to apply.

setFillRule()

void setFillRule(SvgFillRule fillRule)
Attribute is a presentation attribute The fillRule property indicates the algorithm which is to be used to determine what parts of the canvas are included inside the shape. For a simple, non-intersecting path, it is intuitively clear what region lies “inside”; However, for a more complex path, such as a path that intersects itself or where one subpath encloses another, the interpretation of “inside” is not so obvious. Default value is SvgFillRule::NON_ZERO

Parameters

fillRule
SvgFillRule — Required SvgFillRule The new fillFule to apply.

setFill()

void setFill(ISvgPaint* fill)
Sets the fill property of the node. For shapes and text it’s a presentation attribute that defines the color (or any SVG paint servers like gradients or patterns) used to paint the element

Parameters

fill
ISvgPaint* — Required ISvgPaint The new fill to apply.

setFillOpacity()

void setFillOpacity(float fillOpacity)
Sets the fillOpacity for the node. Specifies the opacity of the painting operation used to paint the fill the current object.

Parameters

fillOpacity
float — Required the float value of fill opacity to apply, ranging from 0.0 (fully transparent) to 1.0 (fully opaque). Any out of range values will be clamped between 0 and 1 including.

setStroke()

void setStroke(ISvgPaint* stroke)
Sets the stroke for the node. Attribute is a presentation attribute defining the color (or any SVG paint servers like gradients or patterns) used to paint the outline of the shape.

Parameters

stroke
ISvgPaint* — Required ISvgPaint the new stroke value to apply.

setStrokeDasharray()

void setStrokeDasharray(ISvgDasharray* strokeDasharray)
Sets the strokeDasharray for the node. Attribute is a presentation attribute defining the pattern of dashes and gaps used to paint the outline of the shape. Default value is SvgDasharrayType::NONE

Parameters

strokeDasharray
ISvgDasharray* — Required ISvgDasharray the new strokeDasharray to assign.

setStrokeDashoffset()

void setStrokeDashoffset(SvgLength strokeDashoffset)
Sets the strokeDashoffset for the node. Attribute is a presentation attribute defining an offset on the rendering of the associated dash array. Default value is 0.0 with SvgUnit::Number

Parameters

strokeDashoffset
SvgLength — Required SvgLength the new strokeDashoffset to assign.

setStrokeLinecap()

void setStrokeLinecap(com.amazon.kepler.uitoolkit.graphics.StrokeCap strokeLinecap)
Sets the strokeLinecap property for the element. Attribute is a presentation attribute defining the shape to be used at the end of open subpaths when they are stroked. Default value is StrokeCap::BUTT

Parameters

strokeLinecap
com.amazon.kepler.uitoolkit.graphics.StrokeCap — Required StrokeCap value to set.

setStrokeLinejoin()

void setStrokeLinejoin(com.amazon.kepler.uitoolkit.graphics.StrokeJoin strokeLinejoin)
Sets the strokeLinejoin property for the element. Attribute is a presentation attribute defining the shape to be used at the corners of paths when they are stroked. Default value is StrokeJoin::MITER

Parameters

strokeLinejoin
com.amazon.kepler.uitoolkit.graphics.StrokeJoin — Required StrokeJoin value to set.

setStrokeMiterlimit()

void setStrokeMiterlimit(float strokeMiterlimit)
Sets the strokeMiterlimit property for the element. Attribute defines the maximum ratio of the miter length to the stroke width when rendering a miter join. If this limit is exceeded, the miter join is automatically converted to a bevel join. Value should be greater than or equal to 1. Any out of range values will be clamped to 1 as the minimum value. Default value: 4.

Parameters

strokeMiterlimit
float — Required the float value to set for the strokeMiterlimit.

setStrokeOpacity()

void setStrokeOpacity(float strokeOpacity)
Sets the strokeOpacity property for the element. This property specifies the opacity of the painting operation used to stroke the current object. Where ranging from 0.0 (fully transparent) to 1.0 (fully opaque). Any out of range values will be clamped between 0 and 1 including.

Parameters

strokeOpacity
float — Required the float value to set for the strokeOpacity.

setStrokeWidth()

void setStrokeWidth(SvgLength strokeWidth)
Sets the strokeWidth property for the element. This property specifies the width of the stroke on the current object. A zero value causes no stroke to be painted. Any out of range values will be clamped.

Parameters

strokeWidth
SvgLength — Required SvgLength value to set for the strokeWidth. Default value is 0.0 with SvgUnit::Number

setClipPath()

void setClipPath(string clipPath)
Sets the clipPath property for the element (not inherited). The clipPath property can use specified basic shapes as clipping path or reference an clipPath element with graphics elements to be used as clipping path.

Parameters

clipPath
string — Required the string value to set as the clipPath.

setMask()

void setMask(string mask)
Sets the mask property for the element (not inherited). Attribute is a presentation attribute mainly used to bind a given mask element with the element the attribute belongs to.

Parameters

mask
string — Required the string value to set for the mask.

setOpacity()

void setOpacity(float opacity)
Sets the opacity property for the element (not inherited). Attribute specifies the transparency of an object or of a group of objects, that is, the degree to which the background behind the element is overlaid. Ranging from 0.0 (fully transparent) to 1.0 (fully opaque). Any out of range values will be clamped between 0 and 1 including.

Parameters

opacity
float — Required the float value to set for element opacity.

setId()

void setId(string id)
Sets the ID of the node. The ID is not required to be unique.

Parameters

id
string — Required the string ID to set for current node.
Last modified on October 29, 2026