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
This commit is contained in:
Sven Neumann 2000-02-18 18:20:04 +00:00
parent 7b6dffa66a
commit defbe35de6
16 changed files with 44 additions and 36 deletions

View File

@ -1,3 +1,13 @@
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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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