njDrawPolygon2D Japanese
<-|INDEX|->
Draws a polygon on a 2D screen.

FORMAT

#include <Ninja.h> 
void njDrawPolygon2D( *p, n, pri, attr )
NJS_POINT2COL *p 
Int n 
Float pri 
Uint32 attr

PARAMETERS

*p
list of coordinates of vertices of polygons to be drawn
n
number of vertices of polygons
pri
priority (used as Z value)
attr
attributes (specifies the drawing method)

RETURN VALUE

None

FUNCTION


EXAMPLE

The following draws a hexagon.
Sint32 i;
NJS_POINT2COL	p2c[6];
NJS_POINT2	p[6];
NJS_COLOR	col[6];

p2c.p = p;
p2c.col = col;
p2c.tex = NULL;
p2c.num = 6;

p2c.p[0].x = 427;
p2c.p[0].y = 116;
p2c.col[0].color = 0xFF000055;

p2c.p[1].x = 555;
p2c.p[1].y = 200;
p2c.col[1].color = 0xFFFFFF55;

p2c.p[2].x = 555;
p2c.p[2].y = 285;
p2c.col[2].color = 0x00FF0055;

p2c.p[3].x = 427;
p2c.p[3].y = 371;
p2c.col[3].color = 0xFFFFFF55;

p2c.p[4].x = 300;
p2c.p[4].y = 285;
p2c.col[4].color = 0x0000FF55;

p2c.p[5].x = 300;
p2c.p[5].y = 200;
p2c.col[5].color = 0xFFFFFF55;

njDrawPolygon2D(p,6,-2.f,NJD_DRAW_NORMAL|NJD_FILL);

NOTES

The NJD_DRAW_NORMAL attribute may be omitted when it is used in combination with other attributes.

RELATED TOPICS


njDrawPolygon2D
<-|INDEX|->

Copyright SEGA ENTERPRISES, LTD., 1997