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 ISvgView

interface ISvgView
Extends ISvgNode The interface represents an SVG element. The Svg container can house child elements and define the rendering area. See also - ISvgNode.

Methods

attachToParent()

void attachToParent(IView* parent)
Sets svg to the element the parent of root view.

Parameters

parent
IView* — Required IView the parent view to attach.

setSize()

void setSize(com.amazon.kepler.uitoolkit.graphics.Size size)
Sets the size of the element.

Parameters

size
com.amazon.kepler.uitoolkit.graphics.Size — Required Size the value defining the width and height of the element.

setContainerSize()

void setContainerSize(com.amazon.kepler.uitoolkit.graphics.Size containerSize)
Sets the container size for layout or rendering.

Parameters

containerSize
com.amazon.kepler.uitoolkit.graphics.Size — Required Size the value representing the dimensions of the container.

setViewBox()

void setViewBox(com.amazon.kepler.uitoolkit.graphics.Rect viewBox)
Sets the viewBox of the svg element. The SVG viewport coordinates for the current SVG fragment.

Parameters

viewBox
com.amazon.kepler.uitoolkit.graphics.Rect — Required Rect the new value to set.

setPreserveAspectRatio()

void setPreserveAspectRatio(SvgPreserveAspectRatio aspectRatio)
Sets the preserveAspectRatio attribute of the svg element. Default value is @link SvgScale#MEET

Parameters

aspectRatio
SvgPreserveAspectRatio — Required SvgPreserveAspectRatio the value to set.

setX()

void setX(SvgLength x)
Sets the x attribute, which represents the X-coordinate of the svg component’s position. Has no effect on the outermost svg component. Default value is 0.0 with SvgUnit::Number

Parameters

x
SvgLength — Required SvgLength set as the X position of the svg component.

setY()

void setY(SvgLength y)
Sets the y attribute, which represents the Y-coordinate of the svg component’s position. Has no effect on the outermost svg component. Default value is 0.0 with SvgUnit::Number

Parameters

y
SvgLength — Required SvgLength set as the Y position of the svg component.

setWidth()

void setWidth(SvgLength width)
Sets the width of the svg element. Default value is 0.0 with SvgUnit::Percentage

Parameters

width
SvgLength — Required SvgLength to set.

setHeight()

void setHeight(SvgLength height)
Sets the height of the svg element. Default value is 0.0 with SvgUnit::Percentage

Parameters

height
SvgLength — Required SvgLength to set.
Last modified on October 29, 2026