drawHillVBL: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "<source" to "<syntaxhighlight") |
m (Minor fixes) |
||
Line 9: | Line 9: | ||
|usage= | |usage= | ||
<syntaxhighlight lang="mtmacro" line> | <syntaxhighlight lang="mtmacro" line> | ||
drawHillVBL( | drawHillVBL(shapeArray) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
This function works EXACTLY the same as {{func|eraseHillVBL}} with the ONLY difference that drawHillVBL draws the shapes on the Hill Vision Blocking Layer and {{func|eraseHillVBL}} erases them. | This function works EXACTLY the same as {{func|eraseHillVBL}} with the ONLY difference that drawHillVBL draws the shapes on the Hill Vision Blocking Layer and {{func|eraseHillVBL}} erases them. | ||
'''Parameters''' | '''Parameters''' | ||
{{param|shapesList|A [[JSON Array]] of [[JSON Object|JSON objects]], one of the latter for each Hill VBL shape. See {{func|drawVBL}} for a complete description of possible shapes}} | {{param|shapesList|A [[JSON Array]] of [[JSON Object|JSON objects]], one of the latter for each Hill VBL shape. See {{func|drawVBL}} for a complete description of possible shapes}} | ||
|example= | |example= | ||
Line 31: | Line 29: | ||
results in:<br/> | results in:<br/> | ||
[[Image:drawHillVBL.png]] | [[Image:drawHillVBL.png]] | ||
|also= | |also= | ||
[[Introduction to Vision Blocking ]], {{func|eraseHillVBL}} | [[Introduction to Vision Blocking]], {{func|eraseHillVBL}} | ||
}} | }} | ||
[[Category:Miscellaneous Function]] | [[Category:Miscellaneous Function]] | ||
[[Category:VBL Function]] | [[Category:VBL Function]] |
Revision as of 03:57, 5 June 2023
drawHillVBL() Function
Note: This function can only be used in a Trusted Macro
• Introduced in version 1.11.0
Draws Hill Vision Blocking Layer (Hill VBL) shapes.
Usage
drawHillVBL(shapeArray)
This function works EXACTLY the same as eraseHillVBL() with the ONLY difference that drawHillVBL draws the shapes on the Hill Vision Blocking Layer and eraseHillVBL() erases them.
Parameters
shapesList
- A JSON Array of JSON objects, one of the latter for each Hill VBL shape. See drawVBL() for a complete description of possible shapes
Example
This example builds an array of the object from the above examples and then feeds that array into the drawHillVBL function
[h:rectangle = "{'shape':'rectangle','x':50,'y':50,'w':100,'h':200,'r':45,'fill':1,'thickness':1,'scale':0}"]
[h:cross = "{'shape':'cross','x':-50,'y':-50,'w':50,'h':100,'r':30,'fill':1,'thickness':1,'scale':2}"]
[h:circle = "{'shape':'circle', 'x':50, 'y':100, 'radius':200, 'thickness':3, 'fill':0, 'sides':12,'r':45}"]
[h:polygon = "{'shape':'polygon','r':0,'close':1,'thickness':10,'points':[{'x':0,'y':0},{'x':200,'y':200},{'x':150,'y':10}]}"]
[h:objectArrary = json.append('',rectangle, cross, circle, polygon)]
[h:drawHillVBL(objectArrary)]
results in: