Binds the mask slot of a port's graphics state across the execution of a body of code.
graphics-ports
with-graphics-mask (port mask &key mask-x mask-y mask-transform) &body body => result
port⇩ |
A graphics port. |
mask⇩ | nil or a list specifying a shape. |
Integers. These arguments are deprecated. | |
mask-transform⇩ | nil , t , the keyword :dynamic , or a transform. |
body⇩ |
A body of Lisp code. |
result |
The return value of the last form executed in body. |
The macro with-graphics-mask
binds the mask slot of port's graphics-state while evaluating the forms in body as an implicit progn. The mask can be a rectangular area specified by a list of the form (x y width height) or a path specified by a list of the form (:path
path :fill-rule
fill-rule).
mask-x and mask-y are deprecated. They work only when the drawing-mode is :compatible
and the platform is GTK+ or X11/Motif. By default, mask-x and mask-y are both 0.
MASK-TRANSFORM is used to set the mask-transform graphics state parameter. If mask-transform is nil
, then mask will not not transformed. If mask-transform is t
, then mask will be transformed by the current graphics state transform at the time that with-graphics-mask
is used. If mask-transform is :dynamic
, then mask will be transformed by the graphics state transform that is in effect when the drawing operation uses the mask. Otherwise mask-transform should be a transform object. The default value of mask-transform is nil
.
See graphics-state for more details about mask and mask-transform.
This example file demonstrates the use of mask-transform:
(example-edit-file "capi/graphics/paths")
CAPI User Guide and Reference Manual (Unix version) - 01 Dec 2021 19:33:02