app: remove unused clipping functions in GimpDrawTool and GimpCanvas

This commit is contained in:
Michael Natterer 2010-09-19 18:58:23 +02:00
parent 916216c50a
commit 7e28f52dd7
4 changed files with 0 additions and 96 deletions

View File

@ -549,54 +549,6 @@ gimp_canvas_get_layout (GimpCanvas *canvas,
return canvas->layout;
}
/**
* 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

View File

@ -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);

View File

@ -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

View File

@ -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,