with-pixmap-graphics-port ( port pane width height &key background collect relative clear drawing-mode ) &body body ) => result
A graphics port.
An output pane.
An integer.
An integer.
A color keyword.
A boolean.
A boolean.
A list or t
.
One of the keywords :compatible
and :quality
.
A body of Lisp code.
The macro with-pixmap-graphics-port
binds
port
to a new pixmap graphics-port.
pane
and the other arguments are passed to create-pixmap-port. The
body
is then evaluated. The port is destroyed when
body
returns.
The background and foreground default to the values in the graphics state of pane .
In the code below the background in p2 inherits from p1 , so it draws two green rectangles.
(let ((op (capi:contain
(make-instance 'capi:output-pane
:background :red))))
(sleep 0.1)
(gp:with-pixmap-graphics-port (p1 op 20 30
:background :green
:clear t)
(gp:with-pixmap-graphics-port (p2 p1 20 30 :clear t)
(gp:copy-pixels op p1 10 10 20 30 0 0)
(gp:copy-pixels op p2 10 60 20 30 0 0))))
CAPI User Guide and Reference Manual (Unix version) - 25 Feb 2015