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/pgbevelbox.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/pgbevelbox.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/pgbevelbox.html on line 8
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/pgbevelbox.html on line 8
Draw a beveled box with gradients
int PgBevelBox( PhPoint_t *ul,
PhPoint_t *lr,
PgColor_t light_color,
PgColor_t flat_color,
PgColor_t dark_color,
short depth,
short width,
PgColor_t outline_color,
PgColor_t inline_color,
int flags );
int PgBevelBoxCx( void * dc,
PhPoint_t *ul,
PhPoint_t *lr,
PgColor_t light_color,
PgColor_t flat_color,
PgColor_t dark_color,
short depth,
short width,
PgColor_t outline_color,
PgColor_t inline_color,
int flags );
- dc
- PgBevelBoxCx() only. A void pointer to any type of draw context. Examples of draw contexts are:
- ul, lr
- Pointers to
PhPoint_t
structures that define the upper left and lower right corners of the
beveled box.
- light_color
- A
PgColor_t
that defines the lightest color in the bevel gradient.
- flat_color
- The middle/neutral color in the bevel gradient, and the box's fill color.
- dark_color
- The darkest color in the bevel gradient.
- depth
- The number of isochrome lines in the light-to-flat and flat-to-dark
bevel gradients.
The sign of the depth controls the location of an (imaginary) light source:
- Positive depth — illuminated from the top left.
- Negative depth — illuminated from the bottom right.
- width
- The total width of the beveled border, including outlines and inlines.
- outline_color
- The color of the outline rectangle.
- inline_color
- The color of the inline rectangle.
- flags
- Flags that affect the appearance of the beveled box:
- Pg_BVB_FILL — fill the beveled box with
flat-color.
- Pg_BVB_FULL_GRADIENTS — each bevel has two
gradients: light-to-flat and flat-to-dark.
If this isn't set, the bevels have only one gradient; see the
illustration above.
- Pg_BVB_DRAW_LEFT — draw the left edge of the
beveled box.
- Pg_BVB_DRAW_RIGHT — draw the right edge of the
beveled box.
- Pg_BVB_DRAW_TOP — draw the top edge of the
beveled box.
- Pg_BVB_DRAW_BOTTOM — draw the bottom edge of the
beveled box.
- Pg_BVB_DRAW_ALL — draw all edges of the beveled box.
- Pg_BVB_DRAW_BITS — turn on all of the above flag
bits.
|
If you specify any of the above arguments as Pg_TRANSPARENT, the value of the argument will be converted to Pg_WHITE. |
ph
These functions draw a beveled box with gradients.
PgBevelBox() works on the current
draw context, while you can specify the draw context for PgBevelBoxCx().
The only difference between these functions and
PgDrawGradientBevelBox() or
PgDrawGradientBevelBoxCx()
is that the latter allow separate specifications for the upper-left
and the lower-right flat colors. The two flat colors are the same
in these function.
- 0
- Success.
- -1
- An error occurred.
Photon
Safety: | |
Interrupt handler |
No |
Signal handler |
No |
Thread |
No |
PgColor_t,
PgContrastBevelBox*(),
PgDrawGradientBevelBox*(),
PhPoint_t
“Gradients”
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/pgbevelbox.html on line 266
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/pgbevelbox.html on line 266