AddSmoothPolygon
AddSmoothPolygon ( scanDirection ; listOfCoords ; fillColor ; fillColorVariant ; borderStroke ; borderColor ; borderColorVariant ; shadowEffect ; shadowColor ; smoothingMethod )
Argument | Type | Range | Default | Note |
---|---|---|---|---|
scanDirection | int | 1..2 | xxyy | |
listOfCoords | num[] | -inf..+inf | (required) | |
fillColor | rgba | 0..255 | black | |
fillColorVariant | int | -1..128 | solid | |
borderStroke | num[] | 0..1000 | 0 | Dimension:[pt] |
borderColor | rgba | 0..255 | black | |
borderColorVariant | int | -1..128 | solid | |
shadowEffect | num[] | -1000..1000 | 0 | |
shadowColor | rgba | 0..255 | #888a | |
smoothingMethod | num[] | 4..5 | 4 |
Examples
AddSmoothPolygon(xxyy;350 50 250 150 250 100 350 250 350 50;red)
AddSmoothPolygon(xyxy;350 50 250 150 250 100 350 250 350 50;0 90 200)
Description
The AddSmoothPolygon() function makes it possible to draw areas with smooth borders whose fill, border 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_POLYGON_01 |
1 | OpenDrawing(100;100) |
2 | |
3 | 50.0 10.0 |
4 | 84.6 70.0 |
5 | 15.4 70.0 |
6 | 50.0 10.0; |
7 | 206 222 236;solid; /* Fill */ |
8 | |
9 | 0;none; /* Shadow */ |
10 | 4 0.5) /* Smoothing */ |
11 |
| ADD_SMOOTH_POLYGON_02 |
1 | OpenDrawing(100;100) |
2 | |
3 | 10 30 |
4 | 30 10 |
5 | 60 60 |
6 | 50 90 |
7 | 40 60 |
8 | 70 10 |
9 | 90 30 |
10 | 50 50 |
11 | 10 30; |
12 | 206 222 236;solid; /* Fill */ |
13 | |
14 | 0 0 3;teal) /* Shadow */ |
15 |