Canvas drawing area

The canvas area defines a two-dimensional coordinate system for drawing elements.

The canvas area represents an abstract drawing page where you define size and location of shapes with coordinates from (0,0) to (1000,1000).

The origin point (0,0), is on the bottom-left of the drawing area.

Figure: Canvas area diagram

Canvas area diagram

The drawing area is defined in the form file with a CANVAS form item. At runtime, you draw the content of canvas areas in the Abstract User Interface tree. In a form defining canvas areas, the Abstract User Interface tree contains empty <Canvas> nodes that you can fill with canvas items.

A canvas node is identified in the program by the name attribute. You can get the canvas node by name with the Window.getElement(name) method.

You cannot drop canvas area nodes, as they are read-only in a form definition.