Description
Draws an N sided polygon on the map.
Syntax
map drawXPolygon [n, centre, a, b, angle, color, fill, alignWithMap]
Parameters:
map: Controln: Number - number of sides 3..720centre: Object or Position2D, Position3D - ellipse's centrea: Number - horizontal (x) radiusb: Number - vertical (y) radiusangle: Number - angle of rotation in degreescolor: Color (RGBA) - line colorfill: String - fill texture file or Procedural Textures. Note that the file texture will not rotate with polygon, use drawIcon for that. If fill texture is not empty, set line color to white [1,1,1,1]alignWithMap: Boolean - (Optional, default true) - when false the shape will not follow map rotation.
Returns: Nothing
Examples
Example 1
findDisplay 12 displayCtrl 51 ctrlAddEventHandler ["Draw",
{
_this select 0 drawXPolygon [
5, player, 50, 10, 0, [1, 0, 0, 1], ""
];
_this select 0 drawXPolygon [
3, player, 10, 50, 0, [1, 1, 1, 1], "#(rgb,8,8,3)color(1,0.6,0,1)"
];
_this select 0 drawXPolygon [
12, player, 10, 10, 90, [0, 0, 1, 1], ""
];
}];
See also
drawArrow · drawIcon · drawLine · drawRectangle · drawPolygon · drawTriangle · drawEllipse