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()
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.voidsetTransform(com.amazon.kepler.uitoolkit.graphics.AffineMatrixmatrix)
Parameters
matrix
com.amazon.kepler.uitoolkit.graphics.AffineMatrix — Required
AffineMatrix the affine transformation matrix to be applied to the node.
appendChild()
Appends a child node to this node.voidappendChild(ISvgNode*child)
Parameters
child
ISvgNode* — Required
ISvgNode The child node to append.
setClipRule()
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 isvoidsetClipRule(SvgFillRuleclipRule)
SvgFillRule::NON_ZERO
Parameters
clipRule
SvgFillRule — Required
SvgFillRule The new clipRule to apply.
setColor()
Sets the color of the node.voidsetColor(com.amazon.kepler.uitoolkit.graphics.Colorcolor)
Parameters
color
com.amazon.kepler.uitoolkit.graphics.Color — Required
Color the new color to apply.
setFillRule()
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 isvoidsetFillRule(SvgFillRulefillRule)
SvgFillRule::NON_ZERO
Parameters
fillRule
SvgFillRule — Required
SvgFillRule The new fillFule to apply.
setFill()
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 elementvoidsetFill(ISvgPaint*fill)
Parameters
fill
ISvgPaint* — Required
ISvgPaint The new fill to apply.
setFillOpacity()
Sets the fillOpacity for the node. Specifies the opacity of the painting operation used to paint the fill the current object.voidsetFillOpacity(floatfillOpacity)
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()
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.voidsetStroke(ISvgPaint*stroke)
Parameters
stroke
ISvgPaint* — Required
ISvgPaint the new stroke value to apply.
setStrokeDasharray()
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 isvoidsetStrokeDasharray(ISvgDasharray*strokeDasharray)
SvgDasharrayType::NONE
Parameters
strokeDasharray
ISvgDasharray* — Required
ISvgDasharray the new strokeDasharray to assign.
setStrokeDashoffset()
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 withvoidsetStrokeDashoffset(SvgLengthstrokeDashoffset)
SvgUnit::Number
Parameters
strokeDashoffset
SvgLength — Required
SvgLength the new strokeDashoffset to assign.
setStrokeLinecap()
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 isvoidsetStrokeLinecap(com.amazon.kepler.uitoolkit.graphics.StrokeCapstrokeLinecap)
StrokeCap::BUTT
Parameters
strokeLinecap
com.amazon.kepler.uitoolkit.graphics.StrokeCap — Required
StrokeCap value to set.
setStrokeLinejoin()
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 isvoidsetStrokeLinejoin(com.amazon.kepler.uitoolkit.graphics.StrokeJoinstrokeLinejoin)
StrokeJoin::MITER
Parameters
strokeLinejoin
com.amazon.kepler.uitoolkit.graphics.StrokeJoin — Required
StrokeJoin value to set.
setStrokeMiterlimit()
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.voidsetStrokeMiterlimit(floatstrokeMiterlimit)
Parameters
strokeMiterlimit
float — Required
the float value to set for the strokeMiterlimit.
setStrokeOpacity()
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.voidsetStrokeOpacity(floatstrokeOpacity)
Parameters
strokeOpacity
float — Required
the float value to set for the strokeOpacity.
setStrokeWidth()
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.voidsetStrokeWidth(SvgLengthstrokeWidth)
Parameters
strokeWidth
SvgLength — Required
SvgLength value to set for the strokeWidth.
Default value is 0.0 with SvgUnit::Number
setClipPath()
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.voidsetClipPath(stringclipPath)
Parameters
clipPath
string — Required
the string value to set as the clipPath.
setMask()
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.voidsetMask(stringmask)
Parameters
mask
string — Required
the string value to set for the mask.
setOpacity()
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.voidsetOpacity(floatopacity)
Parameters
opacity
float — Required
the float value to set for element opacity.
setId()
Sets the ID of the node. The ID is not required to be unique.voidsetId(stringid)
Parameters
id
string — Required
the string ID to set for current node.

