[lasem] svg_gradient: manually render childs instead of using the default implementation.



commit f0846d0b88e5d44a0ceb56231d25d3094ebfd7d5
Author: Emmanuel Pacaud <emmanuel gnome org>
Date:   Fri Aug 13 11:24:16 2010 +0200

    svg_gradient: manually render childs instead of using the default implementation.
    
    The default one may trigger a push_group we don't want.

 src/lsmsvglineargradientelement.c |    5 ++++-
 src/lsmsvgradialgradientelement.c |    5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/lsmsvglineargradientelement.c b/src/lsmsvglineargradientelement.c
index 5e7cc6d..d11fa97 100644
--- a/src/lsmsvglineargradientelement.c
+++ b/src/lsmsvglineargradientelement.c
@@ -116,6 +116,7 @@ lsm_svg_linear_gradient_element_render (LsmSvgElement *self, LsmSvgView *view)
 {
 	LsmSvgLinearGradientElement *gradient = LSM_SVG_LINEAR_GRADIENT_ELEMENT (self);
 	LsmSvgLinearGradientElement *referenced_gradient;
+	LsmDomNode *node;
 	gboolean is_object_bounding_box;
 	double x1, x2, y1, y2;
 
@@ -172,7 +173,9 @@ lsm_svg_linear_gradient_element_render (LsmSvgElement *self, LsmSvgView *view)
 					      gradient->units.value,
 					      &gradient->transform.matrix);
 
-	LSM_SVG_ELEMENT_CLASS (parent_class)->render (LSM_SVG_ELEMENT (referenced_gradient), view);
+	for (node = LSM_DOM_NODE (referenced_gradient)->first_child; node != NULL; node = node->next_sibling)
+		if (LSM_IS_SVG_ELEMENT (node))
+		    lsm_svg_element_render (LSM_SVG_ELEMENT (node), view);
 }
 
 static void
diff --git a/src/lsmsvgradialgradientelement.c b/src/lsmsvgradialgradientelement.c
index bc23c1e..b17160c 100644
--- a/src/lsmsvgradialgradientelement.c
+++ b/src/lsmsvgradialgradientelement.c
@@ -129,6 +129,7 @@ lsm_svg_radial_gradient_element_render (LsmSvgElement *self, LsmSvgView *view)
 {
 	LsmSvgRadialGradientElement *gradient = LSM_SVG_RADIAL_GRADIENT_ELEMENT (self);
 	LsmSvgRadialGradientElement *referenced_gradient;
+	LsmDomNode *node;
 	gboolean is_object_bounding_box;
 	double cx, cy, fx, fy, r;
 	double gradient_radius;
@@ -216,7 +217,9 @@ lsm_svg_radial_gradient_element_render (LsmSvgElement *self, LsmSvgView *view)
 					      gradient->units.value,
 					      &gradient->transform.matrix);
 
-	LSM_SVG_ELEMENT_CLASS (parent_class)->render (LSM_SVG_ELEMENT (referenced_gradient), view);
+	for (node = LSM_DOM_NODE (referenced_gradient)->first_child; node != NULL; node = node->next_sibling)
+		if (LSM_IS_SVG_ELEMENT (node))
+		    lsm_svg_element_render (LSM_SVG_ELEMENT (node), view);
 }
 
 static void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]