PolyReg- Draws a regular polygon
Draws a polygon with n vertices equidistant from the centre by sides of the same length and angles of the same width.
- (int) X: Horizontal coordinate of the center;
- (int) Y: Vertical coordinate of the center;
- (int) L: length from the centre to any one of the vertices;
- (int) V: Number of vertices;
- (int) R: rotation expressed in degrees (optional).
Use PolyReg to draw a regular polygon. The polygon is defined by X Y (center), distance L (length between center and vertices), and V (number of vertices). The regular polygon must have at least 3 and a maximum of 24 vertices.
The polygon lines are drawn using the current pen and color (Pen, ColorPen), while the surface is filled with the current brush or color (Brush, ColorBrush).
The optional parameter R defines the rotation of the polygon around its hypothetical center or around a origin point defined with the GraphicOrigin instruction. The value is expressed in degrees. If omitted the rotation is 0 degrees.
Drawing with the mouse:
From the drawing context menu choose Regular Polygon. Move the pointer to the center of the polygon and press the left button to fix it. Move the pointer over the graph - the regular polygon is drawn - and press the left button to add a vertex to the figure. To end the polygon, fix the last vertex by holding down the Ctrl key.
Once the coordinates of the regular polygon have been defined, use the mouse wheel to rotate it around its center or around a origin point defined with the GraphicOrigin instruction. When using the mouse wheel with the Ctrl key, the polygon is enlarged or reduced. To insert the PolyReg instruction into the graph, confirm with the left mouse button.