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
  • Limitations
  • Coordinates
  • Solid figure
  • 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
Draws the chord of a circle (intersection between an ellipse and a straight line):
  • in an Image control,
  • in a variable of type Image.
// Initialize the drawing in an Image control
dStartDrawing(IMG_Drawing)
// Draw the chord of a circle whose 
// background is light yellow and whose border is light blue
dChord(10, 10, 50, 50, 20, 20, 40, 50, LightYellow, LightBlue)
Reportes y Consultas
// Draw the chord of a circle whose 
// background is light yellow and whose border is light blue
dChord(IMG_Drawing, 10, 10, 50, 50, 20, 20, 40, 50, LightYellow, LightBlue)
Sintaxis

Drawing a chord, specifying all the coordinates of the bounding rectangle Ocultar los detalles

dChord([<Image>, ] <X1> , <Y1> , <X2> , <Y2> , <X3> , <Y3> , <X4> , <Y4> [, <Background color> [, <Line color>]])
<Image>: Optional control name or optional Image, WDPic or picLayer variable
Reportes y ConsultasWindows Image to use. This image can correspond to:
  • the name of an Image control.
  • the name of a variable of type Image.
If this parameter is not specified, it is necessary to define the drawing destination with dStartDrawing.
<X1>: Integer
X-coordinate of the upper-left corner of the rectangle containing the circle. These coordinates are expressed in pixels.
<Y1>: Integer
Y-coordinate of the upper-left corner of the rectangle containing the circle. These coordinates are expressed in pixels.
<X2>: Integer
X-coordinate of the lower-right corner of the rectangle containing the circle. These coordinates are expressed in pixels.
<Y2>: Integer
Y-coordinate of the lower-right corner of the rectangle containing the circle. These coordinates are expressed in pixels.
<X3>: Integer
X-coordinate of the start point of the chord. These coordinates are expressed in pixels.
<Y3>: Integer
Y-coordinate of the start point of the chord. These coordinates are expressed in pixels.
<X4>: Integer
X-coordinate of the end point of the chord. These coordinates are expressed in pixels.
<Y4>: Integer
Y-coordinate of the end point of the chord. These coordinates are expressed in pixels.
<Background color>: Integer or constant (optional)
Background color of the chord. This color can correspond to:
If this parameter is not specified, the background color:
  • is Transparent if has not been used beforehand,
  • corresponds to the color specified in the last call to dBackground.
<Line color>: Integer or constant (optional)
Line color for the circle chord. This color can correspond to:
If this parameter is not specified, the line color:
  • is Transparent if dPen has not been previously used.
    For a variable of type Image, the line will be black.
  • corresponds to the color specified in the last call to dPen.
Observaciones

Limitations

  • dChord is not available in anti-aliasing mode (for more details, see the help about dChangeMode).
  • dChord is not available for a drawing with management of alpha channel (for more details, see the help about dStartDrawing). This function has no effect.

Coordinates

If the start and end points are not located on the outline of the circle (or on the outline of the ellipse), the point taken into account is the intersection between the circle and the line that joins the specified point and the center of the rectangle (which means the center of the circle).
Coordinates are specified with respect to the upper-left corner of the Image control (coordinates: (0,0)).

Solid figure

The dChord function can only be used to draw a chord: contour only or chord area.. To draw a solid figure (portion defined by the center of the circle and the two points on the circle), use dSlice.

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.
  • Reportes y ConsultasWindows 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