[gimp] app: really clip guide and sample point drawing to the exposed region
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: really clip guide and sample point drawing to the exposed region
- Date: Sun, 2 May 2010 14:09:21 +0000 (UTC)
commit 7549f0feade3b6091377c31f746237490e1aeab6
Author: Michael Natterer <mitch gimp org>
Date: Sun May 2 16:08:47 2010 +0200
app: really clip guide and sample point drawing to the exposed region
app/display/gimpdisplayshell-draw.c | 24 ++++++++++++++++++++++--
1 files changed, 22 insertions(+), 2 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-draw.c b/app/display/gimpdisplayshell-draw.c
index 3245a2a..4889a1b 100644
--- a/app/display/gimpdisplayshell-draw.c
+++ b/app/display/gimpdisplayshell-draw.c
@@ -201,7 +201,12 @@ gimp_display_shell_draw_guides (GimpDisplayShell *shell,
GList *list;
if (region)
- gdk_region_get_clipbox (region, &area);
+ {
+ gimp_canvas_set_clip_region (GIMP_CANVAS (shell->canvas),
+ GIMP_CANVAS_STYLE_GUIDE_NORMAL,
+ region);
+ gdk_region_get_clipbox (region, &area);
+ }
for (list = gimp_image_get_guides (image);
list;
@@ -211,6 +216,11 @@ gimp_display_shell_draw_guides (GimpDisplayShell *shell,
region ? &area : NULL,
FALSE);
}
+
+ if (region)
+ gimp_canvas_set_clip_region (GIMP_CANVAS (shell->canvas),
+ GIMP_CANVAS_STYLE_GUIDE_NORMAL,
+ NULL);
}
}
@@ -528,7 +538,12 @@ gimp_display_shell_draw_sample_points (GimpDisplayShell *shell,
GList *list;
if (region)
- gdk_region_get_clipbox (region, &area);
+ {
+ gimp_canvas_set_clip_region (GIMP_CANVAS (shell->canvas),
+ GIMP_CANVAS_STYLE_SAMPLE_POINT_NORMAL,
+ region);
+ gdk_region_get_clipbox (region, &area);
+ }
for (list = gimp_image_get_sample_points (image);
list;
@@ -538,6 +553,11 @@ gimp_display_shell_draw_sample_points (GimpDisplayShell *shell,
region ? &area : NULL,
FALSE);
}
+
+ if (region)
+ gimp_canvas_set_clip_region (GIMP_CANVAS (shell->canvas),
+ GIMP_CANVAS_STYLE_SAMPLE_POINT_NORMAL,
+ region);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]