graphic function ttg_gradient()

Parameters:
1: X coord upper left corner of rectangle2: Y coord upper left corner of rectangle
3: X coord lower right corner of rectangle
4: Y coord lower right corner of rectangle
5: 'H' Horizontal (left to right)
'V' Vertical (top down)
'C' Cross (upper left to lower right)
'D' Diacross (upper right to lower left)
6: red intesity of start color (0-255)
7: green intesity of start color (0-255)
8: blue intesity of start color (0-255)
9: red intesity of end color (0-255)
10: green intesity of end color (0-255)
11: blue intesity of end color (0-255)
12: how to tread color 'transparent'
'I' = Ignore (overwrite as any other color)
'O' = Only (only paint transparent pixels)
'N' = NOT (do not touch transparent pixels)
***************************** | |
* Tool&Task example program * | |
* ttg_gradient() * | |
* last compile: 12.07.2022 * | |
***************************** |
ttg_new() | |
ttg_createbmp(148, 148, FORMCOLOR) | |
* the area is divided in 4 rectangles | |
lx = 3 |
&& upper left x coordinate |
ly = 3 |
&& upper left y coordinate |
lh = 74 |
&& half the original space |
lw = 74 - 6 |
&& width and height of subareas |
* upper left rectangle | |
ttg_gradient(lx, ly, lx+lw, ly+lw, 'V', BLACK, WHITE, 'I') | |
* lower left rectangle | |
ttg_gradient(lx, ly+lh, lx+lw, ly+lh+lw, 'H', WHITE, BLACK, 'I') | |
lx = lx + lh |
&& 2 subareas on the right side |
* upper right rectangle | |
ttg_gradient(lx, ly, lx+lw, ly+lw, 'C', BLACK, WHITE, 'I') | |
* lower right rectanlge | |
ttg_gradient(lx, ly+lh, lx+lw, ly+lh+lw, 'D', WHITE, BLACK, 'I') | |
ttg_execute() | |
ttg_display() |