Sfairadora

  • Reference Guide

draw_gradient_rectangle

var_bmp <- draw_gradient_rectangle(x, y, dx, dy, c_lt, c_rt, c_lb, c_rb)
The var_bmp parameter is an l-value referring to a variable of the type Bitmap. The function draws a rectangle with specified colors of the four corners to the bitmap. The color inside of the rectangle is interpolated from the color of the corners. Thus, a gradient is drawn.

Parameters

var_bmp
An l-value of the type Bitmap to which the function draws.
x, y
The coordinates of the left top corner.
dx, dy
The width and height of the rectangle (extended to the left and down).
c_lt
The color of the left top corner (the type Color).
c_rt
The color of the right top corner (the type Color).
c_lb
The color of the left bottom corner (the type Color).
c_rb
The color of the right bottom corner (the type Color).

Remark

A left-right or a top-bottom gradient can be drawn by specifying two pairs of the same color. Gradients that are more complex can be attained by drawing multiple adjacent gradient rectangles.

Return Value

The return value is an l-value referring to the modified bitmap.