getVBL: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 1: Line 1:
{{stub}}
{{MacroFunction
{{MacroFunction
|name=getVBL
|name=getVBL
Line 5: Line 6:
|version=1.3b90
|version=1.3b90
|description=
|description=
This function saves Vision Blocking Layer (VBL) shapes.
Saves Vision Blocking Layer (VBL) shapes.


|usage=
|usage=
Line 13: Line 14:


This function retrieves the found shape in the given shape.
This function retrieves the found shape in the given shape.


'''Parameters'''
'''Parameters'''
{{param|shape|A json object as described in {{func|drawVBL}}.}}
{{param|shape|A JSON object as described in {{func|drawVBL}}.}}
{{param|format|Boolean. 0 returns a json object similar to the one you feed it. 1 returns an array of coordinates which covers the VBL found in the area}}
{{param|format|Boolean. Returns a JSON object if {{false}}, or an JSON array of coordinates if {{true}}.  In either case, the returned shape covers the VBL found in the area.}}




Line 26: Line 26:


|also=
|also=
[[Introduction to Vision Blocking ]], {{func|eraseVBL}}, {{func|drawVBL}}
[[Introduction to Vision Blocking]], {{func|eraseVBL}}, {{func|drawVBL}}
}}
}}
[[Category:Miscellaneous Function]]
[[Category:Miscellaneous Function]]
[[Category:VBL Function]]
[[Category:VBL Function]]

Revision as of 21:49, 6 March 2019

 This article is a stub, you can help the RPTools Wiki project by contributing content to expand this article.

getVBL() Function

 Note: This function can only be used in a Trusted Macro

Introduced in version 1.3b90
Saves Vision Blocking Layer (VBL) shapes.

Usage

drawVBL(shape,format)

This function retrieves the found shape in the given shape.

Parameters

  • shape - A JSON object as described in drawVBL().
  • format - Boolean. Returns a JSON object if false(0), or an JSON array of coordinates if true(1). In either case, the returned shape covers the VBL found in the area.


Example:

[h:rectangle = "{'shape':'rectangle','x':50,'y':50,'w':100,'h':200,'r':45,'fill':1,'thickness':1,'scale':0}"]
[r:vblData   = getVBL(rectangle , 0)]



See Also