[gthumb: 20/40] translate the origin by 0.5 instead of adding 0.5 to all the coordinates
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb: 20/40] translate the origin by 0.5 instead of adding 0.5 to all the coordinates
- Date: Fri, 10 Sep 2010 16:57:53 +0000 (UTC)
commit 6f5af74ddc59caef01ba615d7d5ca15cd462fe6a
Author: Paolo Bacchilega <paobac src gnome org>
Date: Wed Sep 8 21:29:49 2010 +0200
translate the origin by 0.5 instead of adding 0.5 to all the coordinates
gthumb/gth-cell-renderer-thumbnail.c | 33 +++++++++++++++++----------------
1 files changed, 17 insertions(+), 16 deletions(-)
---
diff --git a/gthumb/gth-cell-renderer-thumbnail.c b/gthumb/gth-cell-renderer-thumbnail.c
index 668a9f0..134f46e 100644
--- a/gthumb/gth-cell-renderer-thumbnail.c
+++ b/gthumb/gth-cell-renderer-thumbnail.c
@@ -399,6 +399,7 @@ gth_cell_renderer_thumbnail_render (GtkCellRenderer *cell,
frame_rect = image_rect;
}
+ cairo_translate (cr, 0.5, 0.5);
cairo_set_line_width (cr, 0.5);
cairo_set_antialias (cr, CAIRO_ANTIALIAS_NONE);
gdk_cairo_set_source_color (cr, &style->dark[state]);
@@ -406,34 +407,34 @@ gth_cell_renderer_thumbnail_render (GtkCellRenderer *cell,
/* the outer frame */
cairo_rectangle (cr,
- frame_rect.x - border + 0.5,
- frame_rect.y - border + 0.5,
+ frame_rect.x - border,
+ frame_rect.y - border,
frame_rect.width + (border * 2) - 1,
frame_rect.height + (border * 2) - 1);
/* the drop shadow */
cairo_move_to (cr,
- frame_rect.x - (border / 2) + 0.5,
- frame_rect.y + frame_rect.height + border + 0.5);
+ frame_rect.x - (border / 2),
+ frame_rect.y + frame_rect.height + border);
cairo_line_to (cr,
- frame_rect.x + frame_rect.width + border + 0.5,
- frame_rect.y + frame_rect.height + border + 0.5);
+ frame_rect.x + frame_rect.width + border,
+ frame_rect.y + frame_rect.height + border);
cairo_line_to (cr,
- frame_rect.x + frame_rect.width + border + 0.5,
- frame_rect.y - (border / 2) + 0.5);
-
+ frame_rect.x + frame_rect.width + border,
+ frame_rect.y - (border / 2));
cairo_move_to (cr,
- frame_rect.x - (border / 2) + 0.5,
- frame_rect.y + frame_rect.height + border + 1.5);
+ frame_rect.x - (border / 2),
+ frame_rect.y + frame_rect.height + border + 1.0);
cairo_line_to (cr,
- frame_rect.x + frame_rect.width + border + 1.5,
- frame_rect.y + frame_rect.height + border + 1.5);
+ frame_rect.x + frame_rect.width + border + 1.0,
+ frame_rect.y + frame_rect.height + border + 1.0);
cairo_line_to (cr,
- frame_rect.x + frame_rect.width + border + 1.5,
- frame_rect.y - (border / 2) + 0.5);
-
+ frame_rect.x + frame_rect.width + border + 1.0,
+ frame_rect.y - (border / 2));
cairo_stroke (cr);
+
+ cairo_identity_matrix (cr);
}
if (! self->priv->checked || ((flags & (GTK_CELL_RENDERER_SELECTED | GTK_CELL_RENDERER_PRELIT)) != 0)) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]