aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libgnomecanvas/gnome-canvas-line.c67
-rw-r--r--libgnomecanvas/gnome-canvas-shape.c102
-rw-r--r--libgnomecanvas/gnome-canvas-text.c46
-rw-r--r--libgnomecanvas/gnome-canvas-util.c13
-rw-r--r--libgnomecanvas/gnome-canvas.c176
-rw-r--r--libgnomecanvas/gnome-canvas.h29
-rw-r--r--widgets/misc/e-canvas-background.c7
-rw-r--r--widgets/text/e-text.c39
8 files changed, 85 insertions, 394 deletions
diff --git a/libgnomecanvas/gnome-canvas-line.c b/libgnomecanvas/gnome-canvas-line.c
index a55b298beb..7488eff9de 100644
--- a/libgnomecanvas/gnome-canvas-line.c
+++ b/libgnomecanvas/gnome-canvas-line.c
@@ -801,8 +801,7 @@ gnome_canvas_line_set_property (GObject *object,
line->fill_pixel = gnome_canvas_get_color_pixel (item->canvas,
line->fill_rgba);
- if (!item->canvas->aa)
- set_line_gc_foreground (line);
+ set_line_gc_foreground (line);
gnome_canvas_item_request_redraw_svp (item, line->fill_svp);
@@ -1011,11 +1010,6 @@ static void
gnome_canvas_line_update (GnomeCanvasItem *item, gdouble *affine, ArtSVP *clip_path, gint flags)
{
GnomeCanvasLine *line;
- gint i;
- ArtVpath *vpath;
- ArtPoint pi, pc;
- gdouble width;
- ArtSVP *svp;
gdouble x1, y1, x2, y2;
line = GNOME_CANVAS_LINE (item);
@@ -1025,61 +1019,12 @@ gnome_canvas_line_update (GnomeCanvasItem *item, gdouble *affine, ArtSVP *clip_p
reconfigure_arrows (line);
- if (item->canvas->aa) {
- gnome_canvas_item_reset_bounds (item);
-
- vpath = art_new (ArtVpath, line->num_points + 2);
-
- for (i = 0; i < line->num_points; i++) {
- pi.x = line->coords[i * 2];
- pi.y = line->coords[i * 2 + 1];
- art_affine_point (&pc, &pi, affine);
- vpath[i].code = i == 0 ? ART_MOVETO : ART_LINETO;
- vpath[i].x = pc.x;
- vpath[i].y = pc.y;
- }
- vpath[i].code = ART_END;
- vpath[i].x = 0;
- vpath[i].y = 0;
-
- if (line->width_pixels)
- width = line->width;
- else
- width = line->width * art_affine_expansion (affine);
+ set_line_gc_foreground (line);
+ set_line_gc_width (line);
+ set_stipple (line, line->stipple, TRUE);
- if (width < 0.5)
- width = 0.5;
-
- svp = art_svp_vpath_stroke (vpath,
- gnome_canvas_join_gdk_to_art (line->join),
- gnome_canvas_cap_gdk_to_art (line->cap),
- width,
- 4,
- 0.25);
- art_free (vpath);
-
- gnome_canvas_item_update_svp_clip (item, &line->fill_svp, svp, clip_path);
-
- if (line->first_arrow && line->first_coords) {
- svp = svp_from_points (line->first_coords, NUM_ARROW_POINTS, affine);
- gnome_canvas_item_update_svp_clip (item,
- &line->first_svp, svp, clip_path);
- }
-
- if (line->last_arrow && line->last_coords) {
- svp = svp_from_points (line->last_coords, NUM_ARROW_POINTS, affine);
- gnome_canvas_item_update_svp_clip (item,
- &line->last_svp, svp, clip_path);
- }
-
- } else {
- set_line_gc_foreground (line);
- set_line_gc_width (line);
- set_stipple (line, line->stipple, TRUE);
-
- get_bounds_canvas (line, &x1, &y1, &x2, &y2, affine);
- gnome_canvas_update_bbox (item, x1, y1, x2, y2);
- }
+ get_bounds_canvas (line, &x1, &y1, &x2, &y2, affine);
+ gnome_canvas_update_bbox (item, x1, y1, x2, y2);
}
static void
diff --git a/libgnomecanvas/gnome-canvas-shape.c b/libgnomecanvas/gnome-canvas-shape.c
index b1154975b2..fa8a4bad7b 100644
--- a/libgnomecanvas/gnome-canvas-shape.c
+++ b/libgnomecanvas/gnome-canvas-shape.c
@@ -335,12 +335,8 @@ gnome_canvas_shape_set_property (GObject *object,
shape = GNOME_CANVAS_SHAPE (object);
priv = shape->priv;
- if (!item->canvas->aa) {
- gcbp_ensure_gdk (shape);
- gdk = priv->gdk;
- } else {
- gdk = NULL;
- }
+ gcbp_ensure_gdk (shape);
+ gdk = priv->gdk;
switch (param_id) {
case PROP_FILL_COLOR:
@@ -544,18 +540,12 @@ gnome_canvas_shape_get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
- GnomeCanvasItem *item = GNOME_CANVAS_ITEM (object);
GnomeCanvasShape *shape = GNOME_CANVAS_SHAPE (object);
GnomeCanvasShapePriv *priv = shape->priv;
GnomeCanvasShapePrivGdk *gdk;
- if (!item->canvas->aa) {
- gcbp_ensure_gdk (shape);
- gdk = priv->gdk;
- }
- else {
- gdk = NULL;
- }
+ gcbp_ensure_gdk (shape);
+ gdk = priv->gdk;
switch (param_id) {
case PROP_FILL_COLOR_GDK:
@@ -636,26 +626,23 @@ static void
gnome_canvas_shape_realize (GnomeCanvasItem *item)
{
GnomeCanvasShape *shape;
+ GtkLayout *layout;
+ GdkWindow *bin_window;
shape = GNOME_CANVAS_SHAPE (item);
if (parent_class->realize)
(* parent_class->realize) (item);
- if (!item->canvas->aa) {
- GtkLayout *layout;
- GdkWindow *bin_window;
-
- gcbp_ensure_gdk (shape);
+ gcbp_ensure_gdk (shape);
- layout = GTK_LAYOUT (item->canvas);
- bin_window = gtk_layout_get_bin_window (layout);
+ layout = GTK_LAYOUT (item->canvas);
+ bin_window = gtk_layout_get_bin_window (layout);
- g_assert (bin_window != NULL);
+ g_assert (bin_window != NULL);
- shape->priv->gdk->fill_gc = gdk_gc_new (bin_window);
- shape->priv->gdk->outline_gc = gdk_gc_new (bin_window);
- }
+ shape->priv->gdk->fill_gc = gdk_gc_new (bin_window);
+ shape->priv->gdk->outline_gc = gdk_gc_new (bin_window);
}
static void
@@ -665,15 +652,13 @@ gnome_canvas_shape_unrealize (GnomeCanvasItem *item)
shape = GNOME_CANVAS_SHAPE (item);
- if (!item->canvas->aa) {
- g_assert (shape->priv->gdk != NULL);
+ g_assert (shape->priv->gdk != NULL);
- g_object_unref (shape->priv->gdk->fill_gc);
- shape->priv->gdk->fill_gc = NULL;
+ g_object_unref (shape->priv->gdk->fill_gc);
+ shape->priv->gdk->fill_gc = NULL;
- g_object_unref (shape->priv->gdk->outline_gc);
- shape->priv->gdk->outline_gc = NULL;
- }
+ g_object_unref (shape->priv->gdk->outline_gc);
+ shape->priv->gdk->outline_gc = NULL;
if (parent_class->unrealize)
(* parent_class->unrealize) (item);
@@ -839,8 +824,6 @@ gnome_canvas_shape_update_gdk (GnomeCanvasShape * shape, gdouble * affine, ArtSV
gboolean bbox_set = FALSE;
gint width = 0; /* silence gcc */
- g_assert (!((GnomeCanvasItem *) shape)->canvas->aa);
-
priv = shape->priv;
gdk = priv->gdk;
g_assert (gdk != NULL);
@@ -1085,11 +1068,6 @@ gnome_canvas_shape_update (GnomeCanvasItem *item, gdouble *affine, ArtSVP *clip_
/* Outline width */
shape->priv->scale = art_affine_expansion (affine);
- /* Reset bbox */
- if (item->canvas->aa) {
- gnome_canvas_item_reset_bounds (item);
- }
-
/* Clipped fill SVP */
if ((priv->fill_set) && (priv->path) && (gnome_canvas_path_def_any_closed (priv->path))) {
@@ -1119,20 +1097,12 @@ gnome_canvas_shape_update (GnomeCanvasItem *item, gdouble *affine, ArtSVP *clip_
svp2 = art_svp_writer_rewind_reap (swr);
art_svp_free (svp);
- if (item->canvas->aa) {
- /* Update clipped path */
- gnome_canvas_item_update_svp_clip (item,
- &shape->priv->fill_svp,
- svp2,
- clip_path);
- } else {
- if (priv->fill_svp) {
- art_svp_free (priv->fill_svp);
- priv->fill_svp = NULL;
- }
- /* No clipping */
- shape->priv->fill_svp = svp2;
- }
+ if (priv->fill_svp) {
+ art_svp_free (priv->fill_svp);
+ priv->fill_svp = NULL;
+ }
+ /* No clipping */
+ shape->priv->fill_svp = svp2;
}
if (priv->outline_set && priv->path && !gnome_canvas_path_def_is_empty (priv->path)) {
@@ -1177,24 +1147,16 @@ gnome_canvas_shape_update (GnomeCanvasItem *item, gdouble *affine, ArtSVP *clip_
0.25);
art_free (vpath);
- if (item->canvas->aa) {
- /* Update clipped */
- gnome_canvas_item_update_svp_clip (item, &priv->outline_svp, svp, clip_path);
- } else {
- if (priv->outline_svp) {
- art_svp_free (priv->outline_svp);
- priv->outline_svp = NULL;
- }
- /* No clipping (yet) */
- shape->priv->outline_svp = svp;
- }
+ if (priv->outline_svp) {
+ art_svp_free (priv->outline_svp);
+ priv->outline_svp = NULL;
+ }
+ /* No clipping (yet) */
+ shape->priv->outline_svp = svp;
}
/* Gdk requires additional handling */
-
- if (!item->canvas->aa) {
- gnome_canvas_shape_update_gdk (shape, affine, clip_path, flags);
- }
+ gnome_canvas_shape_update_gdk (shape, affine, clip_path, flags);
}
static double
@@ -1307,8 +1269,6 @@ set_stipple (GdkGC *gc, GdkBitmap **internal_stipple, GdkBitmap *stipple, gint r
static void
gcbp_ensure_gdk (GnomeCanvasShape * shape)
{
- g_assert (!((GnomeCanvasItem *) shape)->canvas->aa);
-
if (!shape->priv->gdk) {
GnomeCanvasShapePrivGdk * gdk;
@@ -1343,8 +1303,6 @@ gcbp_destroy_gdk (GnomeCanvasShape * shape)
{
GnomeCanvasShapePrivGdk * gdk;
- g_assert (!((GnomeCanvasItem *)shape)->canvas->aa);
-
gdk = shape->priv->gdk;
if (gdk) {
diff --git a/libgnomecanvas/gnome-canvas-text.c b/libgnomecanvas/gnome-canvas-text.c
index 7b3dd0695b..16cc3f78ab 100644
--- a/libgnomecanvas/gnome-canvas-text.c
+++ b/libgnomecanvas/gnome-canvas-text.c
@@ -711,47 +711,8 @@ gnome_canvas_text_set_property (GObject *object,
color_changed = FALSE;
have_pixel = FALSE;
- if (!text->layout) {
-
- PangoContext *gtk_context, *context;
- gtk_context = gtk_widget_get_pango_context (GTK_WIDGET (item->canvas));
-
- if (item->canvas->aa) {
- PangoFontMap *fontmap;
- PangoLanguage *language;
- gint pixels, mm;
- gdouble dpi_x;
- gdouble dpi_y;
-
- pixels = gdk_screen_width ();
- mm = gdk_screen_width_mm ();
- dpi_x = (((gdouble) pixels * 25.4) / (gdouble) mm);
-
- pixels = gdk_screen_height ();
- mm = gdk_screen_height_mm ();
- dpi_y = (((gdouble) pixels * 25.4) / (gdouble) mm);
-
- /* XXX This used to call pango_ft2_get_context().
- * Is there a better way to do this? */
- fontmap = pango_ft2_font_map_new ();
- pango_ft2_font_map_set_resolution (PANGO_FT2_FONT_MAP (fontmap), dpi_x, dpi_y);
- context = pango_font_map_create_context (fontmap);
-
- language = pango_context_get_language (gtk_context);
- pango_context_set_language (context, language);
- pango_context_set_base_dir (context,
- pango_context_get_base_dir (gtk_context));
- pango_context_set_font_description (context,
- pango_context_get_font_description (gtk_context));
-
- } else
- context = gtk_context;
-
- text->layout = pango_layout_new (context);
-
- if (item->canvas->aa)
- g_object_unref (G_OBJECT (context));
- }
+ if (!text->layout)
+ text->layout = pango_layout_new (gtk_widget_get_pango_context (GTK_WIDGET (item->canvas)));
switch (param_id) {
case PROP_TEXT:
@@ -1026,8 +987,7 @@ gnome_canvas_text_set_property (GObject *object,
else
text->pixel = gnome_canvas_get_color_pixel (item->canvas, text->rgba);
- if (!item->canvas->aa)
- set_text_gc_foreground (text);
+ set_text_gc_foreground (text);
}
/* Calculate text dimensions */
diff --git a/libgnomecanvas/gnome-canvas-util.c b/libgnomecanvas/gnome-canvas-util.c
index f685cf7846..1aba6fcacd 100644
--- a/libgnomecanvas/gnome-canvas-util.c
+++ b/libgnomecanvas/gnome-canvas-util.c
@@ -596,18 +596,7 @@ gnome_canvas_item_update_svp_clip (GnomeCanvasItem *item,
void
gnome_canvas_item_request_redraw_svp (GnomeCanvasItem *item, const ArtSVP *svp)
{
- GnomeCanvas *canvas;
- ArtUta *uta;
-
- canvas = item->canvas;
- if (canvas->aa) {
- if (svp != NULL) {
- uta = art_uta_from_svp (svp);
- gnome_canvas_request_redraw_uta (canvas, uta);
- }
- } else {
- gnome_canvas_request_redraw (canvas, item->x1, item->y1, item->x2, item->y2);
- }
+ gnome_canvas_request_redraw (item->canvas, item->x1, item->y1, item->x2, item->y2);
}
/**
diff --git a/libgnomecanvas/gnome-canvas.c b/libgnomecanvas/gnome-canvas.c
index 014c57d4c1..ecabf2a59c 100644
--- a/libgnomecanvas/gnome-canvas.c
+++ b/libgnomecanvas/gnome-canvas.c
@@ -1935,7 +1935,6 @@ group_remove (GnomeCanvasGroup *group, GnomeCanvasItem *item)
enum {
DRAW_BACKGROUND,
- RENDER_BACKGROUND,
LAST_SIGNAL
};
@@ -1975,8 +1974,8 @@ static GtkLayoutClass *canvas_parent_class;
static guint canvas_signals[LAST_SIGNAL];
enum {
- PROP_AA = 1,
- PROP_FOCUSED_ITEM
+ PROP_0,
+ PROP_FOCUSED_ITEM,
};
/**
@@ -2020,9 +2019,6 @@ gnome_canvas_get_property (GObject *object,
GParamSpec *pspec)
{
switch (prop_id) {
- case PROP_AA:
- g_value_set_boolean (value, GNOME_CANVAS (object)->aa);
- break;
case PROP_FOCUSED_ITEM:
g_value_set_object (value, GNOME_CANVAS (object)->focused_item);
break;
@@ -2039,9 +2035,6 @@ gnome_canvas_set_property (GObject *object,
GParamSpec *pspec)
{
switch (prop_id) {
- case PROP_AA:
- GNOME_CANVAS (object)->aa = g_value_get_boolean (value);
- break;
case PROP_FOCUSED_ITEM:
GNOME_CANVAS (object)->focused_item = g_value_get_object (value);
break;
@@ -2084,17 +2077,8 @@ gnome_canvas_class_init (GnomeCanvasClass *klass)
widget_class->focus_out_event = gnome_canvas_focus_out;
klass->draw_background = gnome_canvas_draw_background;
- klass->render_background = NULL;
klass->request_update = gnome_canvas_request_update_real;
- g_object_class_install_property (G_OBJECT_CLASS (object_class),
- PROP_AA,
- g_param_spec_boolean ("aa",
- "Antialiased",
- "The antialiasing mode of the canvas.",
- FALSE,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
-
g_object_class_install_property (object_class, PROP_FOCUSED_ITEM,
g_param_spec_object ("focused_item", NULL, NULL,
GNOME_TYPE_CANVAS_ITEM,
@@ -2109,14 +2093,6 @@ gnome_canvas_class_init (GnomeCanvasClass *klass)
gnome_canvas_marshal_VOID__OBJECT_INT_INT_INT_INT,
G_TYPE_NONE, 5, GDK_TYPE_DRAWABLE,
G_TYPE_INT, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT);
- canvas_signals[RENDER_BACKGROUND] =
- g_signal_new ("render_background",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GnomeCanvasClass, render_background),
- NULL, NULL,
- g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1, G_TYPE_POINTER);
gail_canvas_init ();
}
@@ -2158,8 +2134,6 @@ gnome_canvas_init (GnomeCanvas *canvas)
canvas->pick_event.crossing.x = 0;
canvas->pick_event.crossing.y = 0;
- canvas->dither = GDK_RGB_DITHER_MAX;
-
/* This may not be what people want, but it is set to be turned on by
* default to have the same initial behavior as the canvas in GNOME 1.4.
*/
@@ -2259,21 +2233,6 @@ gnome_canvas_new (void)
return GTK_WIDGET (g_object_new (gnome_canvas_get_type (), NULL));
}
-/**
- * gnome_canvas_new_aa:
- *
- * Creates a new empty canvas in antialiased mode.
- *
- * Return value: A newly-created antialiased canvas.
- **/
-GtkWidget *
-gnome_canvas_new_aa (void)
-{
- return GTK_WIDGET (g_object_new (GNOME_TYPE_CANVAS,
- "aa", TRUE,
- NULL));
-}
-
/* Map handler for the canvas */
static void
gnome_canvas_map (GtkWidget *widget)
@@ -3004,6 +2963,9 @@ gnome_canvas_paint_rect (GnomeCanvas *canvas, gint x0, gint y0, gint x1, gint y1
gint draw_width, draw_height;
gdouble hadjustment_value;
gdouble vadjustment_value;
+ GdkPixmap *pixmap;
+ GdkVisual *visual;
+ gint depth;
g_return_if_fail (!canvas->need_update);
@@ -3036,86 +2998,32 @@ gnome_canvas_paint_rect (GnomeCanvas *canvas, gint x0, gint y0, gint x1, gint y1
canvas->draw_xofs = draw_x1;
canvas->draw_yofs = draw_y1;
- if (canvas->aa) {
- GnomeCanvasBuf buf;
- guchar *px;
- GdkColor *color;
- GtkStyle *style;
-
- px = g_new (guchar, draw_width * 3 * draw_height);
-
- buf.buf = px;
- buf.buf_rowstride = draw_width * 3;
- buf.rect.x0 = draw_x1;
- buf.rect.y0 = draw_y1;
- buf.rect.x1 = draw_x2;
- buf.rect.y1 = draw_y2;
- style = gtk_widget_get_style (widget);
- color = &style->bg[GTK_STATE_NORMAL];
- buf.bg_color =
- (((color->red & 0xff00) << 8) |
- (color->green & 0xff00) | (color->blue >> 8));
- buf.is_bg = 1;
- buf.is_buf = 0;
-
- g_signal_emit (G_OBJECT (canvas), canvas_signals[RENDER_BACKGROUND], 0, &buf);
+ visual = gtk_widget_get_visual (widget);
+ depth = gdk_visual_get_depth (visual);
- if (canvas->root->flags & GNOME_CANVAS_ITEM_VISIBLE)
- (* GNOME_CANVAS_ITEM_GET_CLASS (canvas->root)->render) (canvas->root, &buf);
-
- if (buf.is_bg) {
- gdk_gc_set_rgb_fg_color (canvas->pixmap_gc, color);
- gdk_draw_rectangle (bin_window,
- canvas->pixmap_gc,
- TRUE,
- (draw_x1 + canvas->zoom_xofs),
- (draw_y1 + canvas->zoom_yofs),
- draw_width, draw_height);
- } else {
- gdk_draw_rgb_image_dithalign (bin_window,
- canvas->pixmap_gc,
- (draw_x1 + canvas->zoom_xofs),
- (draw_y1 + canvas->zoom_yofs),
- draw_width, draw_height,
- canvas->dither,
- buf.buf,
- buf.buf_rowstride,
- draw_x1, draw_y1);
- }
+ pixmap = gdk_pixmap_new (bin_window,
+ draw_width, draw_height, depth);
- g_free (px);
- } else {
- GdkPixmap *pixmap;
- GdkVisual *visual;
- gint depth;
+ g_signal_emit (G_OBJECT (canvas), canvas_signals[DRAW_BACKGROUND], 0, pixmap,
+ draw_x1, draw_y1, draw_width, draw_height);
- visual = gtk_widget_get_visual (widget);
- depth = gdk_visual_get_depth (visual);
+ if (canvas->root->flags & GNOME_CANVAS_ITEM_VISIBLE)
+ (* GNOME_CANVAS_ITEM_GET_CLASS (canvas->root)->draw) (
+ canvas->root, pixmap,
+ draw_x1, draw_y1,
+ draw_width, draw_height);
- pixmap = gdk_pixmap_new (bin_window,
- draw_width, draw_height, depth);
+ /* Copy the pixmap to the window and clean up */
- g_signal_emit (G_OBJECT (canvas), canvas_signals[DRAW_BACKGROUND], 0, pixmap,
- draw_x1, draw_y1, draw_width, draw_height);
+ gdk_draw_drawable (bin_window,
+ canvas->pixmap_gc,
+ pixmap,
+ 0, 0,
+ draw_x1 + canvas->zoom_xofs,
+ draw_y1 + canvas->zoom_yofs,
+ draw_width, draw_height);
- if (canvas->root->flags & GNOME_CANVAS_ITEM_VISIBLE)
- (* GNOME_CANVAS_ITEM_GET_CLASS (canvas->root)->draw) (
- canvas->root, pixmap,
- draw_x1, draw_y1,
- draw_width, draw_height);
-
- /* Copy the pixmap to the window and clean up */
-
- gdk_draw_drawable (bin_window,
- canvas->pixmap_gc,
- pixmap,
- 0, 0,
- draw_x1 + canvas->zoom_xofs,
- draw_y1 + canvas->zoom_yofs,
- draw_width, draw_height);
-
- g_object_unref (pixmap);
- }
+ g_object_unref (pixmap);
}
/* Expose handler for the canvas */
@@ -4199,40 +4107,6 @@ gnome_canvas_set_stipple_origin (GnomeCanvas *canvas, GdkGC *gc)
gdk_gc_set_ts_origin (gc, -canvas->draw_xofs, -canvas->draw_yofs);
}
-/**
- * gnome_canvas_set_dither:
- * @canvas: A canvas.
- * @dither: Type of dithering used to render an antialiased canvas.
- *
- * Controls dithered rendering for antialiased canvases. The value of
- * dither should be #GDK_RGB_DITHER_NONE, #GDK_RGB_DITHER_NORMAL, or
- * #GDK_RGB_DITHER_MAX. The default canvas setting is
- * #GDK_RGB_DITHER_NORMAL.
- **/
-void
-gnome_canvas_set_dither (GnomeCanvas *canvas, GdkRgbDither dither)
-{
- g_return_if_fail (GNOME_IS_CANVAS (canvas));
-
- canvas->dither = dither;
-}
-
-/**
- * gnome_canvas_get_dither:
- * @canvas: A canvas.
- *
- * Returns the type of dithering used to render an antialiased canvas.
- *
- * Return value: The dither setting.
- **/
-GdkRgbDither
-gnome_canvas_get_dither (GnomeCanvas *canvas)
-{
- g_return_val_if_fail (GNOME_IS_CANVAS (canvas), GDK_RGB_DITHER_NONE);
-
- return canvas->dither;
-}
-
static gboolean
boolean_handled_accumulator (GSignalInvocationHint *ihint,
GValue *return_accu,
diff --git a/libgnomecanvas/gnome-canvas.h b/libgnomecanvas/gnome-canvas.h
index c5d6cffe3b..b8a7308d13 100644
--- a/libgnomecanvas/gnome-canvas.h
+++ b/libgnomecanvas/gnome-canvas.h
@@ -469,12 +469,6 @@ struct _GnomeCanvas {
/* For use by internal pick_current_item() function */
guint in_repick : 1;
-
- /* Whether the canvas is in antialiased mode or not */
- guint aa : 1;
-
- /* Which dither mode to use for antialiased mode drawing */
- GdkRgbDither dither;
};
struct _GnomeCanvasClass {
@@ -486,12 +480,6 @@ struct _GnomeCanvasClass {
void (* draw_background) (GnomeCanvas *canvas, GdkDrawable *drawable,
gint x, gint y, gint width, gint height);
- /* Render the background for the buffer given. The buf data structure
- * contains both a pointer to a packed 24-bit RGB array, and the
- * coordinates. This method is only used for antialiased canvases.
- */
- void (* render_background) (GnomeCanvas *canvas, GnomeCanvasBuf *buf);
-
/* Private Virtual methods for groping the canvas inside bonobo */
void (* request_update) (GnomeCanvas *canvas);
@@ -510,13 +498,6 @@ GType gnome_canvas_get_type (void) G_GNUC_CONST;
*/
GtkWidget *gnome_canvas_new (void);
-/* Creates a new antialiased empty canvas. You should push the GdkRgb colormap
- * and visual for this.
- */
-#ifndef GNOME_EXCLUDE_EXPERIMENTAL
-GtkWidget *gnome_canvas_new_aa (void);
-#endif
-
/* Returns the root canvas item group of the canvas */
GnomeCanvasGroup *gnome_canvas_root (GnomeCanvas *canvas);
@@ -608,16 +589,6 @@ gulong gnome_canvas_get_color_pixel (GnomeCanvas *canvas,
*/
void gnome_canvas_set_stipple_origin (GnomeCanvas *canvas, GdkGC *gc);
-/* Controls the dithering used when the canvas renders.
- * Only applicable to antialiased canvases - ignored by non-antialiased canvases.
- */
-void gnome_canvas_set_dither (GnomeCanvas *canvas, GdkRgbDither dither);
-
-/* Returns the dither mode of an antialiased canvas.
- * Only applicable to antialiased canvases - ignored by non-antialiased canvases.
- */
-GdkRgbDither gnome_canvas_get_dither (GnomeCanvas *canvas);
-
G_END_DECLS
#endif
diff --git a/widgets/misc/e-canvas-background.c b/widgets/misc/e-canvas-background.c
index eba6d32659..e062e16dfa 100644
--- a/widgets/misc/e-canvas-background.c
+++ b/widgets/misc/e-canvas-background.c
@@ -271,9 +271,7 @@ ecb_set_property (GObject *object,
if (item->flags & GNOME_CANVAS_ITEM_REALIZED) {
get_color (ecb);
- if (!item->canvas->aa) {
- gdk_gc_set_foreground (ecb->priv->gc, &ecb->priv->color);
- }
+ gdk_gc_set_foreground (ecb->priv->gc, &ecb->priv->color);
}
}
@@ -349,8 +347,7 @@ ecb_realize (GnomeCanvasItem *item)
ecb->priv->gc = gdk_gc_new (bin_window);
get_color (ecb);
- if (!item->canvas->aa)
- gdk_gc_set_foreground (ecb->priv->gc, &ecb->priv->color);
+ gdk_gc_set_foreground (ecb->priv->gc, &ecb->priv->color);
set_stipple (ecb, NULL, FALSE);
diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c
index 9946cab16c..9ee330ee5d 100644
--- a/widgets/text/e-text.c
+++ b/widgets/text/e-text.c
@@ -973,8 +973,7 @@ e_text_set_property (GObject *object,
text->color = color;
gdk_rgb_find_color (colormap, &text->color);
- if (!item->canvas->aa)
- set_text_gc_foreground (text);
+ set_text_gc_foreground (text);
text->needs_redraw = 1;
needs_update = 1;
@@ -1181,25 +1180,23 @@ e_text_update (GnomeCanvasItem *item, gdouble *affine, ArtSVP *clip_path, gint f
if ( text->needs_recalc_bounds
|| (flags & GNOME_CANVAS_UPDATE_AFFINE)) {
- if (!item->canvas->aa) {
- 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 ||
- item->y1 != y1 ||
- item->y2 != y2 ) {
- gnome_canvas_request_redraw (item->canvas, item->x1, item->y1, item->x2, item->y2);
- item->x1 = x1;
- item->y1 = y1;
- item->x2 = x2;
- item->y2 = y2;
- text->needs_redraw = 1;
- item->canvas->need_repick = TRUE;
- }
- if (!text->fill_clip_rectangle)
- item->canvas->need_repick = TRUE;
- }
+ 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 ||
+ item->y1 != y1 ||
+ item->y2 != y2 ) {
+ gnome_canvas_request_redraw (item->canvas, item->x1, item->y1, item->x2, item->y2);
+ item->x1 = x1;
+ item->y1 = y1;
+ item->x2 = x2;
+ item->y2 = y2;
+ text->needs_redraw = 1;
+ item->canvas->need_repick = TRUE;
+ }
+ if (!text->fill_clip_rectangle)
+ item->canvas->need_repick = TRUE;
text->needs_recalc_bounds = 0;
}
if (text->needs_redraw) {