fixed a compiler warning.

2004-05-24  Sven Neumann  <sven@gimp.org>

	* plug-ins/maze/maze_face.c: fixed a compiler warning.

2004-05-24  Sven Neumann  <sven@gimp.org>

	Applied a patch from Philip Lafleur (bug #142808):

	* app/paint/gimppaintcore.h: define PRESSURE_SCALE to 1.5

	* app/paint/gimpairbrush.c
	* app/paint/gimpclone.c
	* app/paint/gimpconvolve.c
	* app/paint/gimpdodgeburn.c
	* app/paint/gimperaser.c
	* app/paint/gimppaintbrush.c
	* app/paint/gimpsmudge.c: use the PRESSURE_SCALE constant.
This commit is contained in:
Sven Neumann 2004-05-24 13:11:43 +00:00 committed by Sven Neumann
parent 1c62ddef4d
commit 1c860eb121
11 changed files with 51 additions and 30 deletions

View File

@ -1,3 +1,21 @@
2004-05-24 Sven Neumann <sven@gimp.org>
* plug-ins/maze/maze_face.c: fixed a compiler warning.
2004-05-24 Sven Neumann <sven@gimp.org>
Applied a patch from Philip Lafleur (bug #142808):
* app/paint/gimppaintcore.h: define PRESSURE_SCALE to 1.5
* app/paint/gimpairbrush.c
* app/paint/gimpclone.c
* app/paint/gimpconvolve.c
* app/paint/gimpdodgeburn.c
* app/paint/gimperaser.c
* app/paint/gimppaintbrush.c
* app/paint/gimpsmudge.c: use the PRESSURE_SCALE constant.
2004-05-24 Michael Natterer <mitch@gimp.org>
Long overdue core container cleanup:

View File

@ -174,8 +174,8 @@ gimp_airbrush_paint (GimpPaintCore *paint_core,
airbrush->paint_options = paint_options;
timeout = (paint_options->pressure_options->rate ?
(10000 / (options->rate * 2.0 * paint_core->cur_coords.pressure)) :
(10000 / options->rate));
(10000 / (options->rate * PRESSURE_SCALE * paint_core->cur_coords.pressure)) :
(10000 / options->rate));
airbrush->timeout_id = g_timeout_add (timeout,
gimp_airbrush_timeout,
@ -217,7 +217,7 @@ gimp_airbrush_motion (GimpPaintCore *paint_core,
saved_pressure = paint_options->pressure_options->pressure;
if (saved_pressure)
opacity *= 2.0 * paint_core->cur_coords.pressure;
opacity *= PRESSURE_SCALE * paint_core->cur_coords.pressure;
paint_options->pressure_options->pressure = FALSE;
_gimp_paintbrush_motion (paint_core, drawable, paint_options, opacity);

View File

@ -446,7 +446,7 @@ gimp_clone_motion (GimpPaintCore *paint_core,
}
if (pressure_options->opacity)
opacity *= 2.0 * paint_core->cur_coords.pressure;
opacity *= PRESSURE_SCALE * paint_core->cur_coords.pressure;
/* paste the newly painted canvas to the gimage which is being worked on */
gimp_paint_core_paste_canvas (paint_core, drawable,

View File

@ -252,7 +252,7 @@ gimp_convolve_motion (GimpPaintCore *paint_core,
rate = options->rate;
if (pressure_options->rate)
rate *= 2.0 * paint_core->cur_coords.pressure;
rate *= PRESSURE_SCALE * paint_core->cur_coords.pressure;
gimp_convolve_calculate_matrix (options->type, rate);

View File

@ -302,7 +302,7 @@ gimp_dodge_burn_motion (GimpPaintCore *paint_core,
copy_region (&tempPR, &destPR);
if (pressure_options->opacity)
opacity *= 2.0 * paint_core->cur_coords.pressure;
opacity *= PRESSURE_SCALE * paint_core->cur_coords.pressure;
/* Replace the newly dodgedburned area (canvas_buf) to the gimage */
gimp_paint_core_replace_canvas (paint_core, drawable,

View File

@ -178,7 +178,7 @@ gimp_eraser_motion (GimpPaintCore *paint_core,
area->width * area->height, area->bytes);
if (pressure_options->opacity)
opacity *= 2.0 * paint_core->cur_coords.pressure;
opacity *= PRESSURE_SCALE * paint_core->cur_coords.pressure;
gimp_paint_core_paste_canvas (paint_core, drawable,
MIN (opacity, GIMP_OPACITY_OPAQUE),

View File

@ -214,7 +214,7 @@ _gimp_paintbrush_motion (GimpPaintCore *paint_core,
}
if (pressure_options->opacity)
opacity *= 2.0 * paint_core->cur_coords.pressure;
opacity *= PRESSURE_SCALE * paint_core->cur_coords.pressure;
gimp_paint_core_paste_canvas (paint_core, drawable,
MIN (opacity, GIMP_OPACITY_OPAQUE),

View File

@ -23,8 +23,10 @@
#include "core/gimpobject.h"
#define PAINT_CORE_SUBSAMPLE 4
#define PAINT_CORE_SOLID_SUBSAMPLE 2
#define PAINT_CORE_SUBSAMPLE 4
#define PAINT_CORE_SOLID_SUBSAMPLE 2
#define PRESSURE_SCALE 1.5
/* the different states that the painting function can be called with */

View File

@ -307,8 +307,8 @@ gimp_smudge_motion (GimpPaintCore *paint_core,
/* Enable pressure sensitive rate */
if (pressure_options->rate)
rate = MIN (options->rate / 100.0 * 2.0 * paint_core->cur_coords.pressure,
1.0);
rate = MIN (options->rate / 100.0 * PRESSURE_SCALE *
paint_core->cur_coords.pressure, 1.0);
else
rate = options->rate / 100.0;
@ -361,7 +361,7 @@ gimp_smudge_motion (GimpPaintCore *paint_core,
copy_region (&tempPR, &destPR);
if (pressure_options->opacity)
opacity *= 2.0 * paint_core->cur_coords.pressure;
opacity *= PRESSURE_SCALE * paint_core->cur_coords.pressure;
/* Replace the newly made paint area to the gimage */
gimp_paint_core_replace_canvas (paint_core, drawable,

View File

@ -446,7 +446,7 @@ gimp_clone_motion (GimpPaintCore *paint_core,
}
if (pressure_options->opacity)
opacity *= 2.0 * paint_core->cur_coords.pressure;
opacity *= PRESSURE_SCALE * paint_core->cur_coords.pressure;
/* paste the newly painted canvas to the gimage which is being worked on */
gimp_paint_core_paste_canvas (paint_core, drawable,

View File

@ -72,18 +72,20 @@ typedef struct
gchar buffer[BUFSIZE];
gboolean maze_dialog (void);
gboolean maze_dialog (void);
static void maze_msg (const gchar *msg);
static void maze_response (GtkWidget *widget,
gint response_id,
gpointer data);
static void maze_help (void);
static void maze_msg (gchar *msg);
static void maze_response (GtkWidget *widget,
gint response_id,
gpointer data);
static void maze_help (void);
#ifdef SHOW_PRNG_PRIVATES
static void maze_entry_callback (GtkWidget *widget,
gpointer data);
static void maze_entry_callback (GtkWidget *widget,
gpointer data);
#endif
/* Looking back, it would probably have been easier to completely
* re-write the whole entry/scale thing to work with the divbox stuff.
* It would undoubtably be cleaner code. But since I already *had*
@ -175,7 +177,6 @@ maze_dialog (void)
GtkWidget *hbox;
GtkWidget *frame;
gint trow = 0;
gchar *message;
gimp_ui_init ("maze", FALSE);
@ -557,9 +558,6 @@ maze_help (void)
GimpParamDef *params;
GimpParamDef *return_vals;
gint baz;
gchar *message;
if (gimp_procedural_db_proc_info ("plug_in_web_browser",
&proc_blurb,
&proc_help,
@ -570,24 +568,27 @@ maze_help (void)
&nparams, &nreturn_vals,
&params, &return_vals))
{
/* open URL for help */
message = g_strdup_printf (_("Opening %s"), MAZE_URL);
gchar *message = g_strdup_printf (_("Opening %s"), MAZE_URL);
gint baz;
maze_msg (message);
g_free (message);
gimp_run_procedure ("plug_in_web_browser", &baz,
GIMP_PDB_STRING, MAZE_URL,
GIMP_PDB_END);
}
else
{
message = g_strdup_printf (_("See %s"), MAZE_URL);
gchar *message = g_strdup_printf (_("See %s"), MAZE_URL);
maze_msg (message);
g_free (message);
}
}
static void
maze_msg (gchar *msg)
maze_msg (const gchar *msg)
{
gtk_label_set_text (GTK_LABEL (msg_label), msg);
}