Like with-graphics-transform except that it ignores existing transforms.
The macro with-graphics-transform-reset
works the same as with-graphics-transform except that it ignores existing transforms.
If the argument
transform
is nil
, the
body
is applied without transform (that is, with the unit transform).
This form ignores the translation, and applies only the explicit transform (which is really just scale), so that the overall effect is to draw a 30x20 rectangle at (0,0).
(gp:with-graphics-translation (port 100 100)
(gp:with-graphics-transform-reset (port (gp:make-transform 3 0 0 2 0 0 ))
(gp:draw-rectangle port 0 0 10 10)))
Compare with using with-graphics-transform, which applies both the translation and the explicit transform, so that the overall effect is to draw a rectangle 30x20 at (100,100).
(gp:with-graphics-translation (port 100 100)
(gp:with-graphics-transform (port (gp:make-transform 3 0 0 2 0 0 ))
(gp:draw-rectangle port 0 0 10 10)))
CAPI User Guide and Reference Manual (Unix version) - 25 Feb 2015