eraseVBL
This article is a stub, you can help the RPTools Wiki project by contributing content to expand this article.
This article needs: Lacks examples.
eraseVBL() Function
Note: This function can only be used in a Trusted Macro
• Introduced in version 1.3b89
This function erases VBL shapes.
Usage
eraseVBL(shapesList)
Parameters
shapesList
- A JSON Array of JSON objects, one of the latter for each VBL shape.
The shapes can be one of Rectangle, Circle, Polygon or Cross.
- For
"Rectangle"
, you need to supply"x"
,"y"
,"w"
,"h"
in pixels and optionally you can specify"r"
(rotation on center axis in degrees),"fill"
(1
= fill rectangle otherwise create empty shape),"thickness"
(line thickness1
ton
,0
or empty defaults to2
), and"scale"
(if provided number not0
, will scale rectangle byx
, ie scale:2
is double, scale:0.5
is half).
- Example:
{"shape":"rectangle","x":1743,"y":2198,"w":100,"h":100,"r":45,"fill":1,"thickness":1,"scale":0}
- For
"Circle"
, you need to supply"x"
,"y"
,"radius"
in pixels,"fill"
(1
= fill circle otherwise create empty shape),"thickness"
(line thickness1
ton
,0
or empty defaults to2
), and"sides"
(specify how many sides the polygon will have to approximate a circle).
- Example:
{"shape":"circle", "X":50, "Y":100, "radius":200, "sides":12, "thickness":3, "fill":0}
- For
"Polygon"
, you can supply"r"
(rotation on center axis in degrees) and"thickness"
(line thickness1
ton
,0
or empty defaults to2
). If you specify"close":1
then it will close the polygon otherwise it will leave it open. If it is closed, you can supply"fill":1
to make the polygon solid. In addition you need to supply an array (named"points"
) of 2 or more"x"
,"y"
coordinates.
- Example:
{"shape":"polygon","r":0,"fill":1,"close":1,"thickness":10,"points":[{"x":1993,"y":1998},{"x":2043,"y":1998},{"x":1993,"y":2148}]}
- For
"Cross"
, you need to supply"x"
,"y"
,"w"
,"h"
in pixels and optionally you can specify"r"
(rotation on center axis in degrees),"thickness"
(line thickness1
ton
,0
or empty defaults to2
), and"scale"
(if provided number not0
, will scale rectangle byx
, ie scale:2
is double, scale:0.5
is half).
- Example:
{"shape":"cross","x":1593,"y":2198,"w":50,"h":50,"r":22,"thickness":5,"scale":0.75}
Example
This example doesn't really do anything.
[h: exampleVariable = "a,b,c"]
[r: exampleFunction(exampleVariable, reverse)]
Returns:
c,b,a