drawTriangle: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Some wiki formatting) |
Lou Montana (talk | contribs) m (Text replacement - "{{HashLink" to "{{Link") |
||
Line 15: | Line 15: | ||
|p1= map: [[Control]] - map control | |p1= map: [[Control]] - map control | ||
|p2= vertices: [[Array]] of [[Position]]s - triangle(s) vertices in multiple of 3, see {{ | |p2= vertices: [[Array]] of [[Position]]s - triangle(s) vertices in multiple of 3, see {{Link|#Example 1}} - if [[Position#Introduction|Position3D]] is provided for a vertex, its z value is ignored | ||
|p3= color: [[Array]] in format [[Color|Color (RGBA)]] | |p3= color: [[Array]] in format [[Color|Color (RGBA)]] |
Revision as of 18:43, 4 January 2023
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
- See also:
- drawArrow drawEllipse drawIcon drawLine drawPolygon drawRectangle
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):