setCurrent()

Selects the SVG canvas handler for subsequent SVG canvas API calls.

Syntax

setCurrent(
   cid SMALLINT )
  1. cid is the SVG canvas id, as returned by fglsvgcanvas.create().

Usage

This function makes the specified SVG canvas current.

Any subsequent calls to a fglsvgcanvas function that requires the SVG canvas handler will be done with this identifier.

Example

DEFINE cid1, cid2 SMALLINT
LET cid1 = fglsvgcanvas.create("formonly.canvas1") -- current canvas is cid1
LET cid2 = fglsvgcanvas.create("formonly.canvas1") -- current canvas is cid2
CALL fglsvgcanvas.setcurrent( cid1 )               -- current canvas is cid1