gimp r25486 - in trunk: . app/tools
- From: neo svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r25486 - in trunk: . app/tools
- Date: Mon, 14 Apr 2008 13:56:25 +0100 (BST)
Author: neo
Date: Mon Apr 14 13:56:25 2008
New Revision: 25486
URL: http://svn.gnome.org/viewvc/gimp?rev=25486&view=rev
Log:
2008-04-14 Sven Neumann <sven gimp org>
* app/tools/gimppolygonselecttool.c: formatting.
Modified:
trunk/ChangeLog
trunk/app/tools/gimppolygonselecttool.c
Modified: trunk/app/tools/gimppolygonselecttool.c
==============================================================================
--- trunk/app/tools/gimppolygonselecttool.c (original)
+++ trunk/app/tools/gimppolygonselecttool.c Mon Apr 14 13:56:25 2008
@@ -254,9 +254,8 @@
display,
coords);
- hovering_first_point = gimp_polygon_select_tool_should_close (poly_sel_tool,
- display,
- coords);
+ hovering_first_point =
+ gimp_polygon_select_tool_should_close (poly_sel_tool, display, coords);
gimp_draw_tool_pause (GIMP_DRAW_TOOL (tool));
@@ -407,7 +406,8 @@
else
{
/* Otherwise, clear the selection mask */
- gimp_channel_clear (gimp_image_get_mask (display->image), NULL, TRUE);
+ gimp_channel_clear (gimp_image_get_mask (display->image),
+ NULL, TRUE);
}
gimp_image_flush (display->image);
@@ -566,7 +566,9 @@
gimp_polygon_select_tool_real_select (GimpPolygonSelectTool *poly_sel_tool,
GimpDisplay *display)
{
- GimpSelectionOptions *options = GIMP_SELECTION_TOOL_GET_OPTIONS (poly_sel_tool);
+ GimpSelectionOptions *options;
+
+ options = GIMP_SELECTION_TOOL_GET_OPTIONS (poly_sel_tool);
gimp_channel_select_polygon (gimp_image_get_mask (display->image),
Q_("command|Polygon Select"),
@@ -590,7 +592,8 @@
poly_sel_tool->max_segs += DEFAULT_MAX_INC;
poly_sel_tool->points = g_realloc (poly_sel_tool->points,
- sizeof (GimpVector2) * poly_sel_tool->max_segs);
+ sizeof (GimpVector2) *
+ poly_sel_tool->max_segs);
}
poly_sel_tool->points[poly_sel_tool->n_points].x = x;
@@ -631,7 +634,7 @@
GimpDrawTool *draw_tool = GIMP_DRAW_TOOL (poly_sel_tool);
gdouble shortest_dist = POINT_GRAB_THRESHOLD_SQ;
GimpVector2 *grabbed_point = NULL;
- int i;
+ gint i;
for (i = 0; i < poly_sel_tool->n_points; i++)
{
@@ -665,21 +668,20 @@
GimpDisplay *display,
GimpCoords *coords)
{
- gboolean should_close = FALSE;
-
if (poly_sel_tool->n_points > 0)
{
- gdouble dist;
+ GimpDrawTool *draw_tool = GIMP_DRAW_TOOL (poly_sel_tool);
+ gdouble dist;
- dist = gimp_draw_tool_calc_distance_square (GIMP_DRAW_TOOL (poly_sel_tool),
+ dist = gimp_draw_tool_calc_distance_square (draw_tool,
display,
coords->x,
coords->y,
poly_sel_tool->points[0].x,
poly_sel_tool->points[0].y);
- should_close = dist < POINT_GRAB_THRESHOLD_SQ;
+ return (dist < POINT_GRAB_THRESHOLD_SQ);
}
- return should_close;
+ return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]