mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-09 00:40:22 +01:00
Add example to documentation of cairo_pattern_set_filter
It's helpful to let the reade know about cairo_get_source here.
This commit is contained in:
parent
cd26fa266b
commit
e48d7ca802
1 changed files with 11 additions and 0 deletions
|
|
@ -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:
|
||||
*
|
||||
* <informatlexample><programlisting>
|
||||
* cairo_set_source_surface (cr, image, x, y);
|
||||
* cairo_pattern_set_filter (cairo_get_source (cr), CAIRO_FILTER_NEAREST);
|
||||
* </programlisting></informatlexample>
|
||||
**/
|
||||
void
|
||||
cairo_pattern_set_filter (cairo_pattern_t *pattern, cairo_filter_t filter)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue