grafic function, common information

1. Colors

A couple of colors are defined in Tool&Task and their name can be used as the corresponding color.

FORMCOLOR FORMCOLOR = RGB(255, 243, 197)
PAGECOLOR PAGECOLOR = RGB(252, 215, 105)
CONTRAST CONTRAST = RGB(250, 187, 10)
WHITELINE WHITELINE = RGB(200, 200, 200)
GREYLINE GREYLINE = RGB( 60, 60, 60)
LIGHTBLUE LIGHTBLUE = RGB(186, 239, 255)
LIGHTGREEN LIGHTGREEN = RGB(190, 255, 90)
LIGHTGREY LIGHTGREY = RGB(230, 230, 230)
LIGHTRED LIGHTRED = RGB(255, 196, 196)
WHITE WHITE = RGB(255, 255, 255)
BLACK BLACK = RGB( 0, 0, 0)
YELLOW YELLOW = RGB(255, 255, 0)
MAGENTA MAGENTA = RGB(255, 0, 255)
CYAN CYAN = RGB( 0, 255, 255)
RED RED = RGB(255, 100, 100)
GREEN GREEN = RGB( 0, 186, 0)
BLUE BLUE = RGB( 0, 51, 255)
HEADBLUE HEADBLUE = RGB(128, 255, 255)
ORIHEAD ORIHEAD = RGB(240, 240, 240)
DISBACK DISBACK = RGB(246, 246, 246)
ORIBACK 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_Sourcefullpath of grafic source file set by ttg_createbmp or ttg_openbmp
gTTG_Targetfullpath of grafic target file set by ttg_display or ttg_execute
gTTG_Widthwidth [pixels] of gTTG_Source and gTTG_Target
gTTG_Heightheight [pixels] of gTTG_Source and gTTG_Target
gTTG_Pixsetparser string of ttg-commands ttg_check
gTTG_Insertlist of .bmp files to insert into gTTG_Target ttg_check
gTTG_PageNocurrent page number when multiple pages are printed
gTTG_ImageNocurrent image number when multiple images are printed
gTTG_PHoriReswidth printable area of current printer
gTTG_PVertiResheight printable area of current printer
gTTG_PageX0x, upper left corner of page space of current printer
gTTG_PageY0y, upper left corner of page space of current printer
gTTG_PageWidthwidth of page defined for current printer
gTTG_PageHeightheight of page of current printer
gTTG_Fontcurrent font of current printer