Skip to content

rjDrawLineStrip

Shaddatic edited this page Apr 13, 2026 · 1 revision

Prototype

void rjDrawLineStrip( const NJS_POINT2* vtx, Float ooz, Sint32 Count, Float r, Uint32 Color )

API

void (*DrawLineStrip)( const NJS_POINT2* vtx, Float ooz, Sint32 Count, Float r, Uint32 Color )

Ninja

 N/A

Parameters

const NJS_POINT2* vtx

 Line vertex list

Float ooz

 One over Z depth, ie hardware depth

Int Count

 Line count

Float r

 Line width in hardware units

Int Color

 Line color. Translucent drawing is used if Alpha component is != 0xFF

Returns

No return value.

Description

Draw 'n' line strip vertexes in hardware units.

Example

This example will draw a 64x64, opaque, box out of 4 red lines in the center of the screen at half depth. The lines will have a width of 2 pixels.

#define NUM_LINE 4
#define NUM_VTX  NUM_LINE + 1

// set vertex list
NJS_POINT2 vtx[NUM_VTX] = 
{
    //  x,     y
    { 288.f, 208.f }, // line 1: top left
    { 288.f, 272.f }, // line 1: bottom left
    { 352.f, 272.f }, // line 2: bottom right
    { 352.f, 208.f }, // line 3: top right
    { 288.f, 208.f }, // line 4: top left, again
};

// draw polygon
rjDrawLineStrip( vtx, 0.5f, NUM_VTX, 2.f, 0xFFFF0000 ); // <<<<<<<<

Related Functions

History

  • 1.3.2.0:
    • Introduced
  • 1.5.0.0:
    • Made obsolete in the 'Draw' API module
    • Introduced into the new 'Ninja Draw' API module
  • 1.5.3.1:
    • Renamed to rjDrawLineStrip from rjDrawLineStrip2D

Clone this wiki locally