[gimp] app: remove unused clipping functions in GimpDrawTool and GimpCanvas
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: remove unused clipping functions in GimpDrawTool and GimpCanvas
- Date: Sun, 19 Sep 2010 16:58:58 +0000 (UTC)
commit 7e28f52dd746a0c69dde93afe3f2d79375e14de1
Author: Michael Natterer <mitch gimp org>
Date: Sun Sep 19 18:58:23 2010 +0200
app: remove unused clipping functions in GimpDrawTool and GimpCanvas
app/display/gimpcanvas.c | 48 ----------------------------------------------
app/display/gimpcanvas.h | 6 -----
app/tools/gimpdrawtool.c | 38 ------------------------------------
app/tools/gimpdrawtool.h | 4 ---
4 files changed, 0 insertions(+), 96 deletions(-)
---
diff --git a/app/display/gimpcanvas.c b/app/display/gimpcanvas.c
index 91fe17b..c6d1c5c 100644
--- a/app/display/gimpcanvas.c
+++ b/app/display/gimpcanvas.c
@@ -550,54 +550,6 @@ gimp_canvas_get_layout (GimpCanvas *canvas,
}
/**
- * gimp_canvas_set_clip_rect:
- * @canvas: a #GimpCanvas widget
- * @style: one of the enumerated #GimpCanvasStyle's.
- * @rect: a #GdkRectangle to set the bounds of the clipping area.
- *
- * Sets a rectangular clipping area for the specified style.
- **/
-void
-gimp_canvas_set_clip_rect (GimpCanvas *canvas,
- GimpCanvasStyle style,
- const GdkRectangle *rect)
-{
- if (! canvas->gc[style])
- {
- if (! rect)
- return;
-
- canvas->gc[style] = gimp_canvas_gc_new (canvas, style);
- }
-
- gdk_gc_set_clip_rectangle (canvas->gc[style], rect);
-}
-
-/**
- * gimp_canvas_set_clip_region:
- * @canvas: a #GimpCanvas widget
- * @style: one of the enumerated #GimpCanvasStyle's.
- * @region: a #GdkRegion to set the bounds of the clipping area.
- *
- * Sets a clipping region for the specified style.
- **/
-void
-gimp_canvas_set_clip_region (GimpCanvas *canvas,
- GimpCanvasStyle style,
- const GdkRegion *region)
-{
- if (! canvas->gc[style])
- {
- if (! region)
- return;
-
- canvas->gc[style] = gimp_canvas_gc_new (canvas, style);
- }
-
- gdk_gc_set_clip_region (canvas->gc[style], region);
-}
-
-/**
* gimp_canvas_set_bg_color:
* @canvas: a #GimpCanvas widget
* @color: a color in #GimpRGB format
diff --git a/app/display/gimpcanvas.h b/app/display/gimpcanvas.h
index 060424b..4203b8f 100644
--- a/app/display/gimpcanvas.h
+++ b/app/display/gimpcanvas.h
@@ -116,12 +116,6 @@ PangoLayout *gimp_canvas_get_layout (GimpCanvas *canvas,
const gchar *format,
...) G_GNUC_PRINTF (2, 3);
-void gimp_canvas_set_clip_rect (GimpCanvas *canvas,
- GimpCanvasStyle style,
- const GdkRectangle *rect);
-void gimp_canvas_set_clip_region (GimpCanvas *canvas,
- GimpCanvasStyle style,
- const GdkRegion *region);
void gimp_canvas_set_bg_color (GimpCanvas *canvas,
GimpRGB *color);
diff --git a/app/tools/gimpdrawtool.c b/app/tools/gimpdrawtool.c
index 57be3a6..2522038 100644
--- a/app/tools/gimpdrawtool.c
+++ b/app/tools/gimpdrawtool.c
@@ -383,44 +383,6 @@ gimp_draw_tool_in_radius (GimpDrawTool *draw_tool,
x1, y1, x2, y2) < SQR (radius));
}
-void
-gimp_draw_tool_set_clip_rect (GimpDrawTool *draw_tool,
- GdkRectangle *rect,
- gboolean use_offsets)
-{
- GimpDisplayShell *shell;
-
- g_return_if_fail (GIMP_IS_DRAW_TOOL (draw_tool));
-
- shell = gimp_display_get_shell (draw_tool->display);
-
- if (rect)
- {
- GdkRectangle r;
-
- gimp_display_shell_transform_xy (shell,
- rect->x + rect->width,
- rect->y + rect->height,
- &r.width, &r.height,
- use_offsets);
- gimp_display_shell_transform_xy (shell,
- rect->x, rect->y,
- &r.x, &r.y,
- use_offsets);
-
- r.width -= r.x;
- r.height -= r.y;
-
- gimp_canvas_set_clip_rect (GIMP_CANVAS (shell->canvas),
- GIMP_CANVAS_STYLE_XOR, &r);
- }
- else
- {
- gimp_canvas_set_clip_rect (GIMP_CANVAS (shell->canvas),
- GIMP_CANVAS_STYLE_XOR, NULL);
- }
-}
-
/**
* gimp_draw_tool_draw_line:
* @draw_tool: the #GimpDrawTool
diff --git a/app/tools/gimpdrawtool.h b/app/tools/gimpdrawtool.h
index f4616e6..e2d010f 100644
--- a/app/tools/gimpdrawtool.h
+++ b/app/tools/gimpdrawtool.h
@@ -101,10 +101,6 @@ gboolean gimp_draw_tool_in_radius (GimpDrawTool *draw_tool,
gdouble y2,
gint radius);
-void gimp_draw_tool_set_clip_rect (GimpDrawTool *draw_tool,
- GdkRectangle *rect,
- gboolean use_offsets);
-
void gimp_draw_tool_draw_line (GimpDrawTool *draw_tool,
gdouble x1,
gdouble y1,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]