| FillTriangle | Function (ROM Call 0x198)

graph.h

void FillTriangle (short x0, short y0, short x1, short y1, short x2, short y2, const SCR_RECT *clip, short Attr);

Draws a filled triangle.

FillTriangle draws a filled triangle with vertices (x0, y0), (x1, y1) and (x2, y2) using the attribute Attr. The triangle will be clipped at the boundaries of the area given by parameter clip. See SetCurClip for more info about clipping areas. Supported attributes are:

A_NORMAL | Draws a solid fill triangle
A_REVERSE | Draws an empty triangle (i.e. erase a triangular area)
A_XOR | XORs a solid fill triangle into the destination
A_SHADE_V | Draws a triangle filled using a vertical shading pattern
A_SHADE_H | Draws a triangle filled using a horizontal shading pattern
A_SHADE_NS | Draws a triangle filled using a negative slope diagonal shading pattern
A_SHADE_PS | Draws a triangle filled using a positive slope diagonal shading pattern

See SetCurAttr command for more general info about attributes.

Uses: DrawLine, TIOS_abs
Used by: WinFillTriangle