Name
AddBoxToPath -- add rectangle to path (V5.0)
Synopsis
AddBoxToPath(id, x, y, width, height[, table])
Function
This function adds a rectangle to the path specified in id. You have to provide the position and size of the rectangle in the other arguments. AddBoxToPath() will start a new subpath for the rectangle and close it.

The optional argument table allows you to configure the rectangle's style. The following tags are currently recognized:

RoundLevel:
You can specify this tag to create a rectangle with rounded corners. You need to pass a round level in percentage which specifies how round the corners will be (possible values are 0 to 100). Defaults to 0 which means no round corners.

CornerA, CornerB, CornerC, CornerD:
These four tags allow you to fine-tune the corner rounding of the rectangle. You can specify a rounding level (0 to 100) for every corner of the rectangle thus allowing you to create a rectangle where not all corners are rounded, or where the different corners use different rounding levels. These tags will override any setting specified in the RoundLevel tag.

Inputs
id
identifier of path to which the rectangle should be added
x
x position of the rectangle
y
y position of the rectangle
width
rectangle width
height
rectangle height
table
optional: table containing further options (see above)

Show TOC