[goffice] don't fill a shape with no filling



commit e3e7c99b6a4b9969d693c9bc420246725b6b9402
Author: Jean Brefort <jean brefort normalesup org>
Date:   Thu Sep 3 11:35:33 2009 +0200

    don't fill a shape with no filling

 ChangeLog                        |    5 +++++
 goffice/utils/go-styled-object.c |    2 ++
 2 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index bc17c4b..acd8163 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2009-09-03  Jean Brefort  <jean brefort normalesup org>
 
+	* goffice/utils/go-styled-object.c
+	(go_styled_object_set_cairo_fill): return FALSE when type is FILL_NONE.
+
+2009-09-03  Jean Brefort  <jean brefort normalesup org>
+
 	* goffice/graph/gog-axis-line.c (gog_axis_base_init_style): fixed some
 	issues with auto styles.
 	* goffice/graph/gog-axis.c (gog_axis_init_style): ditto.
diff --git a/goffice/utils/go-styled-object.c b/goffice/utils/go-styled-object.c
index f43c04a..4036c13 100644
--- a/goffice/utils/go-styled-object.c
+++ b/goffice/utils/go-styled-object.c
@@ -204,6 +204,8 @@ go_styled_object_set_cairo_fill (GOStyledObject const *so, cairo_t *cr)
 
 	g_return_val_if_fail (GO_IS_STYLED_OBJECT (so), FALSE);
 	style = go_styled_object_get_style (GO_STYLED_OBJECT (so));
+	if (style->fill.type == GO_STYLE_FILL_NONE)
+		return FALSE;
 	pat = go_style_create_cairo_pattern (style, cr);
 	if (pat) {
 		cairo_set_source (cr, pat);



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