Mioplanet Documentation Center
Resources and Help
HomeProductsMioScriptJavaScriptTechNotesPHP
   Home | MioScript | draw.ID.polygon SEARCH    

  Functions
draw.ID.brushFrom.ID
draw.ID.copyFrom.ID
draw.ID.copyMode
draw.ID.ellipse
draw.ID.getPixel
draw.ID.height
draw.ID.isEgual.ID
draw.ID.line
draw.ID.load
draw.ID.paint
draw.ID.pixelFormat
draw.ID.polygon
draw.ID.rect
draw.ID.rotate.sourceID
draw.ID.save
draw.ID.setPixel
draw.ID.size
draw.ID.text.ex
draw.ID.text.ex.getWidth
draw.ID.width
draw.isEgual.X
draw.isEgual.Y
draw.mem.create
draw.mem.createFromFile
draw.mem.delete
draw.mem.exists
draw.mx.deform
draw.mx.effects

  MioScript Reference
> Statements
app...
browser...
dialog...
disk...
draw...
extern...
filename...
keyboard...
menu...
mio...
mouse...
num...
path...
pushButton...
reg...
RS232...
sci...
screen...
shortcut...
sound...
str...
system...
time...
var...
window...

Function
draw.ID.polygon

Language: MioScript
Product: MioFactory


Syntax

draw.ID.polygon(X, Y, Polygon, Color, BorderSize, ZoomFactory)


Parameters

INTX, YPosition of the polygon.
ARRAYPolygonArray of coordinates
COLORColorDrawing color.
INTBorderSizeOptional.
Width of the border
INTZoomFactoryOptional.
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()