Like with-graphics-transform except that it ignores existing transforms.
graphics-ports
with-graphics-transform-reset (port &optional transform) &body body => result
port⇩ |
A graphics port. |
transform⇩ |
A transform. |
body⇩ |
Lisp forms. |
result |
The value returned by the last form of body. |
The macro with-graphics-transform-reset
works the same as with-graphics-transform except that it ignores existing transforms.
If transform is nil
, then body is evaluated without any transform in port (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 (Macintosh version) - 01 Dec 2021 19:31:44