Draw a beveled box with gradients and two flat colors
int PgDrawGradientBevelBox( PhPoint_t *ul,
PhPoint_t *lr,
PgColor_t light_color,
PgColor_t ul_flat_color,
PgColor_t lr_flat_color,
PgColor_t dark_color,
short depth,
short width,
PgColor_t outline_color,
PgColor_t inline_color,
int flags );
ph
This function draws a beveled box with gradients.
The only difference between this function and
PgBevelBox()
is that in the latter, the upper-left and the lower-right flat colors are
identical.
The arguments are:
- ul, lr
- The upper left and lower right corners of the beveled box.
- light_color
- The lightest color in the bevel gradient.
- ul_flat_color
- The middle/neutral color in the bevel gradient of the top and left edges.
This is also the fill color of the box if Pg_BVB_FILL is
set in the flags.
- lr_flat_color
- The middle/neutral color in the bevel gradient of the bottom and
right edges.
- 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.
The bits in the flags argument affect the appearance of the
beveled box:
- Pg_BVB_FILL
- Fill the beveled box with
ul_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_ALL_INLINE
Pg_BVB_DRAW_BOTTOM_INLINE
Pg_BVB_DRAW_LEFT_INLINE
Pg_BVB_DRAW_RIGHT_INLINE
Pg_BVB_DRAW_TOP_INLINE
- Draw the indicated side or sides of the inline rectangle.
- Pg_BVB_DRAW_ALL_OUTLINE
Pg_BVB_DRAW_BOTTOM_OUTLINE
Pg_BVB_DRAW_LEFT_OUTLINE
Pg_BVB_DRAW_RIGHT_OUTLINE
Pg_BVB_DRAW_TOP_OUTLINE
- Draw the indicated side or sides of the outline rectangle.
- Pg_BVB_DRAW_ALL_BV
Pg_BVB_DRAW_BOTTOM
Pg_BVB_DRAW_LEFT
Pg_BVB_DRAW_RIGHT
Pg_BVB_DRAW_TOP
- Draw the indicated edge or edges of the beveled box.
- Pg_BVB_DRAW_ALL
- Draw all bevels, inlines, and outlines of the beveled box.
- Pg_BVB_DRAW_BITS
- Turn on all of the above flag
bits.
- 0
- Success.
- -1
- An error occurred.
Photon
Safety: | |
Interrupt handler |
No |
Signal handler |
No |
Thread |
No |
PgBevelBox(),
PgColor_t,
PgContrastBevelBox(),
PhPoint_t
"Gradients"
in the Raw Drawing and Animation chapter of the
Photon Programmer's Guide