The IDrawingCanvasInstance interface derives from IWorldInstance to add APIs specific to the Drawing Canvas plugin.
See the Drawing Canvas: Generate Image example for a demonstration of programmatically generating an image for Drawing Canvas.
The co-ordinate system used in drawing APIs work the same as they do for actions. For more information refer to the Drawing Canvas object documentation.
In some of the drawing APIs, there are parameters that accept a color. These are represented using an array with either three components e.g. [r, g, b], in which case the alpha is treated as opaque, or four components e.g. [r, g, b, a] to specify the alpha as well. Each component is a normalized float value in the range 0-1.
[r, g, b]
[r, g, b, a]
For example [1, 0, 0] represents opaque red, and [0, 0, 1, 0.5] represents blue at 50% opacity.
[1, 0, 0]
[0, 0, 1, 0.5]
See instance event for standard instance event object properties.
[[x1, y1], [x2, y2], ...]