Commit 9ea91143 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

app/paint/Makefile.am app/paint/paint-enums.h split enums into their own

2002-03-19  Sven Neumann  <sven@gimp.org>

	* app/paint/Makefile.am
	* app/paint/paint-enums.h
	* app/paint/paint-types.h: split enums into their own file and
	namespacified them.

	* app/tools/Makefile.am
	* app/tools/tools-enums.h
	* app/tools/tools-types.h: split enums into their own file.

	* app/paint/gimpairbrush.c
	* app/paint/gimpclone.[ch]
	* app/paint/gimpconvolve.[ch]
	* app/paint/gimpdodgeburn.[ch]
	* app/paint/gimperaser.c
	* app/paint/gimppaintbrush.c
	* app/paint/gimppaintcore.[ch]
	* app/paint/gimppaintoptions.c
	* app/paint/gimppencil.c
	* app/paint/gimpsmudge.c
	* app/tools/gimpclonetool.c
	* app/tools/gimpconvolvetool.c
	* app/tools/gimpdodgeburntool.c
	* app/tools/paint_options.c
	* plug-ins/gfig/gfig.c: changed accordingly.

	* libgimp/gimpcompat.h
	* plug-ins/script-fu/siod-wrapper.c: added compatibility defines for
	changed enums.

	* tools/pdbgen/Makefile.am: updated list of headers to parse for enums.

	* app/pdb/paint_tools_cmds.c
	* libgimp/gimpenums.h
	* plug-ins/script-fu/script-fu-constants.c
	* tools/pdbgen/enums.pl
	* tools/pdbgen/pdb/paint_tools.pdb: regenerated.
parent bbf506ef
2002-03-19 Sven Neumann <sven@gimp.org>
* app/paint/Makefile.am
* app/paint/paint-enums.h
* app/paint/paint-types.h: split enums into their own file and
namespacified them.
* app/tools/Makefile.am
* app/tools/tools-enums.h
* app/tools/tools-types.h: split enums into their own file.
* app/paint/gimpairbrush.c
* app/paint/gimpclone.[ch]
* app/paint/gimpconvolve.[ch]
* app/paint/gimpdodgeburn.[ch]
* app/paint/gimperaser.c
* app/paint/gimppaintbrush.c
* app/paint/gimppaintcore.[ch]
* app/paint/gimppaintoptions.c
* app/paint/gimppencil.c
* app/paint/gimpsmudge.c
* app/tools/gimpclonetool.c
* app/tools/gimpconvolvetool.c
* app/tools/gimpdodgeburntool.c
* app/tools/paint_options.c
* plug-ins/gfig/gfig.c: changed accordingly.
* libgimp/gimpcompat.h
* plug-ins/script-fu/siod-wrapper.c: added compatibility defines for
changed enums.
* tools/pdbgen/Makefile.am: updated list of headers to parse for enums.
* app/pdb/paint_tools_cmds.c
* libgimp/gimpenums.h
* plug-ins/script-fu/script-fu-constants.c
* tools/pdbgen/enums.pl
* tools/pdbgen/pdb/paint_tools.pdb: regenerated.
2002-03-19 Michael Natterer <mitch@gimp.org>
* app/gui/menus.c: Oops, GimpContainer's "reorder" signal has more
......
......@@ -3,6 +3,7 @@
noinst_LIBRARIES = libapppaint.a
libapppaint_a_SOURCES = @STRIP_BEGIN@ \
paint-enums.h \
paint-types.h \
paint.c \
paint.h \
......
......@@ -253,20 +253,21 @@ gimp_airbrush_motion (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options)
{
GimpImage *gimage;
GimpContext *context;
TempBuf *area;
guchar col[MAX_CHANNELS];
gdouble scale;
PaintApplicationMode paint_appl_mode;
gdouble pressure;
GimpImage *gimage;
GimpContext *context;
TempBuf *area;
guchar col[MAX_CHANNELS];
gdouble scale;
GimpPaintApplicationMode paint_appl_mode;
gdouble pressure;
if (! (gimage = gimp_item_get_image (GIMP_ITEM (drawable))))
return;
context = gimp_get_current_context (gimage->gimp);
paint_appl_mode = paint_options->incremental ? INCREMENTAL : CONSTANT;
paint_appl_mode = (paint_options->incremental ?
GIMP_PAINT_INCREMENTAL : GIMP_PAINT_CONSTANT);
pressure = ((GimpAirbrushOptions *) paint_options)->pressure / 100.0;
......@@ -292,7 +293,7 @@ gimp_airbrush_motion (GimpPaintCore *paint_core,
&col[BLUE_PIX],
&col[ALPHA_PIX]);
paint_appl_mode = INCREMENTAL;
paint_appl_mode = GIMP_PAINT_INCREMENTAL;
color_pixels (temp_buf_data (area), col,
area->width * area->height,
......@@ -300,11 +301,11 @@ gimp_airbrush_motion (GimpPaintCore *paint_core,
}
else if (paint_core->brush && paint_core->brush->pixmap)
{
paint_appl_mode = INCREMENTAL;
paint_appl_mode = GIMP_PAINT_INCREMENTAL;
gimp_paint_core_color_area_with_pixmap (paint_core, gimage,
drawable, area,
scale, SOFT);
scale, GIMP_BRUSH_SOFT);
}
else
{
......@@ -322,7 +323,7 @@ gimp_airbrush_motion (GimpPaintCore *paint_core,
MIN (pressure, GIMP_OPACITY_OPAQUE),
gimp_context_get_opacity (context),
gimp_context_get_paint_mode (context),
SOFT, scale, paint_appl_mode);
GIMP_BRUSH_SOFT, scale, paint_appl_mode);
}
......
......@@ -54,7 +54,7 @@ static void gimp_clone_motion (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpDrawable *src_drawable,
GimpPressureOptions *pressure_options,
CloneType type,
GimpCloneType type,
gint offset_x,
gint offset_y);
static void gimp_clone_line_image (GimpImage *dest,
......@@ -248,7 +248,7 @@ gimp_clone_paint (GimpPaintCore *paint_core,
if (clone->init_callback)
clone->init_callback (clone, clone->callback_data);
if (options->type == PATTERN_CLONE)
if (options->type == GIMP_PATTERN_CLONE)
if (! gimp_context_get_pattern (context))
g_message (_("No patterns available for this operation."));
break;
......@@ -274,7 +274,7 @@ gimp_clone_motion (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpDrawable *src_drawable,
GimpPressureOptions *pressure_options,
CloneType type,
GimpCloneType type,
gint offset_x,
gint offset_y)
{
......@@ -298,7 +298,7 @@ gimp_clone_motion (GimpPaintCore *paint_core,
pattern = NULL;
/* Make sure we still have a source if we are doing image cloning */
if (type == IMAGE_CLONE)
if (type == GIMP_IMAGE_CLONE)
{
if (!src_drawable)
return;
......@@ -327,7 +327,7 @@ gimp_clone_motion (GimpPaintCore *paint_core,
switch (type)
{
case IMAGE_CLONE:
case GIMP_IMAGE_CLONE:
/* Set the paint area to transparent */
temp_buf_data_clear (area);
......@@ -390,7 +390,7 @@ gimp_clone_motion (GimpPaintCore *paint_core,
pr = pixel_regions_register (2, &srcPR, &destPR);
break;
case PATTERN_CLONE:
case GIMP_PATTERN_CLONE:
pattern = gimp_context_get_pattern (context);
if (!pattern)
......@@ -415,14 +415,14 @@ gimp_clone_motion (GimpPaintCore *paint_core,
{
switch (type)
{
case IMAGE_CLONE:
case GIMP_IMAGE_CLONE:
gimp_clone_line_image (gimage, src_gimage,
drawable, src_drawable,
s, d, has_alpha,
srcPR.bytes, destPR.bytes, destPR.w);
s += srcPR.rowstride;
break;
case PATTERN_CLONE:
case GIMP_PATTERN_CLONE:
gimp_clone_line_pattern (gimage, drawable,
pattern, d,
area->x + offset_x,
......@@ -445,8 +445,9 @@ gimp_clone_motion (GimpPaintCore *paint_core,
MIN (opacity, GIMP_OPACITY_OPAQUE),
gimp_context_get_opacity (context),
gimp_context_get_paint_mode (context),
pressure_options->pressure ? PRESSURE : SOFT,
scale, CONSTANT);
(pressure_options->pressure ?
GIMP_BRUSH_PRESSURE : GIMP_BRUSH_SOFT),
scale, GIMP_PAINT_CONSTANT);
}
static void
......@@ -558,7 +559,7 @@ gimp_clone_set_src_drawable (GimpClone *clone,
/* paint options stuff */
#define CLONE_DEFAULT_TYPE IMAGE_CLONE
#define CLONE_DEFAULT_TYPE GIMP_IMAGE_CLONE
#define CLONE_DEFAULT_ALIGNED ALIGN_NO
GimpCloneOptions *
......
......@@ -77,8 +77,8 @@ struct _GimpCloneOptions
{
GimpPaintOptions paint_options;
CloneType type;
CloneType type_d;
GimpCloneType type;
GimpCloneType type_d;
GtkWidget *type_w[2]; /* 2 radio buttons */
AlignType aligned;
......
......@@ -63,11 +63,11 @@ static void gimp_convolve_paint (GimpPaintCore *paint_core,
static void gimp_convolve_motion (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpPressureOptions *pressure_options,
ConvolveType type,
GimpConvolveType type,
gdouble rate);
static void gimp_convolve_calculate_matrix (ConvolveType type,
static void gimp_convolve_calculate_matrix (GimpConvolveType type,
gdouble rate);
static void gimp_convolve_integer_matrix (gfloat *source,
gint *dest,
......@@ -194,7 +194,7 @@ static void
gimp_convolve_motion (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpPressureOptions *pressure_options,
ConvolveType type,
GimpConvolveType type,
gdouble rate)
{
TempBuf *area;
......@@ -417,14 +417,15 @@ gimp_convolve_motion (GimpPaintCore *paint_core,
gimp_paint_core_replace_canvas (paint_core, drawable,
GIMP_OPACITY_OPAQUE,
gimp_context_get_opacity (context),
pressure_options->pressure ? PRESSURE : SOFT,
(pressure_options->pressure ?
GIMP_BRUSH_PRESSURE : GIMP_BRUSH_SOFT),
scale,
INCREMENTAL);
GIMP_PAINT_INCREMENTAL);
}
static void
gimp_convolve_calculate_matrix (ConvolveType type,
gdouble rate)
gimp_convolve_calculate_matrix (GimpConvolveType type,
gdouble rate)
{
gfloat percent;
......@@ -434,19 +435,19 @@ gimp_convolve_calculate_matrix (ConvolveType type,
/* get the appropriate convolution matrix and size and divisor */
switch (type)
{
case BLUR_CONVOLVE:
case GIMP_BLUR_CONVOLVE:
matrix_size = 5;
blur_matrix [12] = MIN_BLUR + percent * (MAX_BLUR - MIN_BLUR);
gimp_convolve_copy_matrix (blur_matrix, custom_matrix, matrix_size);
break;
case SHARPEN_CONVOLVE:
case GIMP_SHARPEN_CONVOLVE:
matrix_size = 5;
sharpen_matrix [12] = MIN_SHARPEN + percent * (MAX_SHARPEN - MIN_SHARPEN);
gimp_convolve_copy_matrix (sharpen_matrix, custom_matrix, matrix_size);
break;
case CUSTOM_CONVOLVE:
case GIMP_CUSTOM_CONVOLVE:
matrix_size = 5;
break;
}
......@@ -500,7 +501,7 @@ gimp_convolve_sum_matrix (gint *matrix,
/* paint options stuff */
#define DEFAULT_CONVOLVE_RATE 50.0
#define DEFAULT_CONVOLVE_TYPE BLUR_CONVOLVE
#define DEFAULT_CONVOLVE_TYPE GIMP_BLUR_CONVOLVE
GimpConvolveOptions *
gimp_convolve_options_new (void)
......
......@@ -52,8 +52,8 @@ struct _GimpConvolveOptions
{
GimpPaintOptions paint_options;
ConvolveType type;
ConvolveType type_d;
GimpConvolveType type;
GimpConvolveType type_d;
GtkWidget *type_w[2];
gdouble rate;
......
......@@ -43,7 +43,7 @@ static void gimp_dodgeburn_init (GimpDodgeBurn *dodgeburn);
static void gimp_dodgeburn_make_luts (GimpPaintCore *paint_core,
gdouble db_exposure,
DodgeBurnType type,
GimpDodgeBurnType type,
GimpTransferMode mode,
GimpLut *lut,
GimpDrawable *drawable);
......@@ -134,7 +134,7 @@ gimp_dodgeburn_init (GimpDodgeBurn *dodgeburn)
static void
gimp_dodgeburn_make_luts (GimpPaintCore *paint_core,
gdouble db_exposure,
DodgeBurnType type,
GimpDodgeBurnType type,
GimpTransferMode mode,
GimpLut *lut,
GimpDrawable *drawable)
......@@ -146,7 +146,7 @@ gimp_dodgeburn_make_luts (GimpPaintCore *paint_core,
exposure = db_exposure / 100.0;
/* make the exposure negative if burn for luts*/
if (type == BURN)
if (type == GIMP_BURN)
exposure = -exposure;
switch (mode)
......@@ -313,8 +313,9 @@ gimp_dodgeburn_motion (GimpPaintCore *paint_core,
gimp_paint_core_replace_canvas (paint_core, drawable,
MIN (opacity, GIMP_OPACITY_OPAQUE),
GIMP_OPACITY_OPAQUE,
pressure_options->pressure ? PRESSURE : SOFT,
scale, CONSTANT);
(pressure_options->pressure ?
GIMP_BRUSH_PRESSURE : GIMP_BRUSH_SOFT),
scale, GIMP_PAINT_CONSTANT);
g_free (temp_data);
}
......@@ -394,7 +395,7 @@ gimp_dodgeburn_shadows_lut_func (gpointer user_data,
/* paint options stuff */
#define DODGEBURN_DEFAULT_EXPOSURE 50.0
#define DODGEBURN_DEFAULT_TYPE DODGE
#define DODGEBURN_DEFAULT_TYPE GIMP_DODGE
#define DODGEBURN_DEFAULT_MODE GIMP_HIGHLIGHTS
GimpDodgeBurnOptions *
......
......@@ -49,21 +49,21 @@ typedef struct _GimpDodgeBurnOptions GimpDodgeBurnOptions;
struct _GimpDodgeBurnOptions
{
GimpPaintOptions paint_options;
GimpPaintOptions paint_options;
DodgeBurnType type;
DodgeBurnType type_d;
GtkWidget *type_w[2];
GimpDodgeBurnType type;
GimpDodgeBurnType type_d;
GtkWidget *type_w[2];
GimpTransferMode mode; /*highlights, midtones, shadows*/
GimpTransferMode mode_d;
GtkWidget *mode_w;
GimpTransferMode mode; /*highlights, midtones, shadows*/
GimpTransferMode mode_d;
GtkWidget *mode_w;
gdouble exposure;
gdouble exposure_d;
GtkObject *exposure_w;
gdouble exposure;
gdouble exposure_d;
GtkObject *exposure_w;
GimpLut *lut;
GimpLut *lut;
};
......
......@@ -147,6 +147,7 @@ gimp_eraser_motion (GimpPaintCore *paint_core,
TempBuf *area;
guchar col[MAX_CHANNELS];
gdouble scale;
GimpBrushApplicationMode brush_mode;
if (! (gimage = gimp_item_get_image (GIMP_ITEM (drawable))))
return;
......@@ -183,13 +184,22 @@ gimp_eraser_motion (GimpPaintCore *paint_core,
/* paste the newly painted canvas to the gimage which is being
* worked on
*/
if (options->hard)
brush_mode = GIMP_BRUSH_HARD;
else
brush_mode = (pressure_options->pressure ?
GIMP_BRUSH_PRESSURE : GIMP_BRUSH_SOFT);
gimp_paint_core_paste_canvas (paint_core, drawable,
MIN (opacity, GIMP_OPACITY_OPAQUE),
gimp_context_get_opacity (context),
options->anti_erase ? GIMP_ANTI_ERASE_MODE : GIMP_ERASE_MODE,
options->hard ? HARD : (pressure_options->pressure ? PRESSURE : SOFT),
(options->anti_erase ?
GIMP_ANTI_ERASE_MODE : GIMP_ERASE_MODE),
brush_mode,
scale,
paint_options->incremental ? INCREMENTAL : CONSTANT);
(paint_options->incremental ?
GIMP_PAINT_INCREMENTAL : GIMP_PAINT_CONSTANT));
}
......
......@@ -41,22 +41,22 @@
#include "gimppaintoptions.h"
static void gimp_paintbrush_class_init (GimpPaintbrushClass *klass);
static void gimp_paintbrush_init (GimpPaintbrush *paintbrush);
static void gimp_paintbrush_class_init (GimpPaintbrushClass *klass);
static void gimp_paintbrush_init (GimpPaintbrush *paintbrush);
static void gimp_paintbrush_paint (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options,
GimpPaintCoreState paint_state);
static void gimp_paintbrush_paint (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options,
GimpPaintCoreState paint_state);
static void gimp_paintbrush_motion (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpPressureOptions *pressure_options,
GimpGradientOptions *gradient_options,
gdouble fade_out,
gdouble gradient_length,
gboolean incremental,
GradientPaintMode gradient_type);
static void gimp_paintbrush_motion (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpPressureOptions *pressure_options,
GimpGradientOptions *gradient_options,
gdouble fade_out,
gdouble gradient_length,
gboolean incremental,
GimpGradientPaintMode gradient_type);
static GimpPaintCoreClass *parent_class = NULL;
......@@ -197,26 +197,29 @@ gimp_paintbrush_paint (GimpPaintCore *paint_core,
}
static void
gimp_paintbrush_motion (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpPressureOptions *pressure_options,
GimpGradientOptions *gradient_options,
gdouble fade_out,
gdouble gradient_length,
gboolean incremental,
GradientPaintMode gradient_type)
gimp_paintbrush_motion (GimpPaintCore *paint_core,
GimpDrawable *drawable,
GimpPressureOptions *pressure_options,
GimpGradientOptions *gradient_options,
gdouble fade_out,
gdouble gradient_length,
gboolean incremental,
GimpGradientPaintMode gradient_type)
{
GimpImage *gimage;
GimpContext *context;
TempBuf *area;
gdouble x, paint_left;
guchar local_blend = OPAQUE_OPACITY;
guchar temp_blend = OPAQUE_OPACITY;
guchar col[MAX_CHANNELS];
GimpRGB color;
gdouble opacity;
gdouble scale;
PaintApplicationMode paint_appl_mode = incremental ? INCREMENTAL : CONSTANT;
GimpImage *gimage;
GimpContext *context;
TempBuf *area;
gdouble x, paint_left;
guchar local_blend = OPAQUE_OPACITY;
guchar temp_blend = OPAQUE_OPACITY;
guchar col[MAX_CHANNELS];
GimpRGB color;
gdouble opacity;
gdouble scale;
GimpPaintApplicationMode paint_appl_mode = (incremental ?
GIMP_PAINT_INCREMENTAL :
GIMP_PAINT_CONSTANT);
gimage = gimp_item_get_image (GIMP_ITEM (drawable));
......@@ -275,7 +278,7 @@ gimp_paintbrush_motion (GimpPaintCore *paint_core,
/* always use incremental mode with gradients */
/* make the gui cool later */
paint_appl_mode = INCREMENTAL;
paint_appl_mode = GIMP_PAINT_INCREMENTAL;
color_pixels (temp_buf_data (area), col,
area->width * area->height, area->bytes);
}
......@@ -286,8 +289,8 @@ gimp_paintbrush_motion (GimpPaintCore *paint_core,
{
gimp_paint_core_color_area_with_pixmap (paint_core, gimage, drawable,
area,
scale, SOFT);
paint_appl_mode = INCREMENTAL;
scale, GIMP_BRUSH_SOFT);
paint_appl_mode = GIMP_PAINT_INCREMENTAL;
}
else
{
......@@ -306,7 +309,8 @@ gimp_paintbrush_motion (GimpPaintCore *paint_core,
MIN (opacity, GIMP_OPACITY_OPAQUE),
gimp_context_get_opacity (context),
gimp_context_get_paint_mode (context),
pressure_options->pressure ? PRESSURE : SOFT,
(pressure_options->pressure ?
GIMP_BRUSH_PRESSURE : GIMP_BRUSH_SOFT),
scale, paint_appl_mode);
}
}
......@@ -90,7 +90,7 @@ static MaskBuf * gimp_paint_core_scale_pixmap (GimpPaintCore *core,
gdouble scale);
static MaskBuf * gimp_paint_core_get_brush_mask (GimpPaintCore *core,
BrushApplicationMode brush_hardness,
GimpBrushApplicationMode brush_hardness,
gdouble scale);
static void gimp_paint_core_paste (GimpPaintCore *core,
MaskBuf *brush_mask,
......@@ -98,13 +98,13 @@ static void gimp_paint_core_paste (GimpPaintCore *core,
gdouble brush_opacity,
gdouble image_opacity,
GimpLayerModeEffects paint_mode,
PaintApplicationMode mode);
GimpPaintApplicationMode mode);
static void gimp_paint_core_replace (GimpPaintCore *core,
MaskBuf *brush_mask,
GimpDrawable *drawable,
gdouble brush_opacity,
gdouble image_opacity,
PaintApplicationMode mode);
GimpPaintApplicationMode mode);
static void brush_to_canvas_tiles (GimpPaintCore *core,
MaskBuf *brush_mask,
......@@ -139,7 +139,7 @@ static void paint_line_pixmap_mask (GimpImage *dest,
gint y,
gint bytes,
gint width,
BrushApplicationMode mode);
GimpBrushApplicationMode mode);
static GimpObjectClass *parent_class = NULL;
......@@ -636,21 +636,23 @@ gimp_paint_core_interpolate (GimpPaintCore *core,
/* protected functions */
void
gimp_paint_core_get_color_from_gradient (GimpPaintCore *core,
GimpGradient *gradient,
gdouble gradient_length,
GimpRGB *color,
GradientPaintMode mode)
gimp_paint_core_get_color_from_gradient (GimpPaintCore *core,
GimpGradient *gradient,
gdouble gradient_length,
GimpRGB *color,
GimpGradientPaintMode mode)
{
gdouble pos;
pos = (gdouble) core->pixel_dist / gradient_length;
/* for the once modes, set pos close to 1.0 after the first chunk */
if ((mode == ONCE_FORWARD || mode == ONCE_BACKWARDS) && pos >= 1.0)
if ((mode == GIMP_GRADIENT_ONCE_FORWARD ||
mode == GIMP_GRADIENT_ONCE_BACKWARD) && pos >= 1.0)
pos = 0.9999999;
if ((((gint) pos & 1) && mode != LOOP_SAWTOOTH) || mode == ONCE_BACKWARDS )
if ((((gint) pos & 1) && mode != GIMP_GRADIENT_LOOP_SAWTOOTH) ||
mode == GIMP_GRADIENT_ONCE_BACKWARD)
pos = 1.0 - (pos - (gint) pos);
else
pos = pos - (gint) pos;
......@@ -791,14 +793,14 @@ gimp_paint_core_get_orig_image (GimpPaintCore *core,
}
void
gimp_paint_core_paste_canvas (GimpPaintCore *core,
GimpDrawable *drawable,
gdouble brush_opacity,
gdouble image_opacity,
GimpLayerModeEffects paint_mode,
BrushApplicationMode brush_hardness,
gdouble brush_scale,
PaintApplicationMode mode)
gimp_paint_core_paste_canvas (GimpPaintCore *core,
GimpDrawable *drawable,
gdouble brush_opacity,
gdouble image_opacity,
GimpLayerModeEffects paint_mode,
GimpBrushApplicationMode brush_hardness,
gdouble brush_scale,
GimpPaintApplicationMode mode)
{
MaskBuf *brush_mask;
......@@ -819,13 +821,13 @@ gimp_paint_core_paste_canvas (GimpPaintCore *core,
* becomes transparent rather than opauqe.
*/
void
gimp_paint_core_replace_canvas (GimpPaintCore *core,
GimpDrawable *drawable,
gdouble brush_opacity,
gdouble image_opacity,
BrushApplicationMode brush_hardness,
gdouble brush_scale,
PaintApplicationMode mode)
gimp_paint_core_replace_canvas (GimpPaintCore *core,
GimpDrawable *drawable,
gdouble brush_opacity,
gdouble image_opacity,
GimpBrushApplicationMode brush_hardness,
gdouble brush_scale,
GimpPaintApplicationMode mode)
{
MaskBuf *brush_mask;
......@@ -1197,9 +1199,9 @@ gimp_paint_core_scale_pixmap (GimpPaintCore *core,
}
static MaskBuf *
gimp_paint_core_get_brush_mask (GimpPaintCore *core,
BrushApplicationMode brush_hardness,
gdouble scale)
gimp_paint_core_get_brush_mask (GimpPaintCore *core,
GimpBrushApplicationMode brush_hardness,
gdouble scale)
{
MaskBuf *mask;
......@@ -1215,15 +1217,15 @@ gimp_paint_core_get_brush_mask (GimpPaintCore *core,
switch (brush_hardness)
{
case SOFT:
case GIMP_BRUSH_SOFT:
mask = gimp_paint_core_subsample_mask (core, mask,
core->cur_coords.x,
core->cur_coords.y);
break;
case HARD:
case GIMP_BRUSH_HARD:
mask = gimp_paint_core_solidify_mask (core, mask);
break;
case PRESSURE:
case GIMP_BRUSH_PRESSURE:
mask = gimp_paint_core_pressurize_mask (core, mask,
core->cur_coords.x,
core->cur_coords.y,
......@@ -1237,13 +1239,13 @@ gimp_paint_core_get_brush_mask (GimpPaintCore *core,
}
static void
gimp_paint_core_paste (GimpPaintCore *core,
MaskBuf *brush_mask,
GimpDrawable *drawable,
gdouble brush_opacity,
gdouble image_opacity,
GimpLayerModeEffects paint_mode,
PaintApplicationMode mode)
gimp_paint_core_paste (GimpPaintCore *core,
MaskBuf *brush_mask,
GimpDrawable *drawable,
gdouble brush_opacity,
gdouble image_opacity,
GimpLayerModeEffects paint_mode,
GimpPaintApplicationMode mode)
{
GimpImage *gimage;
PixelRegion srcPR;
......@@ -1262,7 +1264,7 @@ gimp_paint_core_paste (GimpPaintCore *core,
/* If the mode is CONSTANT:
* combine the canvas buf, the brush mask to the canvas tiles
*/
if (mode == CONSTANT)
if (mode == GIMP_PAINT_CONSTANT)
{
/* initialize any invalid canvas tiles */
set_canvas_tiles (core,
......@@ -1327,12 +1329,12 @@ gimp_paint_core_paste (GimpPaintCore *core,
* NORMAL mode.
*/
static void
gimp_paint_core_replace (GimpPaintCore *core,
MaskBuf *brush_mask,
GimpDrawable *drawable,
gdouble brush_opacity,
gdouble image_opacity,
PaintApplicationMode mode)
gimp_paint_core_replace (GimpPaintCore *core,
MaskBuf *brush_mask,
GimpDrawable *drawable,
gdouble brush_opacity,
gdouble image_opacity,
GimpPaintApplicationMode mode)
{
GimpImage *gimage;
PixelRegion srcPR;
......@@ -1360,7 +1362,7 @@ gimp_paint_core_replace (GimpPaintCore *core,
core->canvas_buf->width,
core->canvas_buf->height);
if (mode == CONSTANT)
if (mode == GIMP_PAINT_CONSTANT)
{
/* initialize any invalid canvas tiles */
set_canvas_tiles (core,
......@@ -1604,12 +1606,12 @@ set_canvas_tiles (GimpPaintCore *core,
/**************************************************/
void
gimp_paint_core_color_area_with_pixmap (GimpPaintCore *core,
GimpImage *dest,
GimpDrawable *drawable,
TempBuf *area,
gdouble scale,
BrushApplicationMode mode)
gimp_paint_core_color_area_with_pixmap (GimpPaintCore *core,
GimpImage *dest,
GimpDrawable *drawable,
TempBuf *area,
gdouble scale,