formatting.

2008-07-22  Sven Neumann  <sven@gimp.org>

	* app/vectors/gimpbezierstroke.c: formatting.


svn path=/trunk/; revision=26272
This commit is contained in:
Sven Neumann
2008-07-22 10:53:08 +00:00
committed by Sven Neumann
parent 5b374543cb
commit 06d13d4bb5
2 changed files with 24 additions and 9 deletions

View File

@ -1,3 +1,7 @@
2008-07-22 Sven Neumann <sven@gimp.org>
* app/vectors/gimpbezierstroke.c: formatting.
2008-07-22 Sven Neumann <sven@gimp.org> 2008-07-22 Sven Neumann <sven@gimp.org>
* app/widgets/gimpsessioninfo-aux.c * app/widgets/gimpsessioninfo-aux.c

View File

@ -611,6 +611,7 @@ gimp_bezier_stroke_nearest_point_get (const GimpStroke *stroke,
if (dist < min_dist || min_dist < 0) if (dist < min_dist || min_dist < 0)
{ {
min_dist = dist; min_dist = dist;
if (ret_pos) if (ret_pos)
*ret_pos = pos; *ret_pos = pos;
if (ret_point) if (ret_point)
@ -620,6 +621,7 @@ gimp_bezier_stroke_nearest_point_get (const GimpStroke *stroke,
if (ret_segment_end) if (ret_segment_end)
*ret_segment_end = segment_end; *ret_segment_end = segment_end;
} }
segment_start = anchorlist->data; segment_start = anchorlist->data;
segmentcoords[0] = segmentcoords[3]; segmentcoords[0] = segmentcoords[3];
count = 1; count = 1;
@ -635,7 +637,9 @@ gimp_bezier_stroke_nearest_point_get (const GimpStroke *stroke,
segmentcoords[count] = GIMP_ANCHOR (anchorlist->data)->position; segmentcoords[count] = GIMP_ANCHOR (anchorlist->data)->position;
count++; count++;
} }
anchorlist = g_list_next (anchorlist); anchorlist = g_list_next (anchorlist);
if (anchorlist) if (anchorlist)
{ {
segment_end = GIMP_ANCHOR (anchorlist->data); segment_end = GIMP_ANCHOR (anchorlist->data);
@ -650,6 +654,7 @@ gimp_bezier_stroke_nearest_point_get (const GimpStroke *stroke,
if (dist < min_dist || min_dist < 0) if (dist < min_dist || min_dist < 0)
{ {
min_dist = dist; min_dist = dist;
if (ret_pos) if (ret_pos)
*ret_pos = pos; *ret_pos = pos;
if (ret_point) if (ret_point)
@ -716,6 +721,7 @@ gimp_bezier_stroke_segment_nearest_point_get (const GimpCoords *beziercoords,
for (i = 0; i <= 15; i++) for (i = 0; i <= 15; i++)
{ {
pos2 *= 0.5; pos2 *= 0.5;
if (3 * pos1 * pos1 * (1-pos1) + pos1 * pos1 * pos1 < scalar) if (3 * pos1 * pos1 * (1-pos1) + pos1 * pos1 * pos1 < scalar)
pos1 += pos2; pos1 += pos2;
else else
@ -837,6 +843,7 @@ gimp_bezier_stroke_nearest_tangent_get (const GimpStroke *stroke,
if (dist >= 0 && (dist < min_dist || min_dist < 0)) if (dist >= 0 && (dist < min_dist || min_dist < 0))
{ {
min_dist = dist; min_dist = dist;
if (ret_pos) if (ret_pos)
*ret_pos = pos; *ret_pos = pos;
if (nearest) if (nearest)
@ -846,6 +853,7 @@ gimp_bezier_stroke_nearest_tangent_get (const GimpStroke *stroke,
if (ret_segment_end) if (ret_segment_end)
*ret_segment_end = segment_end; *ret_segment_end = segment_end;
} }
segment_start = anchorlist->data; segment_start = anchorlist->data;
segmentcoords[0] = segmentcoords[3]; segmentcoords[0] = segmentcoords[3];
count = 1; count = 1;
@ -861,7 +869,9 @@ gimp_bezier_stroke_nearest_tangent_get (const GimpStroke *stroke,
segmentcoords[count] = GIMP_ANCHOR (anchorlist->data)->position; segmentcoords[count] = GIMP_ANCHOR (anchorlist->data)->position;
count++; count++;
} }
anchorlist = g_list_next (anchorlist); anchorlist = g_list_next (anchorlist);
if (anchorlist) if (anchorlist)
{ {
segment_end = GIMP_ANCHOR (anchorlist->data); segment_end = GIMP_ANCHOR (anchorlist->data);
@ -876,6 +886,7 @@ gimp_bezier_stroke_nearest_tangent_get (const GimpStroke *stroke,
if (dist >= 0 && (dist < min_dist || min_dist < 0)) if (dist >= 0 && (dist < min_dist || min_dist < 0))
{ {
min_dist = dist; min_dist = dist;
if (ret_pos) if (ret_pos)
*ret_pos = pos; *ret_pos = pos;
if (nearest) if (nearest)
@ -1536,6 +1547,7 @@ gimp_bezier_stroke_make_bezier (const GimpStroke *stroke)
bezdesc->status = CAIRO_STATUS_SUCCESS; bezdesc->status = CAIRO_STATUS_SUCCESS;
bezdesc->data = (cairo_path_data_t *) cmd_array->data; bezdesc->data = (cairo_path_data_t *) cmd_array->data;
bezdesc->num_data = cmd_array->len; bezdesc->num_data = cmd_array->len;
g_array_free (points, TRUE); g_array_free (points, TRUE);
g_array_free (cmd_array, FALSE); g_array_free (cmd_array, FALSE);
@ -1824,10 +1836,9 @@ arcto_ellipsesegment (gdouble radius_x,
ellips[0].x = cos (phi_s); ellips[0].y = sin (phi_s); ellips[0].x = cos (phi_s); ellips[0].y = sin (phi_s);
ellips[3].x = cos (phi_e); ellips[3].y = sin (phi_e); ellips[3].x = cos (phi_e); ellips[3].y = sin (phi_e);
gimp_coords_mix (1, &(ellips[0]), circlemagic, &(ellips[3]),
&(ellips[1])); gimp_coords_mix (1, &(ellips[0]), circlemagic, &(ellips[3]), &(ellips[1]));
gimp_coords_mix (circlemagic, &(ellips[0]), 1, &(ellips[3]), gimp_coords_mix (circlemagic, &(ellips[0]), 1, &(ellips[3]), &(ellips[2]));
&(ellips[2]));
if (h0 > y[0]) if (h0 > y[0])
{ {