Draw a beveled box
int PgDrawBevelBox( PhRect_t const *rect, PgColor_t secondary, short width, int flags ); int PgDrawIBevelBox( int x1, int y1, int x2, int y2, PgColor_t secondary, short width, int flags );
These functions build a command in the draw buffer to draw a beveled box. This box is used for the outlines of buttons and panes.
The upper and left edges of the box are drawn in the current stroke color; the lower and right edges are drawn in the secondary color. The width argument determines the thickness of the lines.
For PgDrawBevelBox(), the width parameter must be <= 15. |
When you increase the thickness, the lines grow toward the middle of the beveled box. The maximum width is given by Pg_BEVEL_MAX.
The flags argument must be one of the following:
PgDrawBevelBox() requires a pointer to a PhRect_t structure, whereas PgDrawIBevelBox() takes individual arguments. |
The following example:
DrawBevelBox() { PhRect_t r = { 8, 8, 152, 112 }; PgSetFillColor( Pg_GREY ); PgSetStrokeColor( Pg_WHITE ); PgDrawBevelBox( &r, Pg_DGREY, 4, Pg_DRAW_FILL_STROKE ); }
will draw:
Photon
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | No |
PgDrawBeveled(), PgDrawRect(), PgSetFillColor(), PgSetFillDither(), PgSetFillTransPat(), PgSetStrokeColor(), PgSetStrokeDither(), PgSetStrokeTransPat()