gnome-canvas: Remove stipple properties from GnomeCanvasText

This commit is contained in:
Benjamin Otte
2010-10-08 16:18:25 +02:00
committed by Matthew Barnes
parent ffbb0df5f8
commit 35fc4eda52
2 changed files with 0 additions and 45 deletions

View File

@ -90,7 +90,6 @@ enum {
PROP_FILL_COLOR,
PROP_FILL_COLOR_GDK,
PROP_FILL_COLOR_RGBA,
PROP_FILL_STIPPLE,
/* Rendered size accessors */
PROP_TEXT_WIDTH,
@ -432,12 +431,6 @@ gnome_canvas_text_class_init (GnomeCanvasTextClass *class)
"Text color, as an R/G/B/A combined integer",
0, G_MAXUINT, 0,
(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,
@ -567,10 +560,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);
}
@ -636,26 +625,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)
{
@ -970,10 +939,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;
@ -1184,10 +1149,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;
@ -1317,7 +1278,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,
@ -1381,9 +1341,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)

View File

@ -88,7 +88,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 ())
@ -114,7 +113,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 */