AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Controles, páginas y ventanas / Funciones de dibujo
  • Gradient parameters
  • Dibujo en código Navegador
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Draws a rectangle:
  • in an Image control,
  • WEBDEV - Código ServidorWindowsLinux in a variable of type Image.
  • WEBDEV - Código Servidor in a variable of type WDPic (on the background layer),
  • WEBDEV - Código Servidor in a variable of type picLayer.
Note: To draw custom rectangles, use the dBorder function..
Linux Caution: In Linux, this function requires a specific configuration. For more details, see Drawing in WINDEV, WEBDEV and WINDEV Mobile.
Ejemplo
// Draw a rectangle whose background changes from red to blue
// via yellow
dStartDrawing(IMG_Image1)
dRectangleGradient(10, 20, 100, 150, LightRed, LightBlue, 0, LightYellow, 30)
Sintaxis

Drawing a rectangle by specifying the points of the rectangle and the gradient Ocultar los detalles

dRectangleGradient([<Image>, ] <X1> , <Y1> , <X2> , <Y2> , <Start color> , <End color> [, <Angle> [, <Color 3> [, <Distance color 3> [, <Color 4> [, <Distance color 4>]]]]])
<Image>: Optional control name or optional Image, WDPic or picLayer variable
WindowsLinux Image to use. This image can correspond to:
  • the name of an Image control.
  • the name of a variable of type Image.
  • WEBDEV - Código Servidor the name of a variable of type WDPic. Only the background layer will be handled.
  • WEBDEV - Código Servidor the name of a variable of type picLayer.
If this parameter is not specified, it is necessary to define the drawing destination with dStartDrawing.
<X1>: Integer
X-coordinate (in pixels) of the upper-left corner of the rectangle.
<Y1>: Integer
Y-coordinate (in pixels) of the upper-left corner of the rectangle.
<X2>: Integer
X-coordinate (in pixels) of the lower-right corner of the rectangle.
<Y2>: Integer
Y-coordinate (in pixels) of the lower-right corner of the rectangle.
<Start color>: Integer or constant
Start color of the gradient. This color can correspond to:
<End color>: Integer or constant
End color of the 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.
WEBDEV - Código Servidor

Drawing a rectangle by specifying the points of the rectangle and by using the Background type Ocultar los detalles

dRectangleGradient([<Image>, ] <X1> , <Y1> , <X2> , <Y2> , <Gradient>)
<Image>: Optional control name or optional Image, WDPic or picLayer variable
WindowsLinux Image to use. This image can correspond to:
  • the name of an Image control.
  • the name of a variable of type Image.
  • WEBDEV - Código Servidor the name of a variable of type WDPic. Only the background layer will be handled.
  • WEBDEV - Código Servidor the name of a variable of type picLayer.
If this parameter is not specified, it is necessary to define the drawing destination with dStartDrawing.
<X1>: Integer
X-coordinate (in pixels) of the upper-left corner of the rectangle.
<Y1>: Integer
Y-coordinate (in pixels) of the upper-left corner of the rectangle.
<X2>: Integer
X-coordinate (in pixels) of the lower-right corner of the rectangle.
<Y2>: Integer
Y-coordinate (in pixels) of the lower-right corner of the rectangle.
<Gradient>: Background variable
Name of the Background variable the with the gradient characteristics.
WEBDEV - Código Servidor

Drawing a rectangle by using the Rectangle type and by specifying the gradient Ocultar los detalles

dRectangleGradient([<Image>, ] <Rectangle> , <Start color> , <End color> [, <Angle> [, <Color 3> [, <Distance color 3> [, <Color 4> [, <Distance color 4>]]]]])
<Image>: Optional control name or optional Image, WDPic or picLayer variable
WindowsLinux Image to use. This image can correspond to:
  • the name of an Image control.
  • the name of a variable of type Image.
  • WEBDEV - Código Servidor the name of a variable of type WDPic. Only the background layer will be handled.
  • WEBDEV - Código Servidor the name of a variable of type picLayer.
If this parameter is not specified, it is necessary to define the drawing destination with dStartDrawing.
<Rectangle>: Rectangle variable
Name of the Rectangle variable that defines the coordinates of the rectangle to draw.
<Start color>: Integer or constant
Start color of the gradient. This color can correspond to:
<End color>: Integer or constant
End color of the 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.
WEBDEV - Código Servidor

Drawing a rectangle by using the Rectangle type and the Background type Ocultar los detalles

dRectangleGradient([<Image>, ] <Rectangle> , <Gradient>)
<Image>: Optional control name or optional Image, WDPic or picLayer variable
WindowsLinux Image to use. This image can correspond to:
  • the name of an Image control.
  • the name of a variable of type Image.
  • WEBDEV - Código Servidor the name of a variable of type WDPic. Only the background layer will be handled.
  • WEBDEV - Código Servidor the name of a variable of type picLayer.
If this parameter is not specified, it is necessary to define the drawing destination with dStartDrawing.
<Rectangle>: Rectangle variable
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.
Observaciones

Gradient parameters

The color parameters are used as follows:
The angle is used to define the orientation of the gradient.
The gradients performed with 3 or 4 colors are only available for an angle set to 0 or 90 degrees.
Note Gradients are not available on certain systems (e.g. Windows 98 or Me) or under TSE 256 colors. In this case, a rectangle whose color corresponds to <Start color> is displayed.
WEBDEV - Código Navegador

Dibujo en código Navegador

Algunas funciones de dibujo están disponibles en código Navegador. Las funciones de dibujo en código Navegador se basan en el estándar HTML 5. Más concretamente, en la etiqueta "canvas" de HTML 5.
Las funcionalidades de dibujo en código Navegador solo están disponibles en navegadores recientes (compatibles con el estándar HTML 5). Para saber si el navegador utilizado propone funcionalidades de dibujo, utilice la función DrawingAvailable.
Atención: Para utilizar las funciones de dibujo con Internet Explorer 9, el proyecto debe incluir la referencia en el archivo DTD. Para ello, el modo HTML debe ser "HTML 4.01 Transitional + DTD". Esta opción está disponible en la pestaña "Avanzado" de la ventana de descripción del proyecto.
Recordatorio: Para abrir la ventana de descripción del proyecto, en la pestaña "Proyecto", en el grupo "Proyecto", haga clic en "Descripción".
Caso especial: Dibujar en el navegador de un teléfono Android: Las funciones de dibujo del navegador solo están disponibles a partir de la versión 3 de Android.
Clasificación Lógica de negocio / UI: Código neutro
Componente: wd300pnt.dll
Versión mínima requerida
  • Versión 12
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 30/05/2025

Señalar un error o enviar una sugerencia | Ayuda local