Pattern.setFilter
void setFilter(cairo.types.Filter filter)Sets the filter to be used for resizing when using this pattern. See #cairo_filter_t for details on each filter.
- Note that you might want to control filtering even when you do not
have an explicit #cairo_pattern_t object, (for example when using [cairo.context.Context.setSourceSurface]). In these cases, it is convenient to use [cairo.context.Context.getSource] to get access to the pattern that cairo creates implicitly. For example:
<informalexample><programlisting>cairo_set_source_surface (cr, image, x, y); cairo_pattern_set_filter (cairo_get_source (cr), CAIRO_FILTER_NEAREST);
</programlisting></informalexample>Parameters
filter | a #cairo_filter_t describing the filter to use for resizing the pattern |