Draw a single line
int PgDrawLine( PhPoint_t const *p1, PhPoint_t const *p2 ); int PgDrawILine( int x1, int y1, int x2, int y2 );
These functions build a command in the draw buffer to draw a line. Note that PgDrawLine() requires two pointers to PhPoint_t, whereas PgDrawILine() takes individual arguments.
The following example:
DrawLines() { PgSetStrokeColor( Pg_RED ); PgDrawILine( 8, 8, 152, 8 ); PgSetStrokeColor( Pg_GREEN ); PgDrawILine( 8, 8, 152, 60 ); PgSetStrokeColor( Pg_YELLOW ); PgDrawILine( 8, 8, 152, 112 ); }
will draw:
Photon
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | No |
PgSetStrokeCap(), PgSetStrokeColor(), PgSetStrokeDash(), PgSetStrokeDither(), PgSetStrokeJoin(), PgSetStrokeWidth()