diff options
author | Søren Sandmann Pedersen <ssp@redhat.com> | 2012-09-30 14:39:47 -0400 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@redhat.com> | 2012-09-30 14:39:47 -0400 |
commit | 10fa14d84e365c7f4c951153bd67b54d8a8cf9e5 (patch) | |
tree | a3784bf6ab697bae72a99a7f0d0ae86dc550f396 | |
parent | 60717697a4a13184db28d192b8f46d3caad41847 (diff) |
Set gradient properties
-rw-r--r-- | src/cairo-pixman-surface.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/cairo-pixman-surface.c b/src/cairo-pixman-surface.c index 757d2353..67350dad 100644 --- a/src/cairo-pixman-surface.c +++ b/src/cairo-pixman-surface.c @@ -340,12 +340,14 @@ cairo_pixman_surface_get_font_options (void *abstract_surface, } static void -set_properties (pixman_image_t *image, cairo_pattern_t *pattern) +set_properties (pixman_image_t *image, cairo_pattern_t *pattern, cairo_matrix_t *matrix) { - cairo_matrix_t *matrix = &(pattern->matrix); pixman_transform_t transform; pixman_filter_t filter; pixman_repeat_t repeat; + + if (!matrix) + matrix = &(pattern->matrix); /* Transform */ transform.matrix[0][0] = _cairo_fixed_16_16_from_double (matrix->xx); @@ -531,7 +533,7 @@ pimage_from_surface_pattern (cairo_surface_pattern_t *pattern, pixman_image_set_destroy_function (*result, clean_up_acquire, info); /* Then set the right properties on the clone */ - set_properties (*result, (cairo_pattern_t *)pattern); + set_properties (*result, (cairo_pattern_t *)pattern, NULL); out: if (status != CAIRO_INT_STATUS_SUCCESS) @@ -595,6 +597,8 @@ pimage_from_gradient_pattern (const cairo_gradient_pattern_t *pattern, pixman_im } } + set_properties (*image, (cairo_pattern_t *)pattern, &matrix); + free (pstops); return status; @@ -705,7 +709,7 @@ pimage_from_raster_source_pattern (cairo_pixman_surface_t *psurface pixman_image_set_destroy_function ( *result, raster_source_clean_up, info); - set_properties (*result, (cairo_pattern_t *)pattern); + set_properties (*result, (cairo_pattern_t *)pattern, NULL); return CAIRO_INT_STATUS_SUCCESS; } |