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

with-transformed-rect Macro

Summary

Transforms the coordinates of a rectangle and binds them to variables while executing a body of code.

Package

graphics-ports

Signature

with-transformed-rect (nx1 ny1 nx2 ny2 port x1 y1 x2 y2) &body body => result

Arguments
nx1
A variable.
ny1
A variable.
nx2
A variable.
ny2
A variable.
port
A graphics port.
x1
A real number.
y1
A real number.
x2
A real number.
y2
A real number.
body
A body of Lisp code.
Values
result
The return value of the last form executed in body.
Description

The macro with-transformed-rect transforms the coordinates of a rectangle and binds them to four variables for the duration of the macro's body.

During the evaluation of the forms in body, the two points (x1, y1) and (x2, y2) are transformed by the current transform of port and the resulting values are bound to the variables nx1, ny1, nx2 and ny2.


CAPI User Guide and Reference Manual (Windows version) - 01 Dec 2021 19:34:15