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 = RGB(255, 243, 197)
PAGECOLOR = RGB(252, 215, 105)
CONTRAST = RGB(250, 187, 10)
WHITELINE = RGB(200, 200, 200)
GREYLINE = RGB( 60, 60, 60)
LIGHTBLUE = RGB(186, 239, 255)
LIGHTGREEN = RGB(190, 255, 90)
LIGHTGREY = RGB(230, 230, 230)
LIGHTRED = RGB(255, 196, 196)
WHITE = RGB(255, 255, 255)
BLACK = RGB( 0, 0, 0)
YELLOW = RGB(255, 255, 0)
MAGENTA = RGB(255, 0, 255)
CYAN = RGB( 0, 255, 255)
RED = RGB(255, 100, 100)
GREEN = RGB( 0, 186, 0)
BLUE = RGB( 0, 51, 255)
HEADBLUE = RGB(128, 255, 255)
ORIHEAD = RGB(240, 240, 240)
DISBACK = RGB(246, 246, 246)
ORIBACK = RGB(236, 233, 216)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 |