*p | List of coordinates for drawing line endpoints |
n | Number of lines to be drawn |
pri | Priority (use for Z value) |
attr | Attribute (select drawing method) |
The attribute used is data point *p given on the screen coordinates, n number of straight lines will be drawn.
-NJD_DRAW_NORMAL | Independent line drawing. |
-NJD_DRAW_FAN | Radial line drawing. |
-NJD_DRAW_CONNECTED | Connected line drawing. |
-NJD_TRANSPARENT | Transparent drawing. |
-NJD_USE_TEXTURE | Drawing with texture. |
These five attributes can be used in mutually consistent combinations by using the "|" character as a delimiter.
Sint32 i; NJS_POINT2COL p2c[100]; NJS_POINT2 p[100]; NJS_COLOR col[100]; p2c.p = p; p2c.col = col; p2c.tex = NULL; p2c.num = 100; for(i=0;i<100;i++){ p2c.p[i].x = (Sint16)(njRandom() * 640.f); p2c.p[i].y = (Sint16)(njRandom() * 480.f); p2c.p[i].col.color = (Sint32)(njRandom() * 0xFFFFFFFF); } njDrawLine2D(p2c,100,-2.f,NJD_DRAW_NORMAL|NJD_TRANSPARENT);