vsTASKER 7 User Manual
×
Menu
Index

GDI

 
The GDI Sprite is a rectangular display that can display any OpenGL user code.
It can be used to represent any specific gauge or graphic that is not supported by the actual given Sprites.
 
getWidth(): return the width of the GDI (horizontal), same as db->width
getHeight(): return the height of the GDI (vertical), same as db->height
getCenter(): return a Coord2D for the center of the GDI
 
 
On the HMI grid, add a GDI:
or
 
 
Give it a name, then open the property window.
 
In the Runtime panel, put the following code:
ogl->drawCircle(db->width/2,db->height/2,10);
 
This will draw a circle of 10 pixels centered in the middle of the GDI