Syntax

TftPolygon(wX_Center As Word, wY_Center As Word, bRadius As Byte, bVertexCount As Byte, bStartAngle As Byte, pSolid As Bit, wColor As Word, bWidth As Byte, sbDirection As SByte)

Parameters

Parameter

Description

wX_Center

X-coordinate of the polygon center

wY_Center

Y-coordinate of the polygon center

bRadius

Radius from the center to each vertex

bVertexCount

Number of vertices in the polygon (must be greater than 3)

bStartAngle

Starting angle from the Y-axis for the first vertex, then measured clockwise

pSolid

Polygon fill type:
0: No fill
1: Solid fill

wColor

Fill or outline color in 16-bit RGB565 format

bWidth

Outline thickness in pixels:
0: No additional width (1-pixel wide outline)

Overview

sbDirection — Direction for additional outline width:

Draws a polygon with a specified number of vertices, starting from a given center point. 


The polygon’s size is determined by the radius, and the starting angle controls the orientation of the first vertex.
If pSolid is set to 1, the polygon is filled with the specified color. If set to 0, only the outline is drawn.
The outline can also be customized in terms of width and direction.

Example

TftSetUp(0, 0)

TftResetScreen(BLACK)

TftPolygon(160,120,115,4,0,0,GREEN,0,0)

TftPolygon(160,120,110,5,0,0,RED,0,0)

TftPolygon(160,120,105,6,0,0,BLUE,0,0)

TftPolygon(160,120,100,6,20,0,ORANGE,2,-1)

TftPolygon(160,120,90,7,0,1,BROWN,0,0)

TftPolygon()

Created with the Personal Edition of HelpNDoc: Make Documentation a Breeze with HelpNDoc's Clean and Efficient User Interface