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
  • Uso de las funciones de dibujo
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
Declares the default background color for the rectangles, circles, etc::
  • in an Image control,
  • in a variable of type Image.
  • WINDEV in a variable of type WDPic (on the background layer),
  • WINDEV in a variable of type picLayer.
Linux Caution: In Linux, this function requires a specific configuration. For more details, see Drawing in WINDEV, WEBDEV and WINDEV Mobile.
// Initialize the drawing in an Image control
dStartDrawing(IMG_Drawing)

// Declare the background color of the different drawings in an Image control
dBackground(LightGreen)
WINDEVCódigo de Usuario (UMC)
// Declare the background color of the different drawings in the IMG_Drawing control
dBackground(IMG_Drawing, LightGreen)
Sintaxis
dBackground([<Image>, ] <Color> [, <Fill style> [, <Type of hatching> [, <Opacity>]]])
<Image>: Optional control name or optional Image, WDPic or picLayer variable
WindowsLinuxJavaCódigo de Usuario (UMC) Image to use. This image can correspond to:
  • the name of an Image control.
  • the name of a variable of type Image.
  • WINDEV the name of a variable of type WDPic. Only the background layer will be handled.
  • WINDEV the name of a variable of type picLayer.
If this parameter is not specified, it is necessary to define the drawing destination with dStartDrawing.
<Color>: Integer or constant
Default background color of different drawings. This color can correspond to:
  • an RGB color (returned by RGB),
  • an HSL color (returned by HSL),
  • a WLanguage preset color.
  • a variable of type Color. In this case, the opacity specified in the variable is taken into account.
<Fill style>: Optional integer or Integer constant
Default background fill of different drawings:
BackgroundHatchedBackground filled with hatching.
Corresponds to value 2 for compatibility.
BackgroundSolid
(Default value)
Solid background.
Corresponds to value 0 for compatibility.
BackgroundTransparentTransparent background (<Color> is ignored).
Corresponds to value 1 for compatibility.

<Type of hatching>: Optional integer
Type of background hatching used by default in the different drawings. To use this parameter, the value of <Fill style> must be equal to 2. If the value of <Fill style> is different from 2, <Type of hatching> is ignored. The different types of hatching are:
  • 0: Horizontal hatching
  • 1: Vertical crosshatching
  • 2: 60% diagonal cut
  • 3: 120% diagonal hatching
  • 4 (default): Cross-hatching
  • 5: Diagonal cross-hatching
<Opacity>: Optional integer
Opacity of color, included between 0 (transparent) and 255 (opaque). An opacity set to 128 is used to blend 50% of the color with the existing color found in the control.
Remarks:
  • This opacity will be taken into account if the drawing was initialized with the dWithOpacity constant (dStartDrawing).
  • If parameter <Couleur> corresponds to a variable of type Color, this parameter must not be specified: the opacity specified in the variable will be taken into account.
Observaciones

Uso de las funciones de dibujo

Las funciones de dibujo se pueden utilizar según 2 métodos:
  • Método 1: Uso de la función dStartDrawing
    • Se debe llamar a la función dStartDrawing antes de utilizar otras funciones de dibujo. La función dStartDrawing permite definir el elemento (control Imagen o variable) en el que se aplicarán las funciones de dibujo.
    • Al dibujar en un control Imagen:
      • Las funciones de dibujo trabajan en una copia ("bitmap") de la imagen. Se pueden utilizar las funciones de dibujo de Windows (con la función dStartDrawing o CallDLL32), pero estas funciones deben utilizar el DC (Device Context) devuelto por la función API.
      • las funciones dEndDrawing y dStartDrawing no deben llamarse en el mismo proceso.
        Si se llama a las funciones dEndDrawing y dStartDrawing en el mismo proceso, no se mostrará el dibujo: se borrará automáticamente.
  • WindowsLinuxJavaCódigo de Usuario (UMC) Método 2: indicar el destino del dibujo directamente en la sintaxis (mediante un parámetro)
    El parámetro <Imagen> permite especificar directamente el destino del dibujo. Ya no es necesario utilizar dStartDrawing. Esta función debe ser eliminada.
Clasificación Lógica de negocio / UI: Código neutro
Componente: wd300pnt.dll
Versión mínima requerida
  • Versión 9
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