[librsvg/rustification] Fix offsets in rsvg_filter_primitive_image_render()
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg/rustification] Fix offsets in rsvg_filter_primitive_image_render()
- Date: Mon, 12 Dec 2016 21:56:53 +0000 (UTC)
commit c24059c74a38d51f2b9b03e4f501534649375d4e
Author: Federico Mena Quintero <federico gnome org>
Date: Mon Dec 12 13:10:15 2016 -0600
Fix offsets in rsvg_filter_primitive_image_render()
feImage filters were rendering completely blank images because the
translation was incorrect.
rsvg-filter.c | 14 +++++---------
1 files changed, 5 insertions(+), 9 deletions(-)
---
diff --git a/rsvg-filter.c b/rsvg-filter.c
index f376f23..fbbd907 100644
--- a/rsvg-filter.c
+++ b/rsvg-filter.c
@@ -3949,8 +3949,6 @@ rsvg_filter_primitive_image_render (RsvgFilterPrimitive * self, RsvgFilterContex
RsvgIRect boundarys;
RsvgFilterPrimitiveImage *upself;
RsvgFilterPrimitiveOutput op;
- int x, y;
-
cairo_surface_t *output, *img;
upself = (RsvgFilterPrimitiveImage *) self;
@@ -3967,21 +3965,19 @@ rsvg_filter_primitive_image_render (RsvgFilterPrimitive * self, RsvgFilterContex
img = rsvg_filter_primitive_image_render_in (self, ctx);
if (img == NULL) {
img = rsvg_filter_primitive_image_render_ext (self, ctx);
- x = y = 0;
- } else {
- x = boundarys.x0;
- y = boundarys.y0;
}
+
if (img) {
cairo_t *cr;
cr = cairo_create (output);
- cairo_set_source_surface (cr, img, x, y);
- cairo_rectangle (cr, 0, 0,
+ cairo_set_source_surface (cr, img, 0, 0);
+ cairo_rectangle (cr,
+ boundarys.x0,
+ boundarys.y0,
boundarys.x1 - boundarys.x0,
boundarys.y1 - boundarys.y0);
cairo_clip (cr);
- cairo_translate (cr, -boundarys.x0, -boundarys.y0);
cairo_paint (cr);
cairo_destroy (cr);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]