TftRectangleTCG()

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

Syntax

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)

Parameters

Parameter

Description

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 RGB565 format

wEndColor

End color for the gradient, in 16-bit RGB565 format

bGradient

Gradient direction:
0: Horizontal (Left to Right)
1: Vertical (Bottom to Top)
2: Radial (Center to Edge)

Overview

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, 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)

TftRectangleTCG()

Created with the Personal Edition of HelpNDoc: Easy Qt Help documentation editor