AddSmoothPolyline
AddSmoothPolyline ( scanDirection ; listOfCoords ; lineStroke ; lineColor ; lineColorVariant ; shadowEffect ; shadowColor ; smoothingMethod )
Argument | Type | Range | Default | Note |
---|---|---|---|---|
scanDirection | int | 1..2 | xxyy | |
listOfCoords | num[] | -inf..+inf | (required) | |
lineStroke | num[] | 0..1000 | 1 | Dimension:[pt] |
lineColor | rgba | 0..255 | black | |
lineColorVariant | int | -1..128 | solid | |
shadowEffect | num[] | -1000..1000 | 0 | |
shadowColor | rgba | 0..255 | #888a | |
smoothingMethod | num[] | 4..5 | 4 |
Examples
AddSmoothPolyline(xxyy;350 50 250 150 250 100 350 250 350 50)
AddSmoothPolyline(xyxy;350 50 250 150 250 100 350 250 350 50;3;red)
Description
The AddSmoothPolyline() function makes it possible to draw smooth lines whose stroke (thickness, dash pattern), color and shadow can be varied. The arguments scanDirection and listOfCoords are explained in combination with the AddPolygon() function.
The smoothing can be controlled by the last argument smoothingMethod. For details, see Smooth Lines.
| ADD_SMOOTH_POLYLINE_01 |
1 | OpenDrawing(100;100) |
2 | |
3 | 50.0 10.0 |
4 | 73.5 82.4 |
5 | 12.0 37.6 |
6 | 88.0 37.6 |
7 | 26.5 82.4 |
8 | 50.0 10.0; |
9 | |
10 |
| ADD_SMOOTH_POLYLINE_02 |
1 | OpenDrawing(100;100) |
2 | |
3 | 10 20 |
4 | 90 20 |
5 | 10 80 |
6 | 90 80; |
7 | 2 12 4 2.5 4;lightSeaGreen;solid; |
8 | 0 0 1;gray; /* Shadow */ |
9 | 4 1.5) /* Smoothing */ |
10 |