Commit defbe35d authored by Sven Neumann's avatar Sven Neumann

forgot to exclude airbrush_blob.[ch] from the build

* app/Makefile.am: forgot to exclude airbrush_blob.[ch] from the build

* app/gimpbrushgenerated.c
* app/ink.c
* app/measure.c
* app/rotate_tool.c: use gimp_rad_to_deg and gimp_deg_to_rad macros


--Sven
parent 7b6dffa6
Fri Feb 18 19:16:26 CET 2000 Sven Neumann <sven@gimp.org>
* app/Makefile.am: forgot to exclude airbrush_blob.[ch] from the
build
* app/gimpbrushgenerated.c
* app/ink.c
* app/measure.c
* app/rotate_tool.c: use gimp_rad_to_deg and gimp_deg_to_rad macros
2000-02-18 Michael Natterer <mitch@gimp.org>
* libgimp/gimpchainbutton.c
......
......@@ -32,8 +32,6 @@ gimp_SOURCES = \
about_dialog.h \
airbrush.c \
airbrush.h \
airbrush_blob.c \
airbrush_blob.h \
app_procs.c \
app_procs.h \
appenv.h \
......
......@@ -298,8 +298,8 @@ gimp_brush_generated_generate (GimpBrushGenerated *brush)
temp_buf_free(gbrush->mask);
}
/* compute the range of the brush. should do a better job than this? */
s = sin (brush->angle*G_PI/180.0);
c = cos (brush->angle*G_PI/180.0);
s = sin (gimp_deg_to_rad (brush->angle));
c = cos (gimp_deg_to_rad (brush->angle));
tx = MAX (fabs (c*ceil (brush->radius) - s*ceil (brush->radius)
/ brush->aspect_ratio),
fabs (c*ceil (brush->radius) + s*ceil (brush->radius)
......
......@@ -298,8 +298,8 @@ gimp_brush_generated_generate (GimpBrushGenerated *brush)
temp_buf_free(gbrush->mask);
}
/* compute the range of the brush. should do a better job than this? */
s = sin (brush->angle*G_PI/180.0);
c = cos (brush->angle*G_PI/180.0);
s = sin (gimp_deg_to_rad (brush->angle));
c = cos (gimp_deg_to_rad (brush->angle));
tx = MAX (fabs (c*ceil (brush->radius) - s*ceil (brush->radius)
/ brush->aspect_ratio),
fabs (c*ceil (brush->radius) + s*ceil (brush->radius)
......
......@@ -298,8 +298,8 @@ gimp_brush_generated_generate (GimpBrushGenerated *brush)
temp_buf_free(gbrush->mask);
}
/* compute the range of the brush. should do a better job than this? */
s = sin (brush->angle*G_PI/180.0);
c = cos (brush->angle*G_PI/180.0);
s = sin (gimp_deg_to_rad (brush->angle));
c = cos (gimp_deg_to_rad (brush->angle));
tx = MAX (fabs (c*ceil (brush->radius) - s*ceil (brush->radius)
/ brush->aspect_ratio),
fabs (c*ceil (brush->radius) + s*ceil (brush->radius)
......
......@@ -298,8 +298,8 @@ gimp_brush_generated_generate (GimpBrushGenerated *brush)
temp_buf_free(gbrush->mask);
}
/* compute the range of the brush. should do a better job than this? */
s = sin (brush->angle*G_PI/180.0);
c = cos (brush->angle*G_PI/180.0);
s = sin (gimp_deg_to_rad (brush->angle));
c = cos (gimp_deg_to_rad (brush->angle));
tx = MAX (fabs (c*ceil (brush->radius) - s*ceil (brush->radius)
/ brush->aspect_ratio),
fabs (c*ceil (brush->radius) + s*ceil (brush->radius)
......
......@@ -778,8 +778,8 @@ ink_pen_ellipse (gdouble x_center, gdouble y_center,
both as affine transforms would make the most sense. -RLL */
tscale = ink_options->tilt_sensitivity * 10.0;
tscale_c = tscale * cos (ink_options->tilt_angle * G_PI / 180);
tscale_s = tscale * sin (ink_options->tilt_angle * G_PI / 180);
tscale_c = tscale * cos (gimp_deg_to_rad (ink_options->tilt_angle));
tscale_s = tscale * sin (gimp_deg_to_rad (ink_options->tilt_angle));
x = ink_options->aspect*cos(ink_options->angle) +
xtilt * tscale_c - ytilt * tscale_s;
y = ink_options->aspect*sin(ink_options->angle) +
......
......@@ -145,7 +145,7 @@ measure_get_angle (int dx,
double angle;
if (dx)
angle = 180.0 / G_PI * atan (((double)(dy) / yres) / ((double)(dx) / xres));
angle = gimp_rad_to_deg (atan (((double)(dy) / yres) / ((double)(dx) / xres)));
else if (dy)
angle = dy > 0 ? 270.0 : 90.0;
else
......
......@@ -778,8 +778,8 @@ ink_pen_ellipse (gdouble x_center, gdouble y_center,
both as affine transforms would make the most sense. -RLL */
tscale = ink_options->tilt_sensitivity * 10.0;
tscale_c = tscale * cos (ink_options->tilt_angle * G_PI / 180);
tscale_s = tscale * sin (ink_options->tilt_angle * G_PI / 180);
tscale_c = tscale * cos (gimp_deg_to_rad (ink_options->tilt_angle));
tscale_s = tscale * sin (gimp_deg_to_rad (ink_options->tilt_angle));
x = ink_options->aspect*cos(ink_options->angle) +
xtilt * tscale_c - ytilt * tscale_s;
y = ink_options->aspect*sin(ink_options->angle) +
......
......@@ -220,7 +220,7 @@ rotate_info_update (Tool *tool)
transform_core = (TransformCore *) tool->private;
angle_val = (transform_core->trans_info[ANGLE] * 180.0) / G_PI;
angle_val = gimp_rad_to_deg (transform_core->trans_info[ANGLE]);
center_vals[0] = transform_core->cx;
center_vals[1] = transform_core->cy;
......@@ -244,7 +244,7 @@ rotate_angle_changed (GtkWidget *widget,
gdisp = (GDisplay *) tool->gdisp_ptr;
transform_core = (TransformCore *) tool->private;
value = GTK_ADJUSTMENT (widget)->value * G_PI / 180.0;
value = gimp_deg_to_rad (GTK_ADJUSTMENT (widget)->value);
if (value != transform_core->trans_info[ANGLE])
{
......@@ -326,7 +326,7 @@ rotate_tool_motion (Tool *tool,
angle = angle2 - angle1;
if (angle > G_PI || angle < -G_PI)
angle = angle2 - ((angle1 < 0) ? 2*G_PI + angle1 : angle1 - 2*G_PI);
angle = angle2 - ((angle1 < 0) ? 2.0 * G_PI + angle1 : angle1 - 2.0 * G_PI);
/* increment the transform tool's angle */
transform_core->trans_info[REAL_ANGLE] += angle;
......@@ -334,10 +334,10 @@ rotate_tool_motion (Tool *tool,
/* limit the angle to between 0 and 360 degrees */
if (transform_core->trans_info[REAL_ANGLE] < - G_PI)
transform_core->trans_info[REAL_ANGLE] =
2 * G_PI - transform_core->trans_info[REAL_ANGLE];
2.0 * G_PI - transform_core->trans_info[REAL_ANGLE];
else if (transform_core->trans_info[REAL_ANGLE] > G_PI)
transform_core->trans_info[REAL_ANGLE] =
transform_core->trans_info[REAL_ANGLE] - 2 * G_PI;
transform_core->trans_info[REAL_ANGLE] - 2.0 * G_PI;
/* constrain the angle to 15-degree multiples if ctrl is held down */
if (transform_core->state & GDK_CONTROL_MASK)
......
......@@ -778,8 +778,8 @@ ink_pen_ellipse (gdouble x_center, gdouble y_center,
both as affine transforms would make the most sense. -RLL */
tscale = ink_options->tilt_sensitivity * 10.0;
tscale_c = tscale * cos (ink_options->tilt_angle * G_PI / 180);
tscale_s = tscale * sin (ink_options->tilt_angle * G_PI / 180);
tscale_c = tscale * cos (gimp_deg_to_rad (ink_options->tilt_angle));
tscale_s = tscale * sin (gimp_deg_to_rad (ink_options->tilt_angle));
x = ink_options->aspect*cos(ink_options->angle) +
xtilt * tscale_c - ytilt * tscale_s;
y = ink_options->aspect*sin(ink_options->angle) +
......
......@@ -145,7 +145,7 @@ measure_get_angle (int dx,
double angle;
if (dx)
angle = 180.0 / G_PI * atan (((double)(dy) / yres) / ((double)(dx) / xres));
angle = gimp_rad_to_deg (atan (((double)(dy) / yres) / ((double)(dx) / xres)));
else if (dy)
angle = dy > 0 ? 270.0 : 90.0;
else
......
......@@ -220,7 +220,7 @@ rotate_info_update (Tool *tool)
transform_core = (TransformCore *) tool->private;
angle_val = (transform_core->trans_info[ANGLE] * 180.0) / G_PI;
angle_val = gimp_rad_to_deg (transform_core->trans_info[ANGLE]);
center_vals[0] = transform_core->cx;
center_vals[1] = transform_core->cy;
......@@ -244,7 +244,7 @@ rotate_angle_changed (GtkWidget *widget,
gdisp = (GDisplay *) tool->gdisp_ptr;
transform_core = (TransformCore *) tool->private;
value = GTK_ADJUSTMENT (widget)->value * G_PI / 180.0;
value = gimp_deg_to_rad (GTK_ADJUSTMENT (widget)->value);
if (value != transform_core->trans_info[ANGLE])
{
......@@ -326,7 +326,7 @@ rotate_tool_motion (Tool *tool,
angle = angle2 - angle1;
if (angle > G_PI || angle < -G_PI)
angle = angle2 - ((angle1 < 0) ? 2*G_PI + angle1 : angle1 - 2*G_PI);
angle = angle2 - ((angle1 < 0) ? 2.0 * G_PI + angle1 : angle1 - 2.0 * G_PI);
/* increment the transform tool's angle */
transform_core->trans_info[REAL_ANGLE] += angle;
......@@ -334,10 +334,10 @@ rotate_tool_motion (Tool *tool,
/* limit the angle to between 0 and 360 degrees */
if (transform_core->trans_info[REAL_ANGLE] < - G_PI)
transform_core->trans_info[REAL_ANGLE] =
2 * G_PI - transform_core->trans_info[REAL_ANGLE];
2.0 * G_PI - transform_core->trans_info[REAL_ANGLE];
else if (transform_core->trans_info[REAL_ANGLE] > G_PI)
transform_core->trans_info[REAL_ANGLE] =
transform_core->trans_info[REAL_ANGLE] - 2 * G_PI;
transform_core->trans_info[REAL_ANGLE] - 2.0 * G_PI;
/* constrain the angle to 15-degree multiples if ctrl is held down */
if (transform_core->state & GDK_CONTROL_MASK)
......
......@@ -778,8 +778,8 @@ ink_pen_ellipse (gdouble x_center, gdouble y_center,
both as affine transforms would make the most sense. -RLL */
tscale = ink_options->tilt_sensitivity * 10.0;
tscale_c = tscale * cos (ink_options->tilt_angle * G_PI / 180);
tscale_s = tscale * sin (ink_options->tilt_angle * G_PI / 180);
tscale_c = tscale * cos (gimp_deg_to_rad (ink_options->tilt_angle));
tscale_s = tscale * sin (gimp_deg_to_rad (ink_options->tilt_angle));
x = ink_options->aspect*cos(ink_options->angle) +
xtilt * tscale_c - ytilt * tscale_s;
y = ink_options->aspect*sin(ink_options->angle) +
......
......@@ -145,7 +145,7 @@ measure_get_angle (int dx,
double angle;
if (dx)
angle = 180.0 / G_PI * atan (((double)(dy) / yres) / ((double)(dx) / xres));
angle = gimp_rad_to_deg (atan (((double)(dy) / yres) / ((double)(dx) / xres)));
else if (dy)
angle = dy > 0 ? 270.0 : 90.0;
else
......
......@@ -220,7 +220,7 @@ rotate_info_update (Tool *tool)
transform_core = (TransformCore *) tool->private;
angle_val = (transform_core->trans_info[ANGLE] * 180.0) / G_PI;
angle_val = gimp_rad_to_deg (transform_core->trans_info[ANGLE]);
center_vals[0] = transform_core->cx;
center_vals[1] = transform_core->cy;
......@@ -244,7 +244,7 @@ rotate_angle_changed (GtkWidget *widget,
gdisp = (GDisplay *) tool->gdisp_ptr;
transform_core = (TransformCore *) tool->private;
value = GTK_ADJUSTMENT (widget)->value * G_PI / 180.0;
value = gimp_deg_to_rad (GTK_ADJUSTMENT (widget)->value);
if (value != transform_core->trans_info[ANGLE])
{
......@@ -326,7 +326,7 @@ rotate_tool_motion (Tool *tool,
angle = angle2 - angle1;
if (angle > G_PI || angle < -G_PI)
angle = angle2 - ((angle1 < 0) ? 2*G_PI + angle1 : angle1 - 2*G_PI);
angle = angle2 - ((angle1 < 0) ? 2.0 * G_PI + angle1 : angle1 - 2.0 * G_PI);
/* increment the transform tool's angle */
transform_core->trans_info[REAL_ANGLE] += angle;
......@@ -334,10 +334,10 @@ rotate_tool_motion (Tool *tool,
/* limit the angle to between 0 and 360 degrees */
if (transform_core->trans_info[REAL_ANGLE] < - G_PI)
transform_core->trans_info[REAL_ANGLE] =
2 * G_PI - transform_core->trans_info[REAL_ANGLE];
2.0 * G_PI - transform_core->trans_info[REAL_ANGLE];
else if (transform_core->trans_info[REAL_ANGLE] > G_PI)
transform_core->trans_info[REAL_ANGLE] =
transform_core->trans_info[REAL_ANGLE] - 2 * G_PI;
transform_core->trans_info[REAL_ANGLE] - 2.0 * G_PI;
/* constrain the angle to 15-degree multiples if ctrl is held down */
if (transform_core->state & GDK_CONTROL_MASK)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment