GfxGradientRect
- draw a rectangle with gradient fill

Low-level graphics
(AmiBroker 50)


SYNTAX GfxGradientRect( x1, y1, x2, y2, fromcolor, tocolor )
RETURNS NOTHING
FUNCTION Draws a rectangle. The interior of the rectangle is filled using gradient color.

Parameters

  • x1 - x-coordinate of the upper left corner of the rectangle
  • y1 - y-coordinate of the upper left corner of the rectangle
  • x2 - x-coordinate of the lower right corner of the rectangle
  • y2 - y-coordinate of the lower right corner of the rectangle
  • fromcolor - the 'upper' color of the gradient fill
  • tocolor - the 'lower' color of the gradient fill
The rectangle extends up to, but does not include, the right and bottom coordinates. This means that the height of the rectangle is y2 - y1 and the width of the rectangle is x2 - x1. Both the width and the height of a rectangle must be greater than 2 and less than 32767.

NOTE: This is LOW-LEVEL graphic function. To learn more about low-level graphic functions please read TUTORIAL: Using low-level graphics.

EXAMPLE GfxGradientRect( 10, 10, 100, 100, colorWhite, colorGrey50 );
SEE ALSO GfxRoundRect() function , GfxRectangle() function

References:

The GfxGradientRect function is used in the following formulas in AFL on-line library:

More information:

See updated/extended version on-line.