Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pg/pgdrawbevelbox.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pg/pgdrawbevelbox.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pg/pgdrawbevelbox.html on line 9

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pg/pgdrawbevelbox.html on line 9

PgDrawBevelBox(), PgDrawIBevelBox(), PgDrawBevelBoxCx(), PgDrawIBevelBoxCx()

Draw a beveled box

Synopsis:

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 );

int  PgDrawBevelBoxCx( void *dc,
                       PhRect_t const *rect,
                       PgColor_t secondary,
                       short width,
                       int flags );

int  PgDrawIBevelBoxCx( void *dc,
                        int x1, int y1,
                        int x2, int y2,
                        PgColor_t secondary,
                        short width,
                        int flags );

Arguments:

dc
PgDrawBevelBoxCx() and PgDrawIBevelBoxCx() only. A void pointer to any type of draw context. Examples of draw contexts are:
rect (PgDrawBevelBox() and PgDrawBevelBoxCx() only)
A rectangle that describes the size of the bevel box.
x1, x2, y1, y2 (PgDrawIBevelBox() and PgDrawIBevelBoxCx() only)
The coordinates of the top left (x1, y1) and bottom right (x2, y2) of the bevel box.
secondary
The color of the lower and right edges of the bevel box. The top and left edges are drawn with the current stroke color.
width
The thickness of the lines.
flags
One of the following:

The flags argument must be one of the following:

Library:

ph

Description:

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. PgDrawBevelBox() and PgDrawIBevelBox() work on the current draw context, while you can specify the draw context for PgDrawBevelBoxCx() and PgDrawIBevelBoxCx().


Note: For PgDrawBevelBox() and PgDrawBevelBoxCx(), 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.


Note: PgDrawBevelBox() and PgDrawBevelBoxCx() require a pointer to a PhRect_t structure, whereas PgDrawIBevelBox() and PgDrawIBevelBoxCx() take individual arguments.

Returns:

0
Success.
-1
The draw buffer is too small to hold the current draw state and the draw command.

Examples:

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:

PgDrawBevelBox

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PgColor_t, PgDrawBeveled*(), PgDrawRect*(), PgSetFillColor*(), PgSetFillDither*(), PgSetFillTransPat*(), PgSetStrokeColor*(), PgSetStrokeDither*(), PgSetStrokeTransPat*(), PhRect_t

Arcs, ellipses, polygons, and rectangles in the Raw Drawing and Animation chapter of the Photon Programmer's Guide


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pg/pgdrawbevelbox.html on line 263

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pg/pgdrawbevelbox.html on line 263