grafic function ttg_common()
1. Colors
A couple of colors are defined in Tool&Task and their name can be used as the corresponding color.





















To get the red, green and blue component of a color, you may use the functions
lred = getRColor(FORMCOLOR) (result is 255)
lgreen = getGColor(FORMCOLOR) (result is 243)
lblue = getBColor(FORMCOLOR) (result is 197)
2. Coordinates
The corners of a bitmap with a width of 100 pixel and a height of 200 pixels have the following coordinates
upper left corner x = 0, y = 0
lower left corner x = 0, y = 199
upper right corner x = 99, y = 0
lower right corner x = 99, y = 199
3. Globals in Tool&Task Grafic
global | contains |
---|---|
gTTG_Source | fullpath of grafic source file set by ttg_createbmp or ttg_openbmp |
gTTG_Target | fullpath of grafic target file set by ttg_display or ttg_execute |
gTTG_Width | width [pixels] of gTTG_Source and gTTG_Target |
gTTG_Height | height [pixels] of gTTG_Source and gTTG_Target |
gTTG_Pixset | parser string of ttg-commands ttg_check |
gTTG_Insert | list of .bmp files to insert into gTTG_Target ttg_check |
gTTG_PageNo | current page number when multiple pages are printed |
gTTG_ImageNo | current image number when multiple images are printed |
gTTG_PHoriRes | width printable area of current printer |
gTTG_PVertiRes | height printable area of current printer |
gTTG_PageX0 | x, upper left corner of page space of current printer |
gTTG_PageY0 | y, upper left corner of page space of current printer |
gTTG_PageWidth | width of page defined for current printer |
gTTG_PageHeight | height of page of current printer |
gTTG_Font | current font of current printer |