drawPolygon: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Created page with "{{Command|= Comments ____________________________________________________________________________________________ | arma3dev |= Game name |1.57|= Game version ______________...")
 
mNo edit summary
Line 13: Line 13:


|p1= map: [[Control]] |= Parameter 1
|p1= map: [[Control]] |= Parameter 1
|p2= [polygon color]: [[Array]] |= Parameter 2
|p2= [polygon, color]: [[Array]] |= Parameter 2
|p3= polygon: [[Array]] - array of positions in format [pos1, pos2, pos3,....posN], where pos is [[Position3D]] |= Parameter 3
|p3= polygon: [[Array]] - array of positions in format [pos1, pos2, pos3,....posN], where pos is [[Position3D]] |= Parameter 3
|p4= color: [[Array]] - line color in format [r,g,b,a]|= Parameter 4
|p4= color: [[Array]] - line color in format [r,g,b,a]|= Parameter 4

Revision as of 13:52, 21 February 2016

-wrong parameter ("arma3dev") defined!-[[:Category:Introduced with arma3dev version 1.57|1.57]]
Hover & click on the images for description

Description

Description:
Draws given polygon on the given map control with given color. The polygon must consist of at least 3 points.
Groups:
Uncategorised

Syntax

Syntax:
map drawPolygon [polygon, color]
Parameters:
map: Control
[polygon, color]: Array
polygon: Array - array of positions in format [pos1, pos2, pos3,....posN], where pos is Position3D
color: Array - line color in format [r,g,b,a]
Return Value:
Nothing

Examples

Example 1:
test_polygon = []; for "_i" from 1 to 12 do { test_polygon pushBack player getPos [10 + random 100, 360/_i]; }; findDisplay 12 displayCtrl 51 ctrlAddEventHandler ["Draw", { _this select 0 drawPolygon [test_polygon, [0,0,1,1]]; }];

Additional Information

See also:
drawEllipsedrawIcondrawLinedrawRectangledrawArrowinPolygon

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

[[Category:Introduced with arma3dev version 1.57]][[ Category: arma3dev: New Scripting Commands | DRAWPOLYGON]][[ Category: arma3dev: Scripting Commands | DRAWPOLYGON]]

Notes

Bottom Section