[gthumb] clip the expose event region only ones
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] clip the expose event region only ones
- Date: Sat, 15 Jan 2011 16:51:35 +0000 (UTC)
commit 7ccd30c00361b4471cbc748d496be228f3fa74f7
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sat Jan 15 16:54:44 2011 +0100
clip the expose event region only ones
gthumb/gth-image-selector.c | 6 ------
gthumb/gth-image-viewer.c | 6 ++++--
2 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/gthumb/gth-image-selector.c b/gthumb/gth-image-selector.c
index eadf676..3e76868 100644
--- a/gthumb/gth-image-selector.c
+++ b/gthumb/gth-image-selector.c
@@ -591,9 +591,6 @@ paint_background (GthImageSelector *self,
int n_rects;
int i;
- cairo_save (cr);
- gdk_cairo_region (cr, event->region);
- cairo_clip (cr);
gdk_cairo_rectangle (cr, &self->priv->viewer->image_area);
cairo_clip (cr);
cairo_set_source_rgba (cr, 0.0, 0.0, 0.0, 0.5);
@@ -605,7 +602,6 @@ paint_background (GthImageSelector *self,
cairo_rectangle (cr, paint_area.x, paint_area.y, paint_area.width, paint_area.height);
}
cairo_fill (cr);
- cairo_restore (cr);
g_free (rects);
}
@@ -640,8 +636,6 @@ paint_selection (GthImageSelector *self,
cairo_set_source_rgb (cr, 1.0, 1.0, 1.0);
#endif
-
- gdk_cairo_region (cr, event->region);
gdk_cairo_rectangle (cr, &selection_area);
cairo_clip (cr);
diff --git a/gthumb/gth-image-viewer.c b/gthumb/gth-image-viewer.c
index 45f00de..351c634 100644
--- a/gthumb/gth-image-viewer.c
+++ b/gthumb/gth-image-viewer.c
@@ -2550,8 +2550,7 @@ gth_image_viewer_paint_region (GthImageViewer *self,
int i;
cairo_save (cr);
- gdk_cairo_region (cr, region);
- cairo_clip (cr);
+
gdk_cairo_rectangle (cr, pixbuf_area);
cairo_clip (cr);
@@ -2587,7 +2586,10 @@ gth_image_viewer_apply_painters (GthImageViewer *self,
for (scan = self->priv->painters; scan; scan = scan->next) {
PainterData *painter_data = scan->data;
+
+ cairo_save (cr);
painter_data->func (self, event, cr, painter_data->user_data);
+ cairo_restore (cr);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]