This accessor annotates an image provided at the image input by rendering an SVG graphic overlaid on the image.
The graphic input, if provided, gives an SVG specification of the graphic. Alternatively, if a graphic input is not provided, or the graphic input is empty, the graphicURI input can provide a resource identifier for the graphic. This can be a URL or a local resource (a file) available on the host. Note that most hosts will restrict locations from which files can be read. Usually they will allow to read files in the directory where the swarmlet is located on the file system, or in a subdirectory of that directory. To read such a file, give a path relative to the location of the swarmlet.
The translate input can be used to shift the graphic in the X and Y directions, and the rotate input can used to rotate the graphic.
The options input can have the following fields:
- XOffset: The horizontal offset for the graphic. If this is specified and a translate input is also provided, the both offsets are applied.
- YOffset: The vertical offset for the graphic. If this is specified and a translate input is also provided, the both offsets are applied.
||The image to annotate.|
||The location of an SVG graphic to overlay on the image.|
||An offset to apply to the graphic, as two element array specifying horizontal and vertical offsets in pixels.|
||A JSON object specifying options.|
||The filtered image.|