PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Gradient parameters
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Draw a rectangle in an Variable of type WDPic (on the background layer).
Versions 15 and later
WINDEV This function is now available for Java applications.
New in version 15
WINDEV This function is now available for Java applications.
WINDEV This function is now available for Java applications.
Versions 16 and later
WINDEV This function is now available for WINDEV applications in Linux.
New in version 16
WINDEV This function is now available for WINDEV applications in Linux.
WINDEV This function is now available for WINDEV applications in Linux.
Example
MonImageWDPic est un WDPic = "Test.gif"
// Dessin d'un rectangle dont le fond passe du rouge au bleu
// en passant par le jaune
MonImageWDPic.DessineRectangleDégradé(10, 20, 100, 150, RougeClair, BleuClair, 0, JauneClair, 30)
IMG_MonDessin = MonImageWDPic
Syntax

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

<WDPic image>.DrawRectangleGradient(<X1> , <Y1> , <X2> , <Y2> , <Start color> , <End color> [, <Angle> [, <Color 3> [, <Distance color 3> [, <Color 4> [, <Distance color 4>]]]]])
<WDPic image>: WDPic variable
Name of the variable of type WDPic to be used. Only the background layer will be handled.
<X1>: Integer
X-coordinate (in pixels) of top left corner of rectangle.
<Y1>: Integer
Y-coordinate (in pixels) of top left corner of rectangle.
<X2>: Integer
X-coordinate (in pixels) of bottom right corner of rectangle.
<Y2>: Integer
Y-coordinate (in pixels) of bottom right corner of rectangle.
<Start color>: Integer or constant
Start color of gradient. This color can correspond to:
<End color>: Integer or constant
End color of gradient. This color can correspond to:
<Angle>: Optional integer
Angle that will be used for the selection of colors in the gradient. The angle value is included between 0 (horizontal angle, default value) and 360°.
<Color 3>: Optional constant or integer
Color that will be used in the gradient. This color can correspond to:
<Distance color 3>: Optional integer
Percentage separating the start color from color 3.
<Color 4>: Optional constant or integer
Color that will be used in the gradient. This color can correspond to:
<Distance color 4>: Optional integer
Percentage separating the start color from color 4.
WINDEV

Drawing a rectangle by specifying the points of the rectangle and by using the Background type Hide the details

<WDPic image>.DrawRectangleGradient(<X1> , <Y1> , <X2> , <Y2> , <Gradient>)
<WDPic image>: WDPic variable
Name of the variable of type WDPic to be used. Only the background layer will be handled.
<X1>: Integer
X-coordinate (in pixels) of top left corner of rectangle.
<Y1>: Integer
Y-coordinate (in pixels) of top left corner of rectangle.
<X2>: Integer
X-coordinate (in pixels) of bottom right corner of rectangle.
<Y2>: Integer
Y-coordinate (in pixels) of bottom right corner of rectangle.
<Gradient>: Background variable
Name of the Variable of type Background containing the characteristics of Gradient.
WINDEV

Drawing a rectangle by using the Rectangle type and by specifying the gradient Hide the details

<WDPic image>.DrawRectangleGradient(<Rectangle> , <Start color> , <End color> [, <Angle> [, <Color 3> [, <Distance color 3> [, <Color 4> [, <Distance color 4>]]]]])
<WDPic image>: WDPic variable
Name of the variable of type WDPic to be used. Only the background layer will be handled.
<Rectangle>: Rectangle variable
Name of the Variable of type Rectangle defining the coordinates of the rectangle to draw.
<Start color>: Integer or constant
Start color of gradient. This color can correspond to:
<End color>: Integer or constant
End color of gradient. This color can correspond to:
<Angle>: Optional integer
Angle that will be used for the selection of colors in the gradient. The angle value is included between 0 (horizontal angle, default value) and 360°.
<Color 3>: Optional constant or integer
Color that will be used in the gradient. This color can correspond to:
<Distance color 3>: Optional integer
Percentage separating the start color from color 3.
<Color 4>: Optional constant or integer
Color that will be used in the gradient. This color can correspond to:
<Distance color 4>: Optional integer
Percentage separating the start color from color 4.
WINDEV

Drawing a rectangle by using the Rectangle type and the Background type Hide the details

<WDPic image>.DrawRectangleGradient(<Rectangle> , <Gradient>)
<WDPic image>: WDPic variable
Name of the variable of type WDPic to be used. Only the background layer will be handled.
<Rectangle>: Rectangle variable
Name of the Variable of type Rectangle defining the coordinates of the rectangle to draw.
<Gradient>: Background variable
Name of the Variable of type Background containing the characteristics of Gradient.
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:
The drawing functions 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
Business / UI classification: Neutral code
Component: wd270pnt.dll
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment