BIS fnc drawArrow: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - ";[ ]+ " to "; ") |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
Line 6: | Line 6: | ||
|gr1= Map and Markers | |gr1= Map and Markers | ||
|descr= Draws a static arrow (outline or color filled) on map. See Example 4 for arrow removal. | |descr= Draws a static arrow (outline or color filled) on map. See {{HashLink|#Example 4}} for arrow removal. | ||
{{Feature|Informative|Note that the order in which arrows are added to map is reversed, the last added arrow will appear under the first added arrow}} | {{Feature|Informative|Note that the order in which arrows are added to map is reversed, the last added arrow will appear under the first added arrow}} | ||
|s1=[from, to, color, pars, fill, map] call [[BIS_fnc_drawArrow]] | |s1= [from, to, color, pars, fill, map] call [[BIS_fnc_drawArrow]] | ||
|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] | ||
|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] | ||
|p3= color | |||
|p4= pars | |p3= color: [[Array]] format [[Color|Color (RGBA)]] - (Optional, default [1,1,1,1]) arrow line or fill color | ||
* arrowThickness | |||
* arrowHeadLengthCoef | |p4= pars: [[Array]] - (Optional) arrow geometry details in format [arrowThickness, arrowHeadLengthCoef, arrowHeadWidthCoef], where: | ||
* arrowHeadWidthCoef | * arrowThickness: [[Number]] - (Optional, default 10) arrow thickness in meters | ||
* arrowBaseWidthCoef | * arrowHeadLengthCoef: [[Number]] - (Optional, default 1/3) arrow head length compared to the total length of the arrow | ||
|p5= fill | * arrowHeadWidthCoef: [[Number]] - (Optional, default 2) arrow head width compared to the arrow thickness | ||
|p6= map | * {{GVI|arma3|1.98|size= 0.75}} arrowBaseWidthCoef: [[Number]] - (Optional, default 1) arrow base width compared to the arrow thickness | ||
|p5= fill: [[Boolean]] - (Optional, default [[true]]) [[true]] to draw color filled arrow, [[false]] to draw outline | |||
|p6= map: [[Control]] - (Optional, default [[findDisplay|display]] 12 [[displayCtrl]] 51) map control | |||
|r1= [[Array]] - Arrow reference for removal in format [idd, idc, ehId] or empty array [] on removal operation | |r1= [[Array]] - Arrow reference for removal in format [idd, idc, ehId] or empty array [] on removal operation | ||
Line 26: | Line 31: | ||
<br><br>[[Image:fnc_drawArrow.jpg|448px]] [[Image:BIS_fnc_drawArrow2.jpg|400px]] | <br><br>[[Image:fnc_drawArrow.jpg|448px]] [[Image:BIS_fnc_drawArrow2.jpg|400px]] | ||
|x1= Draw a semi-transparent, blue arrow with default geometry:< | |x1= Draw a semi-transparent, blue arrow with default geometry: | ||
|x2= Draw a wide, green arrow outline:< | <sqf>myArrow1 = [_pos1, _pos2, [0,0,1,0.5]] call BIS_fnc_drawArrow;</sqf> | ||
|x3= Draw a thin, red arrow with custom head geometry:< | |||
|x4= Remove the arrow created in Example 3:< | |x2= Draw a wide, green arrow outline: | ||
|x5= < | <sqf>myArrow2 = [_pos1, _pos2, [0,1,0,1], [20], false] call BIS_fnc_drawArrow;</sqf> | ||
myArrow2 = [ | |||
myArrow3 = [ | |x3= Draw a thin, red arrow with custom head geometry: | ||
myArrow4 = [ | <sqf>myArrow3 = [_pos1, _pos2, [1,0,0,1], [1,1/5,5]] call BIS_fnc_drawArrow;</sqf> | ||
myArrow5 = [ | |||
myArrow6 = [ | |x4= Remove the arrow created in {{HashLink|#Example 3}}: | ||
<sqf>myArrow3 call BIS_fnc_drawArrow;</sqf> | |||
|x5= <sqf> | |||
myArrow1 = [[100,400,0], [200,500,0], [1,0,0,1], [20], true] call BIS_fnc_drawArrow; | |||
myArrow2 = [[400,700,0], [300,600,0], [0,1,0,1], [20, 1/3, 2, 2], true] call BIS_fnc_drawArrow; | |||
myArrow3 = [[600,700,0], [400,900,0], [0,0,1,1], [20, 1/3, 2, 0.5], true] call BIS_fnc_drawArrow; | |||
myArrow4 = [[100,100,0], [200,200,0], [0,0,0,1], [20], false] call BIS_fnc_drawArrow; | |||
myArrow5 = [[400,400,0], [300,300,0], [1,1,1,1], [20, 1/3, 2, 2], false] call BIS_fnc_drawArrow; | |||
myArrow6 = [[600,400,0], [400,600,0], [0,1,1,1], [20, 1/3, 2, 0.5], false] call BIS_fnc_drawArrow; | |||
</sqf> | |||
|seealso= [[drawArrow]] | |seealso= [[drawArrow]] | ||
}} | }} |
Revision as of 12:24, 6 May 2022
Description
- Description:
- Draws a static arrow (outline or color filled) on map. See Example 4 for arrow removal.
- Execution:
- call
- Groups:
- Map and Markers
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: Array format Color (RGBA) - (Optional, default [1,1,1,1]) arrow line or fill color
- pars: Array - (Optional) arrow geometry details in format [arrowThickness, arrowHeadLengthCoef, arrowHeadWidthCoef], where:
- arrowThickness: Number - (Optional, default 10) arrow thickness in meters
- arrowHeadLengthCoef: Number - (Optional, default 1/3) arrow head length compared to the total length of the arrow
- arrowHeadWidthCoef: Number - (Optional, default 2) arrow head width compared to the arrow thickness
- 1.98 arrowBaseWidthCoef: Number - (Optional, default 1) arrow base width compared to the arrow thickness
- fill: Boolean - (Optional, default true) true to draw color filled arrow, false to draw outline
- map: Control - (Optional, default display 12 displayCtrl 51) map control
- 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:
- Example 2:
- Draw a wide, green arrow outline:
- Example 3:
- Draw a thin, red arrow with custom head geometry:
- Example 4:
- Remove the arrow created in Example 3:
- Example 5:
- myArrow1 = [[100,400,0], [200,500,0], [1,0,0,1], [20], true] call BIS_fnc_drawArrow; myArrow2 = [[400,700,0], [300,600,0], [0,1,0,1], [20, 1/3, 2, 2], true] call BIS_fnc_drawArrow; myArrow3 = [[600,700,0], [400,900,0], [0,0,1,1], [20, 1/3, 2, 0.5], true] call BIS_fnc_drawArrow; myArrow4 = [[100,100,0], [200,200,0], [0,0,0,1], [20], false] call BIS_fnc_drawArrow; myArrow5 = [[400,400,0], [300,300,0], [1,1,1,1], [20, 1/3, 2, 2], false] call BIS_fnc_drawArrow; myArrow6 = [[600,400,0], [400,600,0], [0,1,1,1], [20, 1/3, 2, 0.5], false] 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