|
|
|
|
- Coordinates
- Using the drawing functions
- Pattern and PHP
- Drawing in Browser code
dPolyline (Function) In french: dPolyligne
dStartDrawing(IMG_Dessin)
dPen(DarkGreen, 2, 4)
dPolyline(4, 10, 100, 50, 60, 80, 90, 150, 13)
dStartDrawing(IMG_Dessin)
dPen(DarkGreen, 2, 4)
tabCoordonnéesXY is array of 0 by 2 int = [[2, 3], [14, 100], [10,70], [50, 80]]
dPolyline(tabCoordonnéesXY)
dPen(IMG_Dessin, DarkGreen, 2, 4)
tabCoordonnéesXY2 is array of 0 int = [2, 2, 140, 2, 150, 70, 0, 100, 200, 100]
dPolyline(IMG_Dessin, tabCoordonnéesXY2)
Syntax
Building a line point by point Hide the details
dPolyline([<Image>, ] <NbPoint> , <X1> , <Y1> , <X2> , <Y2> [, <Xn> [, <Yn> [, <Line color>]]])
<Image>: Optional control name or optional Image, WDPic or picLayer variable <NbPoint>: Integer Number of line segments. This parameter defines the number of <X>, <Y> pairs to specify in the function. <X1>: Integer X-coordinate of the first segment of the line. These coordinates are expressed in pixels. <Y1>: Integer Y-coordinate of the first segment of the line. These coordinates are expressed in pixels. <X2>: Integer X-coordinate of the second segment of the line. These coordinates are expressed in pixels. <Y2>: Integer Y-coordinate of the second segment of the line. These coordinates are expressed in pixels. <Xn>: Optional integer X-coordinate of the N segment of the line. These coordinates are expressed in pixels. <Yn>: Optional integer Y-coordinate of the N segment of the line. These coordinates are expressed in pixels. <Line color>: Integer or constant (optional) Line color. This color can correspond to:If this parameter is not specified, the line color:- is Transparent if the function dPen has not been used before.
New in version 2024In the case of an Variable type Image, the row will have the black Color.. - corresponds to the color specified in the last call to dPen.
Building a line via an array of X and Y-coordinates Hide the details
dPolyline([<Image>, ] <Array of coordinates> [, <Line color>])
<Image>: Optional control name or optional Image, WDPic or picLayer variable <Array of coordinates>: Array of integers or array of points WLanguage array of integers containing the coordinates of segments that make up the line. The even indices represent the X-coordinates while the odd indices represent the Y-coordinates of the points. These coordinates are expressed in pixels. <Line color>: Integer or constant (optional) Line color. This color can correspond to:If this parameter is not specified, the line color:- is Transparent if the function dPen has not been used before.
New in version 2024In the case of an Variable type Image, the row will have the black Color.. - corresponds to the color specified in the last call to dPen.
Remarks Coordinates Coordinates are specified with respect to the upper-left corner of the image (coordinates: (0.0)).
Related Examples:
|
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
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|