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

NextPrevUpTopContentsIndex

with-graphics-mask

Macro
Summary

Binds the mask slot of a port's graphics state across the execution of a body of code.

Package

graphics-ports

Signature
with-graphics-mask (port
 mask
 &key mask-x
 mask-y
 mask-transform
) &body body
 => result
Arguments

port

A graphics port.

mask

nil or a list specifying a shape.

mask-x

An integer. This argument is deprecated.

mask-y

An integer. This argument is deprecated.

mask-transform

nil, t, the keyword :dynamic, or a transform.

body

A body of Lisp code.

Values

result

The return value of the last form executed in body .

Description

The macro with-graphics-mask binds the mask slot of port 's graphics-state while evaluating body . 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.

The mask-transform argument is used to set the mask-transform graphics state parameter. If mask-transform is nil, then the mask is not transformed. If mask-transform is t, then the mask is transformed by the current graphics state transform at the time that with-graphics-mask is used. If mask-transform is :dynamic, then the mask is 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 the mask-transform argument is nil.

Notes

See graphics-state for more details about mask and mask-transform .

Examples

This example file demonstrates the use of mask-transform :

(example-edit-file "capi/graphics/paths")
See also

graphics-state
Graphics state


CAPI User Guide and Reference Manual (Windows version) - 3 Aug 2017

NextPrevUpTopContentsIndex