From e48d7ca802acba300aee99def0eb01727fe2f58a Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Mon, 28 Jan 2008 16:11:39 -0800 Subject: [PATCH] Add example to documentation of cairo_pattern_set_filter It's helpful to let the reade know about cairo_get_source here. --- src/cairo-pattern.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/cairo-pattern.c b/src/cairo-pattern.c index ccd762239..62f75aa14 100644 --- a/src/cairo-pattern.c +++ b/src/cairo-pattern.c @@ -1050,6 +1050,17 @@ cairo_pattern_get_matrix (cairo_pattern_t *pattern, cairo_matrix_t *matrix) * * 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_set_source_surface()). In these cases, it is convenient to + * use cairo_get_source() to get access to the pattern that cairo + * creates implicitly. For example: + * + * + * cairo_set_source_surface (cr, image, x, y); + * cairo_pattern_set_filter (cairo_get_source (cr), CAIRO_FILTER_NEAREST); + * **/ void cairo_pattern_set_filter (cairo_pattern_t *pattern, cairo_filter_t filter)