Polygon drawing tool

Log-in or register.

Polygon drawing tool

rsrc/polygon-tool.png image POLYGON is a drawing tool capable of drawing arbitrary polygons with three or more vertices.

Polygon configuration panel

Prior to version 2013.1, there was no configuration panel for Polygon tool and the drawing always started with a triangle. Since version 2013.1, users can select one of eight possible starting shapes:

Polygon tool configuration panel

How to use the Polygon tool

With the Polygon tool selected, click and hold left mouse button down while moving the mouse to create the initial polygon.

After you release the mouse button, control handles appear. You can move the control handles to move polygon vertices or to split polygon edges. Dragging one vertex control handle on its neighbor merges the two handles and removes the edge between them.

If the created polygon is in a vector layer, it can be scaled and rotated by holding down a SHIFT key and dragging it with mouse. It may also be converted to Shape from context menu and then further refined.

Scripting parameters

POLYGON tool can be used from scripts. The command in script must have the following arguments:

  • coords - pairs of floating point numbers representing vertex coordinates. There must be at least 6 numbers to define X and Y coordinates of three points.

Example

DrawTool.POLYGON(Document, 50, 10, 90, 90, 50, 70, 10, 90);
// draw a circle section (2/5 of full circle) (center is at [100, 100], radius is 50)
var coords = new Array();
for (i = 0; i <= 20; ++i)
{
    coords[i+i] = 100+50*Math.cos(i*2*3.1415/50);
    coords[i+i+1] = 100+50*Math.sin(i*2*3.1415/50);
}
DrawTool.POLYGON(Document, 100, 100, coords);

See also: DrawTool object, Document object

Recent comments

user icon kath660 registered user on April 17th 2011

how do i change the number of vertices on the polygon tool?

user icon Vlasta site administrator on April 17th 2011

Drag one of the green points to split an edge. Drag one of the blue ones over its neighbor to delete an edge.

user icon Anonymous on April 30th 2012

You got to be kidding me! Don't want to sound offensive, but doing it this way makes it impossible to have symmetrical polygons. If I want to draw a hexagon, I generally want all the sides to be the same length. Are you saying that I have to adjust the length of the sides "visually"? I like the program very much, though, and I won't be using the poligon tool much anyway.

user icon Anonymous on May 17th 2012

This is the one and only thing I hate about real world paint. Draw a perfect triangle, but you are on your own for any other shape - like hexagons. :-o

user icon Anonymous on July 8th 2014

how do I change so I can see the mouse

user icon Anonymous
Vista & Win 7 icons
What about ICL files?