As of rev.5929, "facing" parameter only worked for positive token facings (as from getTokenFacing())
Patch includes updates to all four draw*VBL functions to use following snippet for rotation calculation.
Code: Select all
if (useFacing) {
r = -(facing + 90);
}
Improvement:
Added proposed independant Scale X/Y parameters and Translate X/Y parameters. Shapes passed to drawVBL are scaled around the origin (0,0), then rotated around specified point (default: midpoint of bounding rectangle of the shape), then translated by the specified amount. This takes vertex processing out of macro-code, and lets it be handled by MapTool instead.
New parameters for all four shape types are:
- sx, sy: scales the shape by the specified factor, before any rotation is applied. Scaling is relative to the origin (0,0), not to the rotation center (rx,ry).
- tx, ty: translates the shape by the specified distance, after any rotation is applied.
If the community thinks sx,sy should scale around the rotation center, I can provide an alternate patch with this functionality.