WinFillTriangle Function (ROM Call 0x12)

wingraph.h

void WinFillTriangle (WINDOW *w, short x0, short y0, short x1, short y1, short x2, short y2, short Attr);

Draws a filled triangle to a window.

FillTriangle draws a filled triangle with vertices (x0y0), (x1y1) and (x2y2) to the window pointed to by w, using the attribute Attr. All coordinates are relative to the topleft corner of the window. The triangle will be clipped at the boundaries of the clipping area of the window. Supported attributes are:

A_NORMALDraws a solid fill triangle
A_REVERSEDraws an empty triangle (i.e. erase a triangular area)
A_XORXORs a solid fill triangle into the destination
A_SHADE_VDraws a triangle filled using a vertical shading pattern
A_SHADE_HDraws a triangle filled using a horizontal shading pattern
A_SHADE_NSDraws a triangle filled using a negative slope diagonal shading pattern
A_SHADE_PSDraws a triangle filled using a positive slope diagonal shading pattern

See WinAttr command for a more general info about attributes.

Note: The 3D grapher in HIDDEN SURFACE mode uses this routine to shade the graph using A_REVERSE if the surface is visible and A_NORMAL if it is hidden (by splitting the graph into 6-sided polygons and splitting those into triangles).


Uses: FillTriangle, PortRestore, ROM Call 0x413
Used by: cmd_cubicreg, cmd_expreg, cmd_linreg, cmd_lnreg, cmd_logistic, cmd_medmed, cmd_onevar, cmd_powerreg, cmd_quadreg, cmd_quartreg, cmd_twovar, EV_defaultHandler, GR3_paint3d, EV_quit, GR3_handleEvent