[gimp] app: remove gimp_display_shell_draw_selection_segments()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: remove gimp_display_shell_draw_selection_segments()
- Date: Fri, 27 Aug 2010 13:03:54 +0000 (UTC)
commit 9c63f3d4f1f8e561bcbdee47f90ca475afe06530
Author: Michael Natterer <mitch gimp org>
Date: Fri Aug 27 15:03:03 2010 +0200
app: remove gimp_display_shell_draw_selection_segments()
and move its code into selection_render_mask().
app/display/gimpdisplayshell-draw.c | 24 ++++--------------------
app/display/gimpdisplayshell-draw.h | 6 +-----
app/display/gimpdisplayshell-selection.c | 17 +++++++++++------
3 files changed, 16 insertions(+), 31 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-draw.c b/app/display/gimpdisplayshell-draw.c
index ee5240e..28bfc00 100644
--- a/app/display/gimpdisplayshell-draw.c
+++ b/app/display/gimpdisplayshell-draw.c
@@ -569,26 +569,10 @@ gimp_display_shell_draw_selection_out (GimpDisplayShell *shell,
}
void
-gimp_display_shell_draw_selection_segments (GimpDisplayShell *shell,
- cairo_t *cr,
- GdkSegment *segs,
- gint n_segs)
-{
- g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
- g_return_if_fail (cr != NULL);
- g_return_if_fail (segs != NULL && n_segs > 0);
-
- cairo_set_line_width (cr, 1.0);
-
- gimp_cairo_add_segments (cr, segs, n_segs);
- cairo_stroke (cr);
-}
-
-void
-gimp_display_shell_draw_selection_in_mask (GimpDisplayShell *shell,
- cairo_t *cr,
- cairo_pattern_t *mask,
- gint index)
+gimp_display_shell_draw_selection_in (GimpDisplayShell *shell,
+ cairo_t *cr,
+ cairo_pattern_t *mask,
+ gint index)
{
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
g_return_if_fail (cr != NULL);
diff --git a/app/display/gimpdisplayshell-draw.h b/app/display/gimpdisplayshell-draw.h
index 782c7fa..9ad1e62 100644
--- a/app/display/gimpdisplayshell-draw.h
+++ b/app/display/gimpdisplayshell-draw.h
@@ -57,11 +57,7 @@ void gimp_display_shell_draw_selection_out (GimpDisplayShell *shell,
cairo_t *cr,
GdkSegment *segs,
gint n_segs);
-void gimp_display_shell_draw_selection_segments (GimpDisplayShell *shell,
- cairo_t *cr,
- GdkSegment *segs,
- gint n_segs);
-void gimp_display_shell_draw_selection_in_mask (GimpDisplayShell *shell,
+void gimp_display_shell_draw_selection_in (GimpDisplayShell *shell,
cairo_t *cr,
cairo_pattern_t *mask,
gint index);
diff --git a/app/display/gimpdisplayshell-selection.c b/app/display/gimpdisplayshell-selection.c
index 43b4013..b5b2312 100644
--- a/app/display/gimpdisplayshell-selection.c
+++ b/app/display/gimpdisplayshell-selection.c
@@ -31,6 +31,8 @@
#include "core/gimplayermask.h"
#include "core/gimpimage.h"
+#include "widgets/gimpcairo.h"
+
#include "gimpdisplay.h"
#include "gimpdisplayshell.h"
#include "gimpdisplayshell-appearance.h"
@@ -291,9 +293,9 @@ selection_draw (Selection *selection)
cr = gdk_cairo_create (gtk_widget_get_window (selection->shell->canvas));
- gimp_display_shell_draw_selection_in_mask (selection->shell, cr,
- selection->segs_in_mask,
- selection->index % 8);
+ gimp_display_shell_draw_selection_in (selection->shell, cr,
+ selection->segs_in_mask,
+ selection->index % 8);
cairo_destroy (cr);
}
@@ -383,9 +385,12 @@ selection_render_mask (Selection *selection)
cairo_push_group_with_content (cr, CAIRO_CONTENT_ALPHA);
- gimp_display_shell_draw_selection_segments (selection->shell, cr,
- selection->segs_in,
- selection->n_segs_in);
+ cairo_set_line_width (cr, 1.0);
+
+ gimp_cairo_add_segments (cr,
+ selection->segs_in,
+ selection->n_segs_in);
+ cairo_stroke (cr);
selection->segs_in_mask = cairo_pop_group (cr);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]