[evolution/rendering-cleanup: 12/97] e-text: Remove stippling code



commit c4b2f13f8ddc3dea95065a07fcc79e1df61ba1b6
Author: Benjamin Otte <otte redhat com>
Date:   Sat Oct 9 02:50:57 2010 +0200

    e-text: Remove stippling code

 widgets/text/e-text.c |   46 ----------------------------------------------
 widgets/text/e-text.h |    2 --
 2 files changed, 0 insertions(+), 48 deletions(-)
---
diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c
index 9d33421..9d9a113 100644
--- a/widgets/text/e-text.c
+++ b/widgets/text/e-text.c
@@ -94,7 +94,6 @@ enum {
 	PROP_FILL_COLOR,
 	PROP_FILL_COLOR_GDK,
 	PROP_FILL_COLOR_RGBA,
-	PROP_FILL_STIPPLE,
 	PROP_TEXT_WIDTH,
 	PROP_TEXT_HEIGHT,
 	PROP_EDITABLE,
@@ -230,10 +229,6 @@ e_text_dispose (GObject *object)
 	g_free (text->revert);
 	text->revert = NULL;
 
-	if (text->stipple)
-		g_object_unref (text->stipple);
-	text->stipple = NULL;
-
 	if (text->timeout_id) {
 		g_source_remove (text->timeout_id);
 		text->timeout_id = 0;
@@ -664,26 +659,6 @@ set_text_gc_foreground (EText *text)
 	gdk_gc_set_foreground (text->gc, &text->color);
 }
 
-/* Sets the stipple pattern for the text */
-static void
-set_stipple (EText *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);
-	}
-}
-
 /* Set_arg handler for the text item */
 static void
 e_text_set_property (GObject *object,
@@ -881,12 +856,6 @@ e_text_set_property (GObject *object,
 		color_changed = TRUE;
 		break;
 
-	case PROP_FILL_STIPPLE:
-		set_stipple (text, g_value_get_object (value), FALSE);
-		text->needs_redraw = 1;
-		needs_update = 1;
-		break;
-
 	case PROP_EDITABLE:
 		text->editable = g_value_get_boolean (value);
 		text->needs_redraw = 1;
@@ -1108,10 +1077,6 @@ e_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->width / text->item.canvas->pixels_per_unit);
 		break;
@@ -1235,7 +1200,6 @@ e_text_update (GnomeCanvasItem *item, gdouble *affine, ArtSVP *clip_path, gint f
 	if ( text->needs_recalc_bounds
 	     || (flags & GNOME_CANVAS_UPDATE_AFFINE)) {
                 set_text_gc_foreground (text);
-                set_stipple (text, text->stipple, TRUE);
                 get_bounds (text, &x1, &y1, &x2, &y2);
                 if ( item->x1 != x1 ||
                      item->x2 != x2 ||
@@ -1574,9 +1538,6 @@ e_text_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
 	if (!pango_layout_get_text (text->layout))
 		return;
 
-	if (text->stipple)
-		gnome_canvas_set_stipple_origin (item->canvas, main_gc);
-
 	xpos = text->text_cx;
 	ypos = text->text_cy;
 
@@ -3490,13 +3451,6 @@ e_text_class_init (ETextClass *klass)
 							    0, G_MAXUINT, 0,
 							    G_PARAM_READWRITE));
 
-	g_object_class_install_property (gobject_class, PROP_FILL_STIPPLE,
-					 g_param_spec_object ("fill_stipple",
-							      "Fill stipple",
-							      "Fill stipple",
-							      GDK_TYPE_DRAWABLE,
-							      G_PARAM_READWRITE));
-
 	g_object_class_install_property (gobject_class, PROP_TEXT_WIDTH,
 					 g_param_spec_double ("text_width",
 							      "Text width",
diff --git a/widgets/text/e-text.h b/widgets/text/e-text.h
index bed5ff9..c63445f 100644
--- a/widgets/text/e-text.h
+++ b/widgets/text/e-text.h
@@ -66,7 +66,6 @@ G_BEGIN_DECLS
  * justification	GtkJustification	RW		Justification for multiline text
  * fill_color		string			W		X color specification for text
  * fill_color_gdk	GdkColor*		RW		Pointer to an allocated GdkColor
- * fill_stipple		GdkBitmap*		RW		Stipple pattern for filling the text
  * clip_width		gdouble			RW		Width of clip rectangle
  * clip_height		gdouble			RW		Height of clip rectangle
  * clip			boolean			RW		Use clipping rectangle?
@@ -123,7 +122,6 @@ struct _EText {
 	gdouble xofs, yofs;		/* Text offset distance from anchor position */
 
 	GdkColor color;		/* Fill color */
-	GdkBitmap *stipple;		/* Stipple for text */
 	GdkGC *gc;			/* GC for drawing text */
 
 	gint cx, cy;			/* Top-left canvas coordinates for text */



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