image()
Produces an SVG "image"
element.
Syntax
image(
href STRING,
x DECIMAL,
y DECIMAL,
width DECIMAL,
height DECIMAL,
preserveAspectRatio STRING )
RETURNS om.DomNode
- href defines the xlink:href reference to the image.
- x defines the X coordinate of the image.
- y defines the Y coordinate of the image.
- width defines the width of the image.
- height defines the height of the image.
- preserveAspectRatio defines a the aspect ratio to preserve.
Usage
This function creates an "image"
SVG DOM element from the parameters.
The href parameter defines the image resource or URL.
Important: Use the
ui.Interface.filenameToURI()
method to produce an URL for application
images.Example
DEFINE n om.DomNode
LET n = fglsvgcanvas.image( ui.Interface.filenameToURI("image02.jpg"),
100,100,50,50, "xMidYMid meet" )