BIS fnc drawArrow: Difference between revisions
Jump to navigation
Jump to search
m (template:command argument fix) |
m (template:command argument fix) |
||
Line 13: | Line 13: | ||
| [from, to, color, pars, fill, map] call [[BIS_fnc_drawArrow]] |SYNTAX= | | [from, to, color, pars, fill, map] call [[BIS_fnc_drawArrow]] |SYNTAX= | ||
|p1= from: [[Array]] - Arrow start position in format [x,y] or [x,y,z]|= | |p1= from: [[Array]] - Arrow start position in format [x,y] or [x,y,z]|PARAMETER1= | ||
|p2= to: [[Array]] - Arrow end position in format [x,y] or [x,y,z]|= | |p2= to: [[Array]] - Arrow end position in format [x,y] or [x,y,z]|PARAMETER2= | ||
|p3= color (Optional): [[Array]] - Arrow line or fill color in format [r,g,b,a]. Default: [1,1,1,1] |= | |p3= color (Optional): [[Array]] - Arrow line or fill color in format [r,g,b,a]. Default: [1,1,1,1] |PARAMETER3= | ||
|p4= pars (Optional): [[Array]] - Arrow geometry details in format [arrowThickness, arrowHeadLengthCoef, arrowHeadWidthCoef], where: | |p4= pars (Optional): [[Array]] - Arrow geometry details in format [arrowThickness, arrowHeadLengthCoef, arrowHeadWidthCoef], where: | ||
* arrowThickness (Optional): [[Number]] - Arrow thickness in meters. Default: 10 | * arrowThickness (Optional): [[Number]] - Arrow thickness in meters. Default: 10 | ||
* arrowHeadLengthCoef (Optional): [[Number]] - Arrow head length compared to the total length of the arrow. Default: 1/3 (third of the length) | * arrowHeadLengthCoef (Optional): [[Number]] - Arrow head length compared to the total length of the arrow. Default: 1/3 (third of the length) | ||
* arrowHeadWidthCoef (Optional): [[Number]] - Arrow head width compared to the arrow thickness. Default: 2 (twice as wide)|= | * arrowHeadWidthCoef (Optional): [[Number]] - Arrow head width compared to the arrow thickness. Default: 2 (twice as wide)|PARAMETER4= | ||
|p5= fill (Optional): [[Boolean]] - [[true]] to draw color filled arrow, [[false]] to draw outline. Default: [[true]]|= | |p5= fill (Optional): [[Boolean]] - [[true]] to draw color filled arrow, [[false]] to draw outline. Default: [[true]]|PARAMETER5= | ||
|p6= map (Optional): [[Control]] - Map control. Default: [[displayCtrl|control]] 51 of the main map [[findDisplay|display]] 12|= | |p6= map (Optional): [[Control]] - Map control. Default: [[displayCtrl|control]] 51 of the main map [[findDisplay|display]] 12|PARAMETER6= | ||
| [[Array]] - Arrow reference for removal in format [idd, idc, ehId] or empty array [] on removal operation | | [[Array]] - Arrow reference for removal in format [idd, idc, ehId] or empty array [] on removal operation |
Revision as of 14:29, 7 April 2019
Description
- Description:
- Draws a static arrow (outline or color filled) on map. See Example 4 for arrow removal.
- Execution:
- call
- Groups:
- Uncategorised
Syntax
- Syntax:
- [from, to, color, pars, fill, map] call BIS_fnc_drawArrow
- Parameters:
- from: Array - Arrow start position in format [x,y] or [x,y,z]
- to: Array - Arrow end position in format [x,y] or [x,y,z]
- color (Optional): Array - Arrow line or fill color in format [r,g,b,a]. Default: [1,1,1,1]
- pars (Optional): Array - Arrow geometry details in format [arrowThickness, arrowHeadLengthCoef, arrowHeadWidthCoef], where:
- arrowThickness (Optional): Number - Arrow thickness in meters. Default: 10
- arrowHeadLengthCoef (Optional): Number - Arrow head length compared to the total length of the arrow. Default: 1/3 (third of the length)
- arrowHeadWidthCoef (Optional): Number - Arrow head width compared to the arrow thickness. Default: 2 (twice as wide)
- fill (Optional): Boolean - true to draw color filled arrow, false to draw outline. Default: true
- map (Optional): Control - Map control. Default: control 51 of the main map display 12
- Return Value:
- Array - Arrow reference for removal in format [idd, idc, ehId] or empty array [] on removal operation
Examples
- Example 1:
- Draw a semi-transparent, blue arrow with default geometry:
myArrow1 = [_pos1, _pos2, [0,0,1,0.5]] call BIS_fnc_drawArrow;
- Example 2:
- Draw a wide, green arrow outline:
myArrow2 = [_pos1, _pos2, [0,1,0,1], [20], false] call BIS_fnc_drawArrow;
- Example 3:
- Draw a thin, red arrow with custom head geometry:
myArrow3 = [_pos1, _pos2, [1,0,0,1], [1,1/5,5]] call BIS_fnc_drawArrow;
- Example 4:
- Remove the arrow created in Example 3:
myArrow3 call BIS_fnc_drawArrow;
Additional Information
- See also:
- drawArrow
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.73]][[ Category: arma3dev: New Functions | BIS FNC DRAWARROW]][[ Category: arma3dev: Functions | BIS FNC DRAWARROW]]