TftRectangleTCG()

Library Description ›› Shapes ›› Rectangle ››
Parent Previous Next

TftRectangleTCG(wX_1 As Word, wY_1 As Word, wX_3 As Word, wY_3 As Word, wStartColor As Word, wEndColor As Word, bGradient As Byte)


wX_1: X-coordinate of Corner 1

wY_1: Y-coordinate of Corner 1

wX_3: X-coordinate of Corner 3

wY_3: Y-coordinate of Corner 3

wStartColor: Start color for the gradient, in 16-bit 565 RGB format

wEndColor: End color for the gradient, in 16-bit 565 RGB format

bGradient: Gradient direction:

• 0: Horizontal (Left to Right)

• 1: Vertical (Bottom to Top)

• 2: Radial (Center to Edge)


Draws a rectangle with a gradient color effect between two opposite vertices.


Note: The radial gradient requires intensive computation and is rendered pixel by pixel, which significantly slows down the drawing process.


Example:


TftSetUp(0)

TftResetScreen(BLACK)

TftRectangleTCG(20,10,110,100,YELLOW,BLUE,0)

TftRectangleTCG(120,10,210,100,PINK,WHITE,1)

TftRectangleTCG(220,10,310,100,LEMON,DARKGREY,2)

TftRectangleRCG(20,110,110,200,15,YELLOW,BLUE,0)

TftRectangleRCG(120,110,210,200,15,PINK,WHITE,1)

TftRectangleRCG(220,110,310,200,15,LEMON,DARKGREY,2)






Created with the Personal Edition of HelpNDoc: Easily create CHM Help documents