[evolution/rendering-cleanup: 94/97] e-text: Draw EReflow with cairo
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/rendering-cleanup: 94/97] e-text: Draw EReflow with cairo
- Date: Thu, 21 Oct 2010 09:51:56 +0000 (UTC)
commit 03b579bbeceb1955081f8ac4fdf8d0f6d9a25155
Author: Benjamin Otte <otte redhat com>
Date: Thu Oct 21 10:26:17 2010 +0200
e-text: Draw EReflow with cairo
widgets/text/e-reflow.c | 20 +++++++++++++-------
1 files changed, 13 insertions(+), 7 deletions(-)
---
diff --git a/widgets/text/e-reflow.c b/widgets/text/e-reflow.c
index 9ccbd86..02b14ff 100644
--- a/widgets/text/e-reflow.c
+++ b/widgets/text/e-reflow.c
@@ -1177,6 +1177,9 @@ static void e_reflow_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
EReflow *reflow = E_REFLOW (item);
gint i;
gdouble column_width;
+ cairo_t *cr;
+
+ cr = gdk_cairo_create (drawable);
if (GNOME_CANVAS_ITEM_CLASS (e_reflow_parent_class)->draw)
GNOME_CANVAS_ITEM_CLASS (e_reflow_parent_class)->draw (item, drawable, x, y, width, height);
@@ -1235,20 +1238,23 @@ static void e_reflow_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
i /= column_width + E_REFLOW_FULL_GUTTER;
running_width += i * (column_width + E_REFLOW_FULL_GUTTER);
+ gdk_cairo_set_source_color (cr, &style->fg[GTK_STATE_NORMAL]);
+
for (; i < reflow->column_count; i++) {
if (running_width > x + width)
break;
x_rect = running_width;
- gdk_draw_rectangle (drawable,
- style->fg_gc[GTK_STATE_NORMAL],
- TRUE,
- x_rect - x,
- y_rect - y,
- width_rect - 1,
- height_rect - 1);
+ cairo_rectangle (cr,
+ x_rect - x,
+ y_rect - y,
+ width_rect - 1,
+ height_rect - 1);
+ cairo_fill (cr);
running_width += E_REFLOW_DIVIDER_WIDTH + E_REFLOW_BORDER_WIDTH + column_width + E_REFLOW_BORDER_WIDTH;
}
}
+
+ cairo_destroy (cr);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]