All Manuals > CAPI User Guide and Reference Manual > 22 GRAPHICS-PORTS Reference Entries

with-graphics-transform-reset Macro

Summary

Like with-graphics-transform except that it ignores existing transforms.

Package

graphics-ports

Signature

with-graphics-transform-reset (port &optional transform) &body body => result

Arguments
port
A graphics port.
transform
body
Lisp forms.
Values
result
The value returned by the last form of body.
Description

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).

Examples

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)))
See also

with-graphics-post-translation
with-graphics-transform


CAPI User Guide and Reference Manual (Macintosh version) - 01 Dec 2021 19:31:44