[gimp] Bug 647897 - Marching ants only visible in single window mode
- From: Mikael Magnusson <mikachu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 647897 - Marching ants only visible in single window mode
- Date: Fri, 15 Apr 2011 23:36:51 +0000 (UTC)
commit bebccfc95a7e558124e67f43d46b3a65151f220b
Author: Mikael Magnusson <mikachu src gnome org>
Date: Sat Apr 16 01:35:35 2011 +0200
Bug 647897 - Marching ants only visible in single window mode
Use gdk_window_create_similar_surface instead of gdk_cairo_create in
selection_render_mask, as the latter is not entirely correct to use
outside the expose handler and may have some unwanted clipping state.
app/display/gimpdisplayshell-selection.c | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-selection.c b/app/display/gimpdisplayshell-selection.c
index 57c87e5..8c94047 100644
--- a/app/display/gimpdisplayshell-selection.c
+++ b/app/display/gimpdisplayshell-selection.c
@@ -282,10 +282,14 @@ static void
selection_render_mask (Selection *selection)
{
cairo_t *cr;
-
- cr = gdk_cairo_create (gtk_widget_get_window (selection->shell->canvas));
-
- cairo_push_group_with_content (cr, CAIRO_CONTENT_ALPHA);
+ cairo_surface_t *surface;
+ GdkWindow *window;
+
+ window = gtk_widget_get_window (selection->shell->canvas);
+ surface = gdk_window_create_similar_surface (window, CAIRO_CONTENT_ALPHA,
+ gdk_window_get_width (window),
+ gdk_window_get_height (window));
+ cr = cairo_create (surface);
cairo_set_line_cap (cr, CAIRO_LINE_CAP_SQUARE);
cairo_set_line_width (cr, 1.0);
@@ -295,9 +299,10 @@ selection_render_mask (Selection *selection)
selection->n_segs_in);
cairo_stroke (cr);
- selection->segs_in_mask = cairo_pop_group (cr);
+ selection->segs_in_mask = cairo_pattern_create_for_surface (surface);
cairo_destroy (cr);
+ cairo_surface_destroy (surface);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]