Interface ISvgImage
interface ISvgImage
Extends ISvgNode
Represents an SVG image element.
The image element includes images inside SVG documents.
It can display raster image files or other SVG files.
See also - ISvgNode.
Methods
setX()
Sets the x attribute, which represents the X-coordinate of the image’s position. Default value is 0.0 withvoidsetX(SvgLengthx)
SvgUnit::Number
Parameters
x
SvgLength — Required
SvgLength set as the X position of the image.
setY()
Sets the y attribute, which represents the Y-coordinate of the image’s position. Default value is 0.0 withvoidsetY(SvgLengthy)
SvgUnit::Number
Parameters
y
SvgLength — Required
SvgLength to set as the Y position of the image.
setWidth()
Sets the width attribute, which represents the width of the image. Default value is 100.0 withvoidsetWidth(SvgLengthwidth)
SvgUnit::Percentage
Parameters
width
SvgLength — Required
SvgLength to set as the width of the image.
setHeight()
Sets the height attribute, which represents the height of the image. Default value is 100.0 withvoidsetHeight(SvgLengthheight)
SvgUnit::Percentage
Parameters
height
SvgLength — Required
SvgLength to set as the height of the image.
getPreserveAspectRatio()
SvgPreserveAspectRatio getPreserveAspectRatio()
Retrieves the SvgPreserveAspectRatio attribute for the image.
Returns
SvgPreserveAspectRatio
SvgPreserveAspectRatio value.
setPreserveAspectRatio()
Sets the SvgPreserveAspectRatio attribute for the image. Default value is @link SvgScale#MEETvoidsetPreserveAspectRatio(SvgPreserveAspectRatioaspectRatio)
Parameters
aspectRatio
SvgPreserveAspectRatio — Required
SvgPreserveAspectRatio set for the image.
setHref()
Sets the href attribute of the image element. Points at a URL for the image file. An empty string can be passed, indicating no reference.voidsetHref(stringhref)
Parameters
href
string — Required
The string reference to set.

