Package: cairo

Function cairo:pattern-filter

Lambda List

cairo:pattern-filter (pattern)

Syntax

(cairo:pattern-filter pattern) => filter
(setf (cairo:filter-extend pattern) filter)

Arguments

pattern -- a cairo:pattern-t instance
filter -- a cairo:filter-t value describing the filter to use for resizing the pattern

Details

The cairo:pattern-filter function gets the current filter for pattern. The (setf cairo:pattern-filter) function sets the filter to be used for resizing when using the pattern. See the cairo:filter-t enumeration for details on each filter.

Note that you might want to control filtering even when you do not have an explicit cairo:pattern-t instance, for example when using the cairo:set-source-surface function. In these cases, it is convenient to use the cairo:source function to get access to the pattern that Cairo creates implicitly. For example:
(cairo:set-source-surface context image x y)
(setf (cairo:pattern-filter (cairo:source cr)) :nearest)  
 

See also

2025-1-14