[evolution/rendering-cleanup: 9/63] gnome-canvas: Remove stipple properties from GnomeCanvasText



commit 20bed998fc59c3d1fb84d91c2786e2dd002c4e6e
Author: Benjamin Otte <otte redhat com>
Date:   Fri Oct 8 16:18:25 2010 +0200

    gnome-canvas: Remove stipple properties from GnomeCanvasText

 libgnomecanvas/gnome-canvas-text.c |   43 ------------------------------------
 libgnomecanvas/gnome-canvas-text.h |    2 -
 2 files changed, 0 insertions(+), 45 deletions(-)
---
diff --git a/libgnomecanvas/gnome-canvas-text.c b/libgnomecanvas/gnome-canvas-text.c
index e1d996e..2c4663f 100644
--- a/libgnomecanvas/gnome-canvas-text.c
+++ b/libgnomecanvas/gnome-canvas-text.c
@@ -91,7 +91,6 @@ enum {
 	PROP_FILL_COLOR,
 	PROP_FILL_COLOR_GDK,
 	PROP_FILL_COLOR_RGBA,
-	PROP_FILL_STIPPLE,
 
 	/* Rendered size accessors */
 	PROP_TEXT_WIDTH,
@@ -442,12 +441,6 @@ gnome_canvas_text_class_init (GnomeCanvasTextClass *class)
 				    (G_PARAM_READABLE | G_PARAM_WRITABLE)));
         g_object_class_install_property
                 (gobject_class,
-                 PROP_FILL_STIPPLE,
-                 g_param_spec_object ("fill_stipple", NULL, NULL,
-                                      GDK_TYPE_DRAWABLE,
-                                      (G_PARAM_READABLE | G_PARAM_WRITABLE)));
-        g_object_class_install_property
-                (gobject_class,
                  PROP_TEXT_WIDTH,
                  g_param_spec_double ("text_width",
 				      "Text width",
@@ -576,10 +569,6 @@ gnome_canvas_text_destroy (GnomeCanvasItem *object)
 		pango_attr_list_unref (text->attr_list);
 	text->attr_list = NULL;
 
-	if (text->stipple)
-		g_object_unref (text->stipple);
-	text->stipple = NULL;
-
 	if (text->priv && text->priv->bitmap.buffer) {
 		g_free (text->priv->bitmap.buffer);
 	}
@@ -695,26 +684,6 @@ set_text_gc_foreground (GnomeCanvasText *text)
 	gdk_gc_set_foreground (text->gc, &c);
 }
 
-/* Sets the stipple pattern for the text */
-static void
-set_stipple (GnomeCanvasText *text, GdkBitmap *stipple, gint reconfigure)
-{
-	if (text->stipple && !reconfigure)
-		g_object_unref (text->stipple);
-
-	text->stipple = stipple;
-	if (stipple && !reconfigure)
-		g_object_ref (stipple);
-
-	if (text->gc) {
-		if (stipple) {
-			gdk_gc_set_stipple (text->gc, stipple);
-			gdk_gc_set_fill (text->gc, GDK_STIPPLED);
-		} else
-			gdk_gc_set_fill (text->gc, GDK_SOLID);
-	}
-}
-
 static PangoFontMask
 get_property_font_set_mask (guint prop_id)
 {
@@ -1033,10 +1002,6 @@ gnome_canvas_text_set_property (GObject            *object,
 		text->priv->render_dirty = 1;
 		break;
 
-	case PROP_FILL_STIPPLE:
-		set_stipple (text, (GdkBitmap *)g_value_get_object (value), FALSE);
-		break;
-
 	default:
 		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
 		break;
@@ -1251,10 +1216,6 @@ gnome_canvas_text_get_property (GObject            *object,
 		g_value_set_uint (value, text->rgba);
 		break;
 
-	case PROP_FILL_STIPPLE:
-		g_value_set_object (value, text->stipple);
-		break;
-
 	case PROP_TEXT_WIDTH:
 		g_value_set_double (value, text->max_width / text->item.canvas->pixels_per_unit);
 		break;
@@ -1384,7 +1345,6 @@ gnome_canvas_text_update (GnomeCanvasItem *item,
 		(* parent_class->update) (item, affine, clip_path, flags);
 
 	set_text_gc_foreground (text);
-	set_stipple (text, text->stipple, TRUE);
 	get_bounds (text, &x1, &y1, &x2, &y2);
 
 	gnome_canvas_update_bbox (item,
@@ -1448,9 +1408,6 @@ gnome_canvas_text_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
 		gdk_gc_set_clip_rectangle (text->gc, &rect);
 	}
 
-	if (text->stipple)
-		gnome_canvas_set_stipple_origin (item->canvas, text->gc);
-
 	gdk_draw_layout (drawable, text->gc, text->cx - x, text->cy - y, text->layout);
 
 	if (text->clip)
diff --git a/libgnomecanvas/gnome-canvas-text.h b/libgnomecanvas/gnome-canvas-text.h
index 64eda6a..e5f5cf4 100644
--- a/libgnomecanvas/gnome-canvas-text.h
+++ b/libgnomecanvas/gnome-canvas-text.h
@@ -89,7 +89,6 @@ G_BEGIN_DECLS
  * fill_color		string			 W		X color specification for text
  * fill_color_gdk	GdkColor*		RW		Pointer to an allocated GdkColor
  * fill_color_rgba	guint			RW		RGBA value used for AA color.
- * fill_stipple		GdkBitmap*		RW		Stipple pattern for filling the text
  */
 
 #define GNOME_TYPE_CANVAS_TEXT            (gnome_canvas_text_get_type ())
@@ -115,7 +114,6 @@ struct _GnomeCanvasText {
 	gdouble         scale;
 
 	gchar *text;			/* Text to display */
-	GdkBitmap *stipple;		/* Stipple for text */
 	GdkGC *gc;			/* GC for drawing text */
         PangoLayout *layout;            /* The PangoLayout containing the text */
 



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