image()

Produces an SVG "image" element.

Syntax

image(
   href STRING,
   x STRING,
   y STRING,
   width STRING,
   height STRING,
   preserveAspectRatio STRING )
  RETURNS om.DomNode
  1. href defines the xlink:href reference to the image.
  2. x defines the X coordinate of the image.
  3. y defines the Y coordinate of the image.
  4. width defines the width of the image.
  5. height defines the height of the image.
  6. 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 a URL for application images.

Example

DEFINE n om.DomNode
LET n = fglsvgcanvas.image( ui.Interface.filenameToURI("image02.jpg"),
                            100,100,50,50, "xMidYMid meet" )