[lasem] svg_filter_element: dummy render implementation.



commit e48c637380e8f806566b41026d3199ca03c8243b
Author: Emmanuel Pacaud <emmanuel gnome org>
Date:   Mon Aug 23 21:46:07 2010 +0200

    svg_filter_element: dummy render implementation.

 src/lsmsvgfilterelement.c |   22 ++++++++++++++++++++++
 src/lsmsvgfilterelement.h |    2 ++
 2 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/src/lsmsvgfilterelement.c b/src/lsmsvgfilterelement.c
index 2371d45..b0d214f 100644
--- a/src/lsmsvgfilterelement.c
+++ b/src/lsmsvgfilterelement.c
@@ -22,6 +22,7 @@
 
 #include <lsmsvgfilterelement.h>
 #include <lsmsvgview.h>
+#include <lsmdebug.h>
 
 static GObjectClass *parent_class;
 
@@ -42,6 +43,25 @@ lsm_svg_filter_element_can_append_child (LsmDomNode *self, LsmDomNode *child)
 
 /* LsmSvgElement implementation */
 
+static void
+lsm_svg_filter_element_render (LsmSvgElement *self, LsmSvgView *view)
+{
+	LsmSvgFilterElement *filter = LSM_SVG_FILTER_ELEMENT (self);
+
+	if (!filter->enable_rendering) {
+		lsm_debug ("render", "[LsmSvgFilterElement::render] Direct rendering not allowed");
+		return;
+	} else {
+		filter->enable_rendering = FALSE;
+	}
+}
+
+static void
+lsm_svg_filter_element_enable_rendering (LsmSvgElement *element)
+{
+	LSM_SVG_FILTER_ELEMENT (element)->enable_rendering  = TRUE;
+}
+
 /* LsmSvgGraphic implementation */
 
 /* LsmSvgFilterElement implementation */
@@ -131,6 +151,8 @@ lsm_svg_filter_element_class_init (LsmSvgFilterElementClass *s_rect_class)
 
 	s_element_class->category = LSM_SVG_ELEMENT_CATEGORY_NONE;
 
+	s_element_class->render = lsm_svg_filter_element_render;
+	s_element_class->enable_rendering = lsm_svg_filter_element_enable_rendering;
 	s_element_class->attribute_manager = lsm_attribute_manager_duplicate (s_element_class->attribute_manager);
 
 	lsm_attribute_manager_add_attributes (s_element_class->attribute_manager,
diff --git a/src/lsmsvgfilterelement.h b/src/lsmsvgfilterelement.h
index 0d52ced..95dde8d 100644
--- a/src/lsmsvgfilterelement.h
+++ b/src/lsmsvgfilterelement.h
@@ -46,6 +46,8 @@ struct _LsmSvgFilterElement {
 	LsmSvgLengthAttribute		height;
 	LsmSvgPatternUnitsAttribute	units;
 	LsmSvgPatternUnitsAttribute	primitive_units;
+
+	gboolean enable_rendering;
 };
 
 struct _LsmSvgFilterElementClass {



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