mirror of https://github.com/GNOME/gimp.git
added #defines for GimpCoords' default pressure, tilt and wheel values.
2004-02-23 Michael Natterer <mitch@gimp.org> * app/core/core-types.h: added #defines for GimpCoords' default pressure, tilt and wheel values. * app/display/gimpdisplayshell-callbacks.c * app/paint/gimppaintcore-stroke.c * app/text/gimptext-vectors.c * tools/pdbgen/pdb/paint_tools.pdb: use them. Fixes lots more buggy default values for tilt (in fact all of them were wrong). * app/pdb/paint_tools_cmds.c: regenerated.
This commit is contained in:
parent
8b18fc8547
commit
eb7f99bb8f
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
|||
2004-02-23 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/core/core-types.h: added #defines for GimpCoords' default
|
||||
pressure, tilt and wheel values.
|
||||
|
||||
* app/display/gimpdisplayshell-callbacks.c
|
||||
* app/paint/gimppaintcore-stroke.c
|
||||
* app/text/gimptext-vectors.c
|
||||
* tools/pdbgen/pdb/paint_tools.pdb: use them. Fixes lots more
|
||||
buggy default values for tilt (in fact all of them were wrong).
|
||||
|
||||
* app/pdb/paint_tools_cmds.c: regenerated.
|
||||
|
||||
2004-02-23 Simon Budig <simon@gimp.org>
|
||||
|
||||
* app/display/gimpdisplayshell-callbacks.c: corrected the
|
||||
|
|
|
@ -31,8 +31,12 @@
|
|||
|
||||
/* defines */
|
||||
|
||||
#define GIMP_OPACITY_TRANSPARENT 0.0
|
||||
#define GIMP_OPACITY_OPAQUE 1.0
|
||||
#define GIMP_OPACITY_TRANSPARENT 0.0
|
||||
#define GIMP_OPACITY_OPAQUE 1.0
|
||||
|
||||
#define GIMP_COORDS_DEFAULT_PRESSURE 1.0
|
||||
#define GIMP_COORDS_DEFAULT_TILT 0.0
|
||||
#define GIMP_COORDS_DEFAULT_WHEEL 0.5
|
||||
|
||||
|
||||
/* enums */
|
||||
|
|
|
@ -1545,22 +1545,22 @@ gimp_display_shell_get_event_coords (GimpDisplayShell *shell,
|
|||
if (gdk_event_get_axis (event, GDK_AXIS_PRESSURE, &coords->pressure))
|
||||
coords->pressure = CLAMP (coords->pressure, 0.0, 1.0);
|
||||
else
|
||||
coords->pressure = 1.0;
|
||||
coords->pressure = GIMP_COORDS_DEFAULT_PRESSURE;
|
||||
|
||||
if (gdk_event_get_axis (event, GDK_AXIS_XTILT, &coords->xtilt))
|
||||
coords->xtilt = CLAMP (coords->xtilt, -1.0, 1.0);
|
||||
else
|
||||
coords->xtilt = 0.0;
|
||||
coords->xtilt = GIMP_COORDS_DEFAULT_TILT;
|
||||
|
||||
if (gdk_event_get_axis (event, GDK_AXIS_YTILT, &coords->ytilt))
|
||||
coords->ytilt = CLAMP (coords->ytilt, -1.0, 1.0);
|
||||
else
|
||||
coords->ytilt = 0.0;
|
||||
coords->ytilt = GIMP_COORDS_DEFAULT_TILT;
|
||||
|
||||
if (gdk_event_get_axis (event, GDK_AXIS_WHEEL, &coords->wheel))
|
||||
coords->wheel = CLAMP (coords->wheel, 0.0, 1.0);
|
||||
else
|
||||
coords->wheel = 0.5;
|
||||
coords->wheel = GIMP_COORDS_DEFAULT_WHEEL;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -1590,22 +1590,22 @@ gimp_display_shell_get_device_coords (GimpDisplayShell *shell,
|
|||
if (gdk_device_get_axis (device, axes, GDK_AXIS_PRESSURE, &coords->pressure))
|
||||
coords->pressure = CLAMP (coords->pressure, 0.0, 1.0);
|
||||
else
|
||||
coords->pressure = 1.0;
|
||||
coords->pressure = GIMP_COORDS_DEFAULT_PRESSURE;
|
||||
|
||||
if (gdk_device_get_axis (device, axes, GDK_AXIS_XTILT, &coords->xtilt))
|
||||
coords->xtilt = CLAMP (coords->xtilt, -1.0, 1.0);
|
||||
else
|
||||
coords->xtilt = 0.0;
|
||||
coords->xtilt = GIMP_COORDS_DEFAULT_TILT;
|
||||
|
||||
if (gdk_device_get_axis (device, axes, GDK_AXIS_YTILT, &coords->ytilt))
|
||||
coords->ytilt = CLAMP (coords->ytilt, -1.0, 1.0);
|
||||
else
|
||||
coords->ytilt = 0.0;
|
||||
coords->ytilt = GIMP_COORDS_DEFAULT_TILT;
|
||||
|
||||
if (gdk_device_get_axis (device, axes, GDK_AXIS_WHEEL, &coords->wheel))
|
||||
coords->wheel = CLAMP (coords->wheel, 0.0, 1.0);
|
||||
else
|
||||
coords->wheel = 0.5;
|
||||
coords->wheel = GIMP_COORDS_DEFAULT_WHEEL;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
|
@ -126,10 +126,10 @@ gimp_paint_core_stroke_boundary (GimpPaintCore *core,
|
|||
|
||||
coords[n_coords].x = (gdouble) (stroke_segs[0].x1 - off_x + 0.5);
|
||||
coords[n_coords].y = (gdouble) (stroke_segs[0].y1 - off_y + 0.5);
|
||||
coords[n_coords].pressure = 1.0;
|
||||
coords[n_coords].xtilt = 0.5;
|
||||
coords[n_coords].ytilt = 0.5;
|
||||
coords[n_coords].wheel = 0.5;
|
||||
coords[n_coords].pressure = GIMP_COORDS_DEFAULT_PRESSURE;
|
||||
coords[n_coords].xtilt = GIMP_COORDS_DEFAULT_TILT;
|
||||
coords[n_coords].ytilt = GIMP_COORDS_DEFAULT_TILT;
|
||||
coords[n_coords].wheel = GIMP_COORDS_DEFAULT_WHEEL;
|
||||
|
||||
n_coords++;
|
||||
|
||||
|
@ -146,10 +146,10 @@ gimp_paint_core_stroke_boundary (GimpPaintCore *core,
|
|||
off_x + 0.5);
|
||||
coords[n_coords].y = (gdouble) (stroke_segs[seg].y1 -
|
||||
off_y + 0.5);
|
||||
coords[n_coords].pressure = 1.0;
|
||||
coords[n_coords].xtilt = 0.5;
|
||||
coords[n_coords].ytilt = 0.5;
|
||||
coords[n_coords].wheel = 0.5;
|
||||
coords[n_coords].pressure = GIMP_COORDS_DEFAULT_PRESSURE;
|
||||
coords[n_coords].xtilt = GIMP_COORDS_DEFAULT_TILT;
|
||||
coords[n_coords].ytilt = GIMP_COORDS_DEFAULT_TILT;
|
||||
coords[n_coords].wheel = GIMP_COORDS_DEFAULT_WHEEL;
|
||||
|
||||
n_coords++;
|
||||
seg++;
|
||||
|
@ -191,10 +191,10 @@ gimp_paint_core_stroke_boundary (GimpPaintCore *core,
|
|||
|
||||
coords[n_coords].x = (gdouble) (stroke_segs[seg].x1 - off_x + 0.5);
|
||||
coords[n_coords].y = (gdouble) (stroke_segs[seg].y1 - off_y + 0.5);
|
||||
coords[n_coords].pressure = 1.0;
|
||||
coords[n_coords].xtilt = 0.5;
|
||||
coords[n_coords].ytilt = 0.5;
|
||||
coords[n_coords].wheel = 0.5;
|
||||
coords[n_coords].pressure = GIMP_COORDS_DEFAULT_PRESSURE;
|
||||
coords[n_coords].xtilt = GIMP_COORDS_DEFAULT_TILT;
|
||||
coords[n_coords].ytilt = GIMP_COORDS_DEFAULT_TILT;
|
||||
coords[n_coords].wheel = GIMP_COORDS_DEFAULT_WHEEL;
|
||||
|
||||
n_coords++;
|
||||
}
|
||||
|
|
|
@ -116,10 +116,10 @@ paint_tools_stroke (Gimp *gimp,
|
|||
{
|
||||
coords[i].x = strokes[2 * i];
|
||||
coords[i].y = strokes[2 * i + 1];
|
||||
coords[i].pressure = 1.0;
|
||||
coords[i].xtilt = 0.5;
|
||||
coords[i].ytilt = 0.5;
|
||||
coords[i].wheel = 0.5;
|
||||
coords[i].pressure = GIMP_COORDS_DEFAULT_PRESSURE;
|
||||
coords[i].xtilt = GIMP_COORDS_DEFAULT_TILT;
|
||||
coords[i].ytilt = GIMP_COORDS_DEFAULT_TILT;
|
||||
coords[i].wheel = GIMP_COORDS_DEFAULT_WHEEL;
|
||||
}
|
||||
|
||||
retval = gimp_paint_core_stroke (core, drawable, options,
|
||||
|
|
|
@ -112,10 +112,10 @@ gimp_text_vector_coords (RenderContext *context,
|
|||
{
|
||||
coords->x = context->offset_x + (gdouble) vector->x / 64.0;
|
||||
coords->y = context->offset_y - (gdouble) vector->y / 64.0;
|
||||
coords->pressure = 1.0;
|
||||
coords->xtilt = 0.5;
|
||||
coords->ytilt = 0.5;
|
||||
coords->wheel = 0.5;
|
||||
coords->pressure = GIMP_COORDS_DEFAULT_PRESSURE;
|
||||
coords->xtilt = GIMP_COORDS_DEFAULT_TILT;
|
||||
coords->ytilt = GIMP_COORDS_DEFAULT_TILT;
|
||||
coords->wheel = GIMP_COORDS_DEFAULT_WHEEL;
|
||||
}
|
||||
|
||||
static gint
|
||||
|
|
|
@ -774,10 +774,10 @@ paint_tools_stroke (Gimp *gimp,
|
|||
{
|
||||
coords[i].x = strokes[2 * i];
|
||||
coords[i].y = strokes[2 * i + 1];
|
||||
coords[i].pressure = 1.0;
|
||||
coords[i].xtilt = 0.5;
|
||||
coords[i].ytilt = 0.5;
|
||||
coords[i].wheel = 0.5;
|
||||
coords[i].pressure = GIMP_COORDS_DEFAULT_PRESSURE;
|
||||
coords[i].xtilt = GIMP_COORDS_DEFAULT_TILT;
|
||||
coords[i].ytilt = GIMP_COORDS_DEFAULT_TILT;
|
||||
coords[i].wheel = GIMP_COORDS_DEFAULT_WHEEL;
|
||||
}
|
||||
|
||||
retval = gimp_paint_core_stroke (core, drawable, options,
|
||||
|
|
Loading…
Reference in New Issue