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

NextPrevUpTopContentsIndex

with-graphics-transform-reset

Macro
Summary

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

Signature

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

Arguments

port

A graphics port.

transform

A 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 the argument transform is nil, the body is applied without transform (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 (Unix version) - 25 Feb 2015

NextPrevUpTopContentsIndex