ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Controls, pages and windows / Drawing functions / Types of variables
  • Properties specific to Background variables
  • Functions that use Background variables
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
The Background type defines the advanced characteristics of the element background. You can define and change the characteristics of this background using different WLanguage properties.
Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
// Dessine un rectangle avec bords bleus, fond vert et coins arrondis
// dans un champ Image

// Initialise le dessin dans le champ Image
dStartDrawing(IMG_Dessin)

Rect is Rectangle
Rect.X = 10
Rect.Y = 15
Rect.Width = 100
Rect.Height = 150
StyleCadre is Border
StyleCadre.Color  = LightBlue
StyleCadre.Round = 30
StyleCadre.Thickness = 1
StyleFond is Background
StyleFond.Color = LightGreen
dBorder(Rect, StyleCadre, StyleFond)
Properties

Properties specific to Background variables

The following properties can be used to handle the background of an element:
Property nameType usedEffect
ColorColor variableBackground color.
GradientGradient of the background color:
  • Property StartColor (type Color): Gradient start color.
  • Property ColorFin (type Color): Gradient end color.
  • property Angle (integer): Angle to be used for gradient color selection. The angle value is included between 0 (horizontal angle, default value) and 360°.
  • Property Color3 (type Color): Color to be used in the Gradient.
  • Property DistanceColor3 (integer): Percentage separating start color and color 3.
  • Property Color4 (type Color): Color to be used in the Gradient.
  • property DistanceColor4 (integer): Percentage separating start color and color 4.
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.
Remarks:
  • On some systems (e.g., 256-color Remote Desktop Connection), gradients are not available. In this case, the color defined via the ColorStart property is used.
  • Gradient backgrounds are not supported in docx documents.
HatchInteger constantType of hatching used:
  • HatchingNone: No hatching.
  • Crosshatch: Crosshatch.
  • DiagonalCrossHatch: DiagonalCrossHatch.
  • DiagonalSplit: 60% diagonal splits.
  • DiagonalHatchBottom: 120% diagonal hatches.
  • HorizontalHachure: Horizontal Hachure.
  • VerticalHatch Vertical hatching.
TypeInteger constantType of background:
  • FullBottom Solid background.
  • TransparentBackground Transparent background (the Property Color property is ignored).
  • Hatching background Hatching Background (the Property Hatch property is taken into account).
  • GradientBackground Gradient: Background with a color gradient (the Property Gradient property is taken into account).
Remarks

Functions that use Background variables

dBorderDraws the borders.
dRectangleDraws a rectangle:
  • in an Image control,
  • in an Image variable,
  • in a WDPic variable (on the background layer),
  • in a picLayer variable.
dRectangleGradientDraws a rectangle:
  • in an Image control,
  • in an Image variable,
  • in a WDPic variable (on the background layer),
  • in a picLayer variable.
dRoundedRectangleDraws a rounded rectangle:
  • in an Image control,
  • in an Image variable,
  • in a WDPic variable (on the background layer),
  • in a picLayer variable.
Android The syntaxes of dRectangle, dRoundedRectangle and dRectangleGradient that use Border or Background variables are not available in Android. You must use dBorder.
Minimum version required
  • Version 21
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help