drawTriangle: Difference between revisions
Lou Montana (talk | contribs) m (Text replacement - "\[ *((ftp|http)s?:\/\/[^ ]+) +([^ =]+) *\]" to "{{Link|$1|$3}}") |
Killzone Kid (talk | contribs) No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 6: | Line 6: | ||
|gr1= GUI Control - Map | |gr1= GUI Control - Map | ||
|descr= [[ | |descr= [[File:drawTriangle.jpg|right|250px]] | ||
Draws one to multiple triangles on the map. | Draws one to multiple triangles on the map. | ||
{{Feature | informative | When {{hl|fill}} param is absent or is an empty string "", the triangle is drawn with lines of the color set in {{hl|color}} param. | {{Feature | informative | When {{hl|fill}} param is absent or is an empty string "", the triangle is drawn with lines of the color set in {{hl|color}} param. | ||
Line 41: | Line 41: | ||
</sqf> | </sqf> | ||
|seealso= [[drawArrow]] [[drawEllipse]] [[drawIcon]] [[drawLine]] [[drawPolygon]] [[drawRectangle]] | |seealso= [[drawArrow]] [[drawEllipse]] [[drawIcon]] [[drawLine]] [[drawPolygon]] [[drawRectangle]] [[drawXPolygon]] | ||
}} | }} | ||
Latest revision as of 23:36, 1 November 2024
Description
- Description:
-
Draws one to multiple triangles on the map.
- 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:
- CopyfindDisplay 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
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
- Posted on Jul 16, 2017 - 15:36 (UTC)
- Example YouTube video
- Posted on Nov 13, 2018 - 21:05 (UTC)
- Drawing holes (video):