TftEllipseG()

Library Description ›› Shapes ›› Ellipse ››
Parent Previous Next

TftEllipseG(wX_Center As Word, wY_Center As Word, bRadiusH As Byte, bRadiusV As Byte, wStartColor As Word, wEndColor As Word, bGradient As Byte)


wX_Center: X-coordinate of the ellipse center

wY_Center: Y-coordinate of the ellipse center

bRadiusH: Horizontal radius of the ellipse (in pixels)

bRadiusV: Vertical radius of the ellipse (in pixels)

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: Direction of the gradient:

• 0: Horizontal (Left to Right)

• 1: Vertical (Bottom to Top)

• 2: Radial (Center to Peripheral)


Draws an ellipse filled with a gradient color. 


The gradient can be horizontal, vertical, or radial. The gradient will smoothly transition between the start and end colors. If bGradient is set to 2, the radial gradient will be drawn from the center to the outer edges of the ellipse, but this method is computationally intensive and drawn pixel by pixel, making it slow.


Note

Radial gradients are very computationally demanding and are drawn pixel by pixel, which can result in slower performance.


Example:


TftSetUp(0)

TftResetScreen(BLACK)

TftEllipseG(90,60,80,40,ORANGE,VIOLET,0)

TftEllipseG(240,80,60,30,GREEN,PINK,1)

TftEllipseG(140,170,100,50,WHITE,RED,2)






Created with the Personal Edition of HelpNDoc: Create HTML Help, DOC, PDF and print manuals from 1 single source