Object PmgCanvas (Drawing canvas)

See: PmgCanvas - Deatiled object description
The PmgCanvas object allows to draw both veri simple and complex animated shapes in 2D graphics. The drawing is controlled by script (JavaScript) in the onDraw event and by using the methods and properties of the CanvasCtx drawing area (eventually by extension object CanvasCtxExt). It allows to draw simple images (for example icons), but also complex animated graphics (animated meters, etc.).
This object adopts properties and methods of the PmgObject object.
Properties and methods:
CtxReset Set CanvasCtx into non-initialized empty state
Configuration tabs:
Object General information about the object
Content Content of the Pmg object in the XML form
Position Setting the position, width and height of the Pmg object
Variables List and configuration of user defined Pmg object variables
Events Algorithms definition for the object events
Methods Definition of designer's method of the Pmg object
Draw The onDraw event for drawing into the CanvasCtx drawing area.
Canvas Properties of the PmgCanvas object.
See also:
- CanvasCtx (object)
- CanvasCtxExt (object)
- The onDraw event

Pm9.00.00: Object name changed: PmiCanvas -> PmgCanvas
Pm8.03.28: Fixed bug: The read value of the color (for example of the strokeStyle property) was incorrect.
Pm8.03.13: Fixed bug: Memory decrease occured if methods save and restore were not called correctly (not in pair).
Pm8.03.08: New simple drawing tool has been created. This way it is possible to draw the canvas object and the editor then transforms it to script.

This tool will be developed further in future versions in order to provide more graphic functions and also to read and render canvas scripts.

The canvas drawing tool can now be opened from following locations:

- Select preconfiguration / Image / Drawing PmgCanvas graphics or
- On the "Draw" tab - when creating new method select option "draw PmgCanvas graphics" or
- On the "Draw" tab - in script editor local menu select Canvas editor ....
- On the "Draw" tab it is now possible to create assistant methods for drawing. In the onDraw event it is no longer neede to write the whole drawing script, but assistant methods can be called. This way the drawing script becomes much simpler.
- New CanvasCtxExt object for drawing. This object adds the functions of deformation rotation transformations. This object Objekt can be accessed via the pEvent.CtxExt parameter.
Pm8.02.11: new preconfigurations for intelligent valves and pumps.
Pm8.02.07: Allows free drawing (using JavaScript) into the are of this object. This object is "revolutionary" in the sense that it gives the application designer a free tool for creation of own graphic. The drawing algorithm may be dependant on item variables and this way change colors, shapes, ... based on the variables in the application.

There are also some handy preconfigurations prepared for this object, that demonstrate its capabilities.

PROMOTIC 9.0.10 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice