gimp r28010 - in trunk: . app/core app/display app/paint
- From: neo svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r28010 - in trunk: . app/core app/display app/paint
- Date: Tue, 10 Feb 2009 21:07:35 +0000 (UTC)
Author: neo
Date: Tue Feb 10 21:07:35 2009
New Revision: 28010
URL: http://svn.gnome.org/viewvc/gimp?rev=28010&view=rev
Log:
2009-02-10 Sven Neumann <sven gimp org>
* app/core/gimpcoords-interpolate.c
* app/core/gimpbrush-transform.c
* app/paint/gimppaintoptions.c
* app/display/gimpdisplayshell-coords.c: applied patch from
Alexia
Death that fixes the direction of brush rotation (bug #520078).
Modified:
trunk/ChangeLog
trunk/app/core/gimpbrush-transform.c
trunk/app/core/gimpcoords-interpolate.c
trunk/app/display/gimpdisplayshell-coords.c
trunk/app/paint/gimppaintoptions.c
Modified: trunk/app/core/gimpbrush-transform.c
==============================================================================
--- trunk/app/core/gimpbrush-transform.c (original)
+++ trunk/app/core/gimpbrush-transform.c Tue Feb 10 21:07:35 2009
@@ -205,7 +205,7 @@
gimp_matrix3_identity (matrix);
gimp_matrix3_translate (matrix, - center_x, - center_x);
- gimp_matrix3_rotate (matrix, 2 * G_PI * angle);
+ gimp_matrix3_rotate (matrix, -2 * G_PI * angle);
gimp_matrix3_translate (matrix, center_x, center_y);
gimp_matrix3_scale (matrix, scale, scale);
}
Modified: trunk/app/core/gimpcoords-interpolate.c
==============================================================================
--- trunk/app/core/gimpcoords-interpolate.c (original)
+++ trunk/app/core/gimpcoords-interpolate.c Tue Feb 10 21:07:35 2009
@@ -40,11 +40,11 @@
GArray **ret_coords,
GArray **ret_params,
gint depth);
-static gdouble gimp_coords_get_catmull_spline_point (gdouble t,
- gdouble p0,
- gdouble p1,
- gdouble p2,
- gdouble p3);
+static gdouble gimp_coords_get_catmull_spline_point (const gdouble t,
+ const gdouble p0,
+ const gdouble p1,
+ const gdouble p2,
+ const gdouble p3);
/* Functions for bezier subdivision */
@@ -226,15 +226,15 @@
GArray **ret_coords,
GArray **ret_params)
{
- gdouble delta_x, delta_y;
- gdouble distance;
- gint num_points;
- gint n;
-
- GimpCoords past_coords;
- GimpCoords start_coords;
- GimpCoords end_coords;
- GimpCoords future_coords;
+ gdouble delta_x, delta_y;
+ gdouble distance;
+ gint num_points;
+ gint n;
+
+ GimpCoords past_coords;
+ GimpCoords start_coords;
+ GimpCoords end_coords;
+ GimpCoords future_coords;
delta_x = catmul_pt3.x - catmul_pt2.x;
delta_y = catmul_pt3.y - catmul_pt2.y;
@@ -323,7 +323,7 @@
}
else
{
- res_coords.direction = atan (delta_y / delta_x) / (2 * G_PI);
+ res_coords.direction = atan ((- delta_y) / delta_x) / (2 * G_PI);
if (delta_x > 0.0)
res_coords.direction = res_coords.direction + 0.5;
@@ -337,11 +337,11 @@
}
static gdouble
-gimp_coords_get_catmull_spline_point (gdouble t,
- gdouble p0,
- gdouble p1,
- gdouble p2,
- gdouble p3)
+gimp_coords_get_catmull_spline_point (const gdouble t,
+ const gdouble p0,
+ const gdouble p1,
+ const gdouble p2,
+ const gdouble p3)
{
return ((((-t + 2.0) * t - 1.0) * t / 2.0) * p0 +
Modified: trunk/app/display/gimpdisplayshell-coords.c
==============================================================================
--- trunk/app/display/gimpdisplayshell-coords.c (original)
+++ trunk/app/display/gimpdisplayshell-coords.c Tue Feb 10 21:07:35 2009
@@ -298,12 +298,13 @@
}
else
{
- coords->direction = atan (delta_y / delta_x) / (2 * G_PI);
- if (delta_x > 0.0)
+ coords->direction = atan ((- 1.0 * delta_y) / delta_x) / (2 * G_PI);
+ if (delta_x < 0.0)
coords->direction = coords->direction + 0.5;
}
delta_dir = coords->direction - shell->last_coords.direction;
+
if ((fabs (delta_dir) > 0.5) && (delta_dir < 0.0))
coords->direction = 0.3 * coords->direction + 0.7 * (shell->last_coords.direction - 1.0);
else if ((fabs (delta_dir) > 0.5) && (delta_dir > 0.0))
Modified: trunk/app/paint/gimppaintoptions.c
==============================================================================
--- trunk/app/paint/gimppaintoptions.c (original)
+++ trunk/app/paint/gimppaintoptions.c Tue Feb 10 21:07:35 2009
@@ -503,7 +503,7 @@
break;
case PROP_BRUSH_ANGLE:
- options->brush_angle = g_value_get_double (value) / 360.0;
+ options->brush_angle = - 1.0 * g_value_get_double (value) / 360.0; /* let's make the angle mathematically correct */
break;
case PROP_APPLICATION_MODE:
@@ -742,7 +742,7 @@
break;
case PROP_BRUSH_ANGLE:
- g_value_set_double (value, options->brush_angle * 360.0);
+ g_value_set_double (value, - 1.0 * options->brush_angle * 360.0); /* mathematically correct -> intuitively correct */
break;
case PROP_APPLICATION_MODE:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]