This function is now available for Android applications.

This function is now available for Java applications.

New in version 25

This function is now available for Android applications.

This function is now available for Java applications.

This function is now available for Android applications.

This function is now available for Java applications.

Versions 15 and later

This function is now available for Java applications.

This function is now available for WEBDEV sites in Linux.

Caution: A specific configuration is required to use this function in Linux. For more details, see The drawings.

New in version 15

This function is now available for Java applications.

This function is now available for WEBDEV sites in Linux.

Caution: A specific configuration is required to use this function in Linux. For more details, see The drawings.

This function is now available for Java applications.

This function is now available for WEBDEV sites in Linux.

Caution: A specific configuration is required to use this function in Linux. For more details, see The drawings.

Versions 16 and later

This function is now available for Android applications.

This function is now available for WINDEV applications in Linux.

New in version 16

This function is now available for Android applications.

This function is now available for WINDEV applications in Linux.

This function is now available for Android applications.

This function is now available for WINDEV applications in Linux.

Versions 17 and later

This function is now available for iPhone/iPad applications.

New in version 17

This function is now available for iPhone/iPad applications.

This function is now available for iPhone/iPad applications.

Versions 24 and later

The syntax that manages the Rectangle type is now available for Android applications.

The syntax that manages the Rectangle type is now available for Java applications.

New in version 24

The syntax that manages the Rectangle type is now available for Android applications.

The syntax that manages the Rectangle type is now available for Java applications.

The syntax that manages the Rectangle type is now available for Android applications.

The syntax that manages the Rectangle type is now available for Java applications.

Example

// Draw a rectangle whose background changes from red to blue // via yellow IMG_Image1.DrawRectangleGradient(10, 20, 100, 150, LightRed, LightBlue, 0, LightYellow, 30)

Syntax

Drawing a rectangle by specifying the points of the rectangle and the gradient Hide the details

Name of the Rectangle variable that defines the coordinates of the rectangle to draw.

<Gradient>: Background variable

Name of the Background variable the with the gradient characteristics.

Remarks

Gradient parameters

The color parameters are used as follows:
The angle is used to define the orientation of the gradient.
Gradients with 3 or 4 colors are only available for 0 or 90 degree angles.

Remark: The gradient colors are not available for some systems (Windows 98 or Me for example) or for TSE 256 colors. In this case, a rectangle whose color corresponds to <Start color> is displayed.

Related Examples:

Unit examples (WINDEV): The drawing functions

[ + ] Using the main drawing functions of WINDEV to: - Initialize an Image control for drawing - Draw simple shapes - Write a text into a drawing - Change the color in a drawing