Draw an ellipse
int PgDrawEllipse( PhPoint_t const *center, PhPoint_t const *radii, unsigned int flags );
This function builds a command in the draw buffer to draw an ellipse. The center argument defines the ellipse's center and radii defines its x and y radii.
The flags argument must be one of the following:
To have the function interpret the center and radii arguments as the upper-left and lower-right coordinates respectively, OR flags with Pg_EXTENT_BASED.
The following example:
DrawStrokeElli() { PhPoint_t c = { 80, 60 }; PhPoint_t r = { 72, 52 }; PgSetStrokeColor( Pg_WHITE ); PgDrawEllipse( &c, &r, Pg_DRAW_STROKE ); }
will draw:
The following example:
DrawFillElli() { PhPoint_t c = { 80, 60 }; PhPoint_t r = { 72, 52 }; PgSetFillColor( Pg_PURPLE ); PgDrawEllipse( &c, &r, Pg_DRAW_FILL ); }
will draw:
The following example:
DrawFillStrokeElli() { PhPoint_t c = { 80, 60 }; PhPoint_t r = { 72, 52 }; PgSetFillColor( Pg_PURPLE ); PgSetStrokeColor( Pg_WHITE ); PgDrawEllipse( &c, &r, Pg_DRAW_FILL_STROKE ); }
will draw:
Photon
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | No |
PgDrawRoundRect(), PgSetFillColor(), PgSetFillDither(), PgSetFillTransPat(), PgSetStrokeColor(), PgSetStrokeDither(), PgSetStrokeTransPat()