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.
![FORMCOLOR](/tt_images/FORMCOLOR.bmp)
![PAGECOLOR](/tt_images/PAGECOLOR.bmp)
![CONTRAST](/tt_images/CONTRAST.bmp)
![WHITELINE](/tt_images/WHITELINE.bmp)
![GREYLINE](/tt_images/GREYLINE.bmp)
![LIGHTBLUE](/tt_images/LIGHTBLUE.bmp)
![LIGHTGREEN](/tt_images/LIGHTGREEN.bmp)
![LIGHTGREY](/tt_images/LIGHTGREY.bmp)
![LIGHTRED](/tt_images/LIGHTRED.bmp)
![WHITE](/tt_images/WHITE.bmp)
![BLACK](/tt_images/BLACK.bmp)
![YELLOW](/tt_images/YELLOW.bmp)
![MAGENTA](/tt_images/MAGENTA.bmp)
![CYAN](/tt_images/CYAN.bmp)
![RED](/tt_images/RED.bmp)
![GREEN](/tt_images/GREEN.bmp)
![BLUE](/tt_images/BLUE.bmp)
![HEADBLUE](/tt_images/HEADBLUE.bmp)
![ORIHEAD](/tt_images/ORIHEAD.bmp)
![DISBACK](/tt_images/DISBACK.bmp)
![ORIBACK](/tt_images/ORIBACK.bmp)
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 |