Added May 2018
//SETTRANSFORM,m11,m12,m21,m22,dx,dy
where:
m11,m12,m21,m22 are floating point multipliers
dx,dy specify a reference point in twips (1440/inch)
SETTRANSFORM transforms the coordinate space to rotate, translate, shift or stretch the output.
The effect of this operation is to tranform every point (x1,y1) in the original coordinate space to a new point (x2,y2) based on the following formulas:
x2 = (x1 * m11) + (y1 * m21) + dx
y2 = (x1 * m12) + (y1 * m22) + dy
Note that the transformation is independent of SETMAPMODE and affects all subsequent output, with the exception of METAFILE.
Examples
//;mirror about horizontal axis at y=7920 (5.5" down)
//SETTRANSFORM, 1, 0, 0, -1, 0, 15840
//;mirror about vertical axis at x=6120 (4.25"over)
//SETTRANSFORM, -1, 0, 0, 1, 12240, 0
//;rotate 180 around point 4.25" over, 5.5" down (8.5x11 center)
//SETTRANSFORM, -1, 0, 0, -1, 12240, 15840
//;shrink horiz 25%, stretch vert 50%, shift down 1" and right .5"
//SETTRANSFORM, 0.75, 0, 0, 1.5, 720, 1440
History
2018 May, A-Shell 6.5.1635: Add function to A-Shell