drawTriangle

From Bohemia Interactive Community
Jump to navigation Jump to search
Hover & click on the images for description

Description

Description:
drawTriangle.jpg

Draws one to multiple triangles on the map.

When fill param is absent or is an empty string "", the triangle is drawn with lines of the color set in color param. In order to draw color-filled triangle of the same color as color param, set fill param to opaque white procedural texture"#(rgb,1,1,1)color(1,1,1,1)".
Groups:
GUI Control - Map

Syntax

Syntax:
map drawTriangle [vertices, color, fill]
Parameters:
map: Control - map control
vertices: Array of Positions - triangle(s) vertices in multiple of 3, see Example 1 - if Position3D is provided for a vertex, its z value is ignored
color: Array in format Color (RGBA)
fill: String - (Optional, default "") fill texture file or Procedural Textures. See note in description for more info.
Return Value:
Nothing

Examples

Example 1:
Copy
findDisplay 12 displayCtrl 51 ctrlAddEventHandler ["Draw", { _this select 0 drawTriangle [ [ // triangle 1 start player getRelPos [100, 0], player getRelPos [100, -135], player getRelPos [100, 135] // triangle 1 end ], [1,0,0,0.5], "#(rgb,1,1,1)color(1,1,1,1)" ]; }];

Additional Information

See also:
drawArrow drawEllipse drawIcon drawLine drawPolygon drawRectangle drawXPolygon

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
Killzone_Kid - c
Posted on Jul 16, 2017 - 15:36 (UTC)
Example YouTube video
Killzone_Kid - c
Posted on Nov 13, 2018 - 21:05 (UTC)
Drawing holes (video):