|
|
|
|
Functions
MioScript Reference
|
|
Syntax
| draw.ID.polygon(X, Y, Polygon, Color, BorderSize, ZoomFactory) |
Parameters
| INT | X, Y | Position of the polygon.
| | ARRAY | Polygon | Array of coordinates
| | COLOR | Color | Drawing color.
| | INT | BorderSize | Optional. Width of the border
| | INT | ZoomFactory | Optional. In percent |
Return value
No value is returned.
Description
Draw a polygon on the specified bitmap.
The polygon is defined in an array as follow:
&poly[] = "X1^^Y1^^X2^^Y2^^X3^^Y3......X1^^Y1"
Coordinates in the array are relatives to the coordinates specified in the two first arguments of the function (X and Y): the first pixel is drawn at the coordinates X+X1, Y+Y1. The second one at X+X2, Y+Y2, etc.
Important: The polygon must be closed. The last coordinate must be the same than the first one.
|
MioScript Sample Code
&poly[] = "20^^10^^60^^10^^50^^60^^10^^60^^20^^10"
draw.main.polygon(
40,40,
poly,
num.rgb(0,100,255),
)
draw.main.paint() |
|
|
|