mirror of https://github.com/GNOME/gimp.git
app/core/core-enums.h more enum cleanup (ChannelOps this time).
2002-03-18 Sven Neumann <sven@gimp.org> * app/core/core-enums.h * app/core/core-types.h: more enum cleanup (ChannelOps this time). * app/core/gimpchannel.[ch] * app/core/gimpimage-mask-select.[ch] * app/gui/channels-commands.c * app/gui/vectors-commands.c * app/tools/gimpbezierselecttool.c * app/tools/tools-types.h * app/widgets/gimpchannellistview.[ch] * tools/pdbgen/pdb/channel.pdb * tools/pdbgen/pdb/selection.pdb * tools/pdbgen/pdb/selection_tools.pdb: changed accordingly. * app/pdb/channel_cmds.c * app/pdb/selection_cmds.c * app/pdb/selection_tools_cmds.c * libgimp/gimpenums.h * plug-ins/script-fu/script-fu-constants.c * tools/pdbgen/enums.pl: regenerated.
This commit is contained in:
parent
f85c711c55
commit
d68b730a82
23
ChangeLog
23
ChangeLog
|
@ -1,3 +1,26 @@
|
|||
2002-03-18 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/core/core-enums.h
|
||||
* app/core/core-types.h: more enum cleanup (ChannelOps this time).
|
||||
|
||||
* app/core/gimpchannel.[ch]
|
||||
* app/core/gimpimage-mask-select.[ch]
|
||||
* app/gui/channels-commands.c
|
||||
* app/gui/vectors-commands.c
|
||||
* app/tools/gimpbezierselecttool.c
|
||||
* app/tools/tools-types.h
|
||||
* app/widgets/gimpchannellistview.[ch]
|
||||
* tools/pdbgen/pdb/channel.pdb
|
||||
* tools/pdbgen/pdb/selection.pdb
|
||||
* tools/pdbgen/pdb/selection_tools.pdb: changed accordingly.
|
||||
|
||||
* app/pdb/channel_cmds.c
|
||||
* app/pdb/selection_cmds.c
|
||||
* app/pdb/selection_tools_cmds.c
|
||||
* libgimp/gimpenums.h
|
||||
* plug-ins/script-fu/script-fu-constants.c
|
||||
* tools/pdbgen/enums.pl: regenerated.
|
||||
|
||||
2002-03-18 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/core/core-enums.h
|
||||
|
|
|
@ -133,9 +133,9 @@ channels_delete_channel_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
static void
|
||||
channels_channel_to_sel (GtkWidget *widget,
|
||||
gpointer data,
|
||||
ChannelOps op)
|
||||
channels_channel_to_sel (GtkWidget *widget,
|
||||
gpointer data,
|
||||
GimpChannelOps op)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpChannel *active_channel;
|
||||
|
@ -153,28 +153,28 @@ void
|
|||
channels_channel_to_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
channels_channel_to_sel (widget, data, CHANNEL_OP_REPLACE);
|
||||
channels_channel_to_sel (widget, data, GIMP_CHANNEL_OP_REPLACE);
|
||||
}
|
||||
|
||||
void
|
||||
channels_add_channel_to_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
channels_channel_to_sel (widget, data, CHANNEL_OP_ADD);
|
||||
channels_channel_to_sel (widget, data, GIMP_CHANNEL_OP_ADD);
|
||||
}
|
||||
|
||||
void
|
||||
channels_sub_channel_from_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
channels_channel_to_sel (widget, data, CHANNEL_OP_SUBTRACT);
|
||||
channels_channel_to_sel (widget, data, GIMP_CHANNEL_OP_SUBTRACT);
|
||||
}
|
||||
|
||||
void
|
||||
channels_intersect_channel_with_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
channels_channel_to_sel (widget, data, CHANNEL_OP_INTERSECT);
|
||||
channels_channel_to_sel (widget, data, GIMP_CHANNEL_OP_INTERSECT);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -137,9 +137,9 @@ vectors_delete_vectors_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
static void
|
||||
vectors_vectors_to_sel (GtkWidget *widget,
|
||||
gpointer data,
|
||||
ChannelOps op)
|
||||
vectors_vectors_to_sel (GtkWidget *widget,
|
||||
gpointer data,
|
||||
GimpChannelOps op)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpVectors *active_vectors;
|
||||
|
@ -157,28 +157,28 @@ void
|
|||
vectors_vectors_to_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
vectors_vectors_to_sel (widget, data, CHANNEL_OP_REPLACE);
|
||||
vectors_vectors_to_sel (widget, data, GIMP_CHANNEL_OP_REPLACE);
|
||||
}
|
||||
|
||||
void
|
||||
vectors_add_vectors_to_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
vectors_vectors_to_sel (widget, data, CHANNEL_OP_ADD);
|
||||
vectors_vectors_to_sel (widget, data, GIMP_CHANNEL_OP_ADD);
|
||||
}
|
||||
|
||||
void
|
||||
vectors_sub_vectors_from_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
vectors_vectors_to_sel (widget, data, CHANNEL_OP_SUBTRACT);
|
||||
vectors_vectors_to_sel (widget, data, GIMP_CHANNEL_OP_SUBTRACT);
|
||||
}
|
||||
|
||||
void
|
||||
vectors_intersect_vectors_with_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
vectors_vectors_to_sel (widget, data, CHANNEL_OP_INTERSECT);
|
||||
vectors_vectors_to_sel (widget, data, GIMP_CHANNEL_OP_INTERSECT);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -163,6 +163,14 @@ typedef enum /*< skip >*/
|
|||
GIMP_PATTERN_BUCKET_FILL
|
||||
} GimpBucketFillMode;
|
||||
|
||||
typedef enum /*< skip >*/
|
||||
{
|
||||
GIMP_CHANNEL_OP_ADD,
|
||||
GIMP_CHANNEL_OP_SUBTRACT,
|
||||
GIMP_CHANNEL_OP_REPLACE,
|
||||
GIMP_CHANNEL_OP_INTERSECT
|
||||
} GimpChannelOps;
|
||||
|
||||
typedef enum /*< skip >*/
|
||||
{
|
||||
GIMP_MAKE_PALETTE,
|
||||
|
|
|
@ -50,15 +50,6 @@ typedef enum /*< pdb-skip >*/
|
|||
ORIENTATION_VERTICAL
|
||||
} InternalOrientationType;
|
||||
|
||||
/* Selection Boolean operations */
|
||||
typedef enum
|
||||
{
|
||||
CHANNEL_OP_ADD,
|
||||
CHANNEL_OP_SUBTRACT,
|
||||
CHANNEL_OP_REPLACE,
|
||||
CHANNEL_OP_INTERSECT
|
||||
} ChannelOps;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
OFFSET_BACKGROUND,
|
||||
|
|
|
@ -827,12 +827,12 @@ gimp_channel_sub_segment (GimpChannel *mask,
|
|||
}
|
||||
|
||||
void
|
||||
gimp_channel_combine_rect (GimpChannel *mask,
|
||||
ChannelOps op,
|
||||
gint x,
|
||||
gint y,
|
||||
gint w,
|
||||
gint h)
|
||||
gimp_channel_combine_rect (GimpChannel *mask,
|
||||
GimpChannelOps op,
|
||||
gint x,
|
||||
gint y,
|
||||
gint w,
|
||||
gint h)
|
||||
{
|
||||
gint x2, y2;
|
||||
PixelRegion maskPR;
|
||||
|
@ -853,14 +853,16 @@ gimp_channel_combine_rect (GimpChannel *mask,
|
|||
|
||||
pixel_region_init (&maskPR, GIMP_DRAWABLE (mask)->tiles,
|
||||
x, y, x2 - x, y2 - y, TRUE);
|
||||
if (op == CHANNEL_OP_ADD || op == CHANNEL_OP_REPLACE)
|
||||
|
||||
if (op == GIMP_CHANNEL_OP_ADD || op == GIMP_CHANNEL_OP_REPLACE)
|
||||
color = 255;
|
||||
else
|
||||
color = 0;
|
||||
|
||||
color_region (&maskPR, &color);
|
||||
|
||||
/* Determine new boundary */
|
||||
if (mask->bounds_known && (op == CHANNEL_OP_ADD) && !mask->empty)
|
||||
if (mask->bounds_known && (op == GIMP_CHANNEL_OP_ADD) && !mask->empty)
|
||||
{
|
||||
if (x < mask->x1)
|
||||
mask->x1 = x;
|
||||
|
@ -871,7 +873,7 @@ gimp_channel_combine_rect (GimpChannel *mask,
|
|||
if ((y + h) > mask->y2)
|
||||
mask->y2 = (y + h);
|
||||
}
|
||||
else if (op == CHANNEL_OP_REPLACE || mask->empty)
|
||||
else if (op == GIMP_CHANNEL_OP_REPLACE || mask->empty)
|
||||
{
|
||||
mask->empty = FALSE;
|
||||
mask->x1 = x;
|
||||
|
@ -889,13 +891,13 @@ gimp_channel_combine_rect (GimpChannel *mask,
|
|||
}
|
||||
|
||||
void
|
||||
gimp_channel_combine_ellipse (GimpChannel *mask,
|
||||
ChannelOps op,
|
||||
gint x,
|
||||
gint y,
|
||||
gint w,
|
||||
gint h,
|
||||
gboolean antialias)
|
||||
gimp_channel_combine_ellipse (GimpChannel *mask,
|
||||
GimpChannelOps op,
|
||||
gint x,
|
||||
gint y,
|
||||
gint w,
|
||||
gint h,
|
||||
gboolean antialias)
|
||||
{
|
||||
gint i, j;
|
||||
gint x0, x1, x2;
|
||||
|
@ -935,11 +937,11 @@ gimp_channel_combine_ellipse (GimpChannel *mask,
|
|||
|
||||
switch (op)
|
||||
{
|
||||
case CHANNEL_OP_ADD:
|
||||
case CHANNEL_OP_REPLACE:
|
||||
case GIMP_CHANNEL_OP_ADD:
|
||||
case GIMP_CHANNEL_OP_REPLACE:
|
||||
gimp_channel_add_segment (mask, x1, i, (x2 - x1), 255);
|
||||
break;
|
||||
case CHANNEL_OP_SUBTRACT:
|
||||
case GIMP_CHANNEL_OP_SUBTRACT:
|
||||
gimp_channel_sub_segment (mask, x1, i, (x2 - x1), 255);
|
||||
break;
|
||||
default:
|
||||
|
@ -979,11 +981,11 @@ gimp_channel_combine_ellipse (GimpChannel *mask,
|
|||
{
|
||||
switch (op)
|
||||
{
|
||||
case CHANNEL_OP_ADD:
|
||||
case CHANNEL_OP_REPLACE:
|
||||
case GIMP_CHANNEL_OP_ADD:
|
||||
case GIMP_CHANNEL_OP_REPLACE:
|
||||
gimp_channel_add_segment (mask, x0, i, j - x0, last);
|
||||
break;
|
||||
case CHANNEL_OP_SUBTRACT:
|
||||
case GIMP_CHANNEL_OP_SUBTRACT:
|
||||
gimp_channel_sub_segment (mask, x0, i, j - x0, last);
|
||||
break;
|
||||
default:
|
||||
|
@ -1005,12 +1007,19 @@ gimp_channel_combine_ellipse (GimpChannel *mask,
|
|||
|
||||
if (last)
|
||||
{
|
||||
if (op == CHANNEL_OP_ADD || op == CHANNEL_OP_REPLACE)
|
||||
gimp_channel_add_segment (mask, x0, i, j - x0, last);
|
||||
else if (op == CHANNEL_OP_SUBTRACT)
|
||||
gimp_channel_sub_segment (mask, x0, i, j - x0, last);
|
||||
else
|
||||
g_warning ("Only ADD, REPLACE, and SUBTRACT are valid for channel_combine!");
|
||||
switch (op)
|
||||
{
|
||||
case GIMP_CHANNEL_OP_ADD:
|
||||
case GIMP_CHANNEL_OP_REPLACE:
|
||||
gimp_channel_add_segment (mask, x0, i, j - x0, last);
|
||||
break;
|
||||
case GIMP_CHANNEL_OP_SUBTRACT:
|
||||
gimp_channel_sub_segment (mask, x0, i, j - x0, last);
|
||||
break;
|
||||
default:
|
||||
g_warning ("Only ADD, REPLACE, and SUBTRACT are valid for channel_combine!");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1018,7 +1027,7 @@ gimp_channel_combine_ellipse (GimpChannel *mask,
|
|||
}
|
||||
|
||||
/* Determine new boundary */
|
||||
if (mask->bounds_known && (op == CHANNEL_OP_ADD) && !mask->empty)
|
||||
if (mask->bounds_known && (op == GIMP_CHANNEL_OP_ADD) && !mask->empty)
|
||||
{
|
||||
if (x < mask->x1)
|
||||
mask->x1 = x;
|
||||
|
@ -1029,7 +1038,7 @@ gimp_channel_combine_ellipse (GimpChannel *mask,
|
|||
if ((y + h) > mask->y2)
|
||||
mask->y2 = (y + h);
|
||||
}
|
||||
else if (op == CHANNEL_OP_REPLACE || mask->empty)
|
||||
else if (op == GIMP_CHANNEL_OP_REPLACE || mask->empty)
|
||||
{
|
||||
mask->empty = FALSE;
|
||||
mask->x1 = x;
|
||||
|
@ -1120,11 +1129,11 @@ gimp_channel_combine_sub_region_intersect (gpointer unused,
|
|||
}
|
||||
|
||||
void
|
||||
gimp_channel_combine_mask (GimpChannel *mask,
|
||||
GimpChannel *add_on,
|
||||
ChannelOps op,
|
||||
gint off_x,
|
||||
gint off_y)
|
||||
gimp_channel_combine_mask (GimpChannel *mask,
|
||||
GimpChannel *add_on,
|
||||
GimpChannelOps op,
|
||||
gint off_x,
|
||||
gint off_y)
|
||||
{
|
||||
PixelRegion srcPR, destPR;
|
||||
gint x1, y1, x2, y2;
|
||||
|
@ -1149,18 +1158,18 @@ gimp_channel_combine_mask (GimpChannel *mask,
|
|||
|
||||
switch (op)
|
||||
{
|
||||
case CHANNEL_OP_ADD:
|
||||
case CHANNEL_OP_REPLACE:
|
||||
case GIMP_CHANNEL_OP_ADD:
|
||||
case GIMP_CHANNEL_OP_REPLACE:
|
||||
pixel_regions_process_parallel ((p_func)
|
||||
gimp_channel_combine_sub_region_add,
|
||||
NULL, 2, &srcPR, &destPR);
|
||||
break;
|
||||
case CHANNEL_OP_SUBTRACT:
|
||||
case GIMP_CHANNEL_OP_SUBTRACT:
|
||||
pixel_regions_process_parallel ((p_func)
|
||||
gimp_channel_combine_sub_region_sub,
|
||||
NULL, 2, &srcPR, &destPR);
|
||||
break;
|
||||
case CHANNEL_OP_INTERSECT:
|
||||
case GIMP_CHANNEL_OP_INTERSECT:
|
||||
pixel_regions_process_parallel ((p_func)
|
||||
gimp_channel_combine_sub_region_intersect,
|
||||
NULL, 2, &srcPR, &destPR);
|
||||
|
|
|
@ -132,13 +132,13 @@ void gimp_channel_sub_segment (GimpChannel *mask,
|
|||
gint width,
|
||||
gint value);
|
||||
void gimp_channel_combine_rect (GimpChannel *mask,
|
||||
ChannelOps op,
|
||||
GimpChannelOps op,
|
||||
gint x,
|
||||
gint y,
|
||||
gint w,
|
||||
gint h);
|
||||
void gimp_channel_combine_ellipse (GimpChannel *mask,
|
||||
ChannelOps op,
|
||||
GimpChannelOps op,
|
||||
gint x,
|
||||
gint y,
|
||||
gint w,
|
||||
|
@ -146,7 +146,7 @@ void gimp_channel_combine_ellipse (GimpChannel *mask,
|
|||
gboolean antialias);
|
||||
void gimp_channel_combine_mask (GimpChannel *mask,
|
||||
GimpChannel *add_on,
|
||||
ChannelOps op,
|
||||
GimpChannelOps op,
|
||||
gint off_x,
|
||||
gint off_y);
|
||||
|
||||
|
|
|
@ -34,20 +34,20 @@
|
|||
|
||||
|
||||
void
|
||||
gimp_image_mask_select_rectangle (GimpImage *gimage,
|
||||
gint x,
|
||||
gint y,
|
||||
gint w,
|
||||
gint h,
|
||||
ChannelOps op,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y)
|
||||
gimp_image_mask_select_rectangle (GimpImage *gimage,
|
||||
gint x,
|
||||
gint y,
|
||||
gint w,
|
||||
gint h,
|
||||
GimpChannelOps op,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_IMAGE (gimage));
|
||||
|
||||
/* if applicable, replace the current selection */
|
||||
if (op == CHANNEL_OP_REPLACE)
|
||||
if (op == GIMP_CHANNEL_OP_REPLACE)
|
||||
gimp_image_mask_clear (gimage);
|
||||
else
|
||||
gimp_image_mask_undo (gimage);
|
||||
|
@ -55,12 +55,12 @@ gimp_image_mask_select_rectangle (GimpImage *gimage,
|
|||
/* if feathering for rect, make a new mask with the
|
||||
* rectangle and feather that with the old mask
|
||||
*/
|
||||
if (feather || op == CHANNEL_OP_INTERSECT)
|
||||
if (feather || op == GIMP_CHANNEL_OP_INTERSECT)
|
||||
{
|
||||
GimpChannel *mask;
|
||||
|
||||
mask = gimp_channel_new_mask (gimage, gimage->width, gimage->height);
|
||||
gimp_channel_combine_rect (mask, CHANNEL_OP_ADD, x, y, w, h);
|
||||
gimp_channel_combine_rect (mask, GIMP_CHANNEL_OP_ADD, x, y, w, h);
|
||||
|
||||
if (feather)
|
||||
gimp_channel_feather (mask,
|
||||
|
@ -78,21 +78,21 @@ gimp_image_mask_select_rectangle (GimpImage *gimage,
|
|||
}
|
||||
|
||||
void
|
||||
gimp_image_mask_select_ellipse (GimpImage *gimage,
|
||||
gint x,
|
||||
gint y,
|
||||
gint w,
|
||||
gint h,
|
||||
ChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y)
|
||||
gimp_image_mask_select_ellipse (GimpImage *gimage,
|
||||
gint x,
|
||||
gint y,
|
||||
gint w,
|
||||
gint h,
|
||||
GimpChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_IMAGE (gimage));
|
||||
|
||||
/* if applicable, replace the current selection */
|
||||
if (op == CHANNEL_OP_REPLACE)
|
||||
if (op == GIMP_CHANNEL_OP_REPLACE)
|
||||
gimp_image_mask_clear (gimage);
|
||||
else
|
||||
gimp_image_mask_undo (gimage);
|
||||
|
@ -100,12 +100,13 @@ gimp_image_mask_select_ellipse (GimpImage *gimage,
|
|||
/* if feathering for rect, make a new mask with the
|
||||
* rectangle and feather that with the old mask
|
||||
*/
|
||||
if (feather || op == CHANNEL_OP_INTERSECT)
|
||||
if (feather || op == GIMP_CHANNEL_OP_INTERSECT)
|
||||
{
|
||||
GimpChannel *mask;
|
||||
|
||||
mask = gimp_channel_new_mask (gimage, gimage->width, gimage->height);
|
||||
gimp_channel_combine_ellipse (mask, CHANNEL_OP_ADD, x, y, w, h, antialias);
|
||||
gimp_channel_combine_ellipse (mask, GIMP_CHANNEL_OP_ADD,
|
||||
x, y, w, h, antialias);
|
||||
|
||||
if (feather)
|
||||
gimp_channel_feather (mask,
|
||||
|
@ -124,14 +125,14 @@ gimp_image_mask_select_ellipse (GimpImage *gimage,
|
|||
}
|
||||
|
||||
void
|
||||
gimp_image_mask_select_polygon (GimpImage *gimage,
|
||||
gint n_points,
|
||||
GimpVector2 *points,
|
||||
ChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y)
|
||||
gimp_image_mask_select_polygon (GimpImage *gimage,
|
||||
gint n_points,
|
||||
GimpVector2 *points,
|
||||
GimpChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y)
|
||||
{
|
||||
GimpScanConvert *scan_convert;
|
||||
GimpChannel *mask;
|
||||
|
@ -141,7 +142,7 @@ gimp_image_mask_select_polygon (GimpImage *gimage,
|
|||
/* if applicable, replace the current selection
|
||||
* or insure that a floating selection is anchored down...
|
||||
*/
|
||||
if (op == CHANNEL_OP_REPLACE)
|
||||
if (op == GIMP_CHANNEL_OP_REPLACE)
|
||||
gimp_image_mask_clear (gimage);
|
||||
else
|
||||
gimp_image_mask_undo (gimage);
|
||||
|
@ -173,13 +174,13 @@ gimp_image_mask_select_polygon (GimpImage *gimage,
|
|||
}
|
||||
|
||||
void
|
||||
gimp_image_mask_select_vectors (GimpImage *gimage,
|
||||
GimpVectors *vectors,
|
||||
ChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y)
|
||||
gimp_image_mask_select_vectors (GimpImage *gimage,
|
||||
GimpVectors *vectors,
|
||||
GimpChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y)
|
||||
{
|
||||
GimpStroke *stroke;
|
||||
GimpCoords *coords = NULL;
|
||||
|
@ -230,20 +231,20 @@ gimp_image_mask_select_vectors (GimpImage *gimage,
|
|||
}
|
||||
|
||||
void
|
||||
gimp_image_mask_select_channel (GimpImage *gimage,
|
||||
GimpChannel *channel,
|
||||
gint offset_x,
|
||||
gint offset_y,
|
||||
ChannelOps op,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y)
|
||||
gimp_image_mask_select_channel (GimpImage *gimage,
|
||||
GimpChannel *channel,
|
||||
gint offset_x,
|
||||
gint offset_y,
|
||||
GimpChannelOps op,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_IMAGE (gimage));
|
||||
g_return_if_fail (GIMP_IS_CHANNEL (channel));
|
||||
|
||||
/* if applicable, replace the current selection */
|
||||
if (op == CHANNEL_OP_REPLACE)
|
||||
if (op == GIMP_CHANNEL_OP_REPLACE)
|
||||
gimp_image_mask_clear (gimage);
|
||||
else
|
||||
gimp_image_mask_undo (gimage);
|
||||
|
@ -259,18 +260,18 @@ gimp_image_mask_select_channel (GimpImage *gimage,
|
|||
}
|
||||
|
||||
void
|
||||
gimp_image_mask_select_fuzzy (GimpImage *gimage,
|
||||
GimpDrawable *drawable,
|
||||
gboolean sample_merged,
|
||||
gint x,
|
||||
gint y,
|
||||
gint threshold,
|
||||
gboolean select_transparent,
|
||||
ChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y)
|
||||
gimp_image_mask_select_fuzzy (GimpImage *gimage,
|
||||
GimpDrawable *drawable,
|
||||
gboolean sample_merged,
|
||||
gint x,
|
||||
gint y,
|
||||
gint threshold,
|
||||
gboolean select_transparent,
|
||||
GimpChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y)
|
||||
{
|
||||
GimpChannel *mask;
|
||||
gint mask_x;
|
||||
|
@ -309,17 +310,17 @@ gimp_image_mask_select_fuzzy (GimpImage *gimage,
|
|||
}
|
||||
|
||||
void
|
||||
gimp_image_mask_select_by_color (GimpImage *gimage,
|
||||
GimpDrawable *drawable,
|
||||
gboolean sample_merged,
|
||||
const GimpRGB *color,
|
||||
gint threshold,
|
||||
gboolean select_transparent,
|
||||
ChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y)
|
||||
gimp_image_mask_select_by_color (GimpImage *gimage,
|
||||
GimpDrawable *drawable,
|
||||
gboolean sample_merged,
|
||||
const GimpRGB *color,
|
||||
gint threshold,
|
||||
gboolean select_transparent,
|
||||
GimpChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y)
|
||||
{
|
||||
GimpChannel *mask;
|
||||
gint mask_x;
|
||||
|
|
|
@ -20,77 +20,77 @@
|
|||
#define __GIMP_IMAGE_MASK_SELECT_H__
|
||||
|
||||
|
||||
void gimp_image_mask_select_rectangle (GimpImage *gimage,
|
||||
gint x,
|
||||
gint y,
|
||||
gint w,
|
||||
gint h,
|
||||
ChannelOps op,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y);
|
||||
void gimp_image_mask_select_rectangle (GimpImage *gimage,
|
||||
gint x,
|
||||
gint y,
|
||||
gint w,
|
||||
gint h,
|
||||
GimpChannelOps op,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y);
|
||||
|
||||
void gimp_image_mask_select_ellipse (GimpImage *gimage,
|
||||
gint x,
|
||||
gint y,
|
||||
gint w,
|
||||
gint h,
|
||||
ChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y);
|
||||
void gimp_image_mask_select_ellipse (GimpImage *gimage,
|
||||
gint x,
|
||||
gint y,
|
||||
gint w,
|
||||
gint h,
|
||||
GimpChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y);
|
||||
|
||||
void gimp_image_mask_select_polygon (GimpImage *gimage,
|
||||
gint n_points,
|
||||
GimpVector2 *points,
|
||||
ChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y);
|
||||
void gimp_image_mask_select_polygon (GimpImage *gimage,
|
||||
gint n_points,
|
||||
GimpVector2 *points,
|
||||
GimpChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y);
|
||||
|
||||
void gimp_image_mask_select_vectors (GimpImage *gimage,
|
||||
GimpVectors *vectors,
|
||||
ChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y);
|
||||
void gimp_image_mask_select_vectors (GimpImage *gimage,
|
||||
GimpVectors *vectors,
|
||||
GimpChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y);
|
||||
|
||||
void gimp_image_mask_select_channel (GimpImage *gimage,
|
||||
GimpChannel *channel,
|
||||
gint offset_x,
|
||||
gint offset_y,
|
||||
ChannelOps op,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y);
|
||||
void gimp_image_mask_select_channel (GimpImage *gimage,
|
||||
GimpChannel *channel,
|
||||
gint offset_x,
|
||||
gint offset_y,
|
||||
GimpChannelOps op,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y);
|
||||
|
||||
void gimp_image_mask_select_fuzzy (GimpImage *gimage,
|
||||
GimpDrawable *drawable,
|
||||
gboolean sample_merged,
|
||||
gint x,
|
||||
gint y,
|
||||
gint threshold,
|
||||
gboolean select_transparent,
|
||||
ChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y);
|
||||
void gimp_image_mask_select_fuzzy (GimpImage *gimage,
|
||||
GimpDrawable *drawable,
|
||||
gboolean sample_merged,
|
||||
gint x,
|
||||
gint y,
|
||||
gint threshold,
|
||||
gboolean select_transparent,
|
||||
GimpChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y);
|
||||
|
||||
void gimp_image_mask_select_by_color (GimpImage *gimage,
|
||||
GimpDrawable *drawable,
|
||||
gboolean sample_merged,
|
||||
const GimpRGB *color,
|
||||
gint threshold,
|
||||
gboolean select_transparent,
|
||||
ChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y);
|
||||
void gimp_image_mask_select_by_color (GimpImage *gimage,
|
||||
GimpDrawable *drawable,
|
||||
gboolean sample_merged,
|
||||
const GimpRGB *color,
|
||||
gint threshold,
|
||||
gboolean select_transparent,
|
||||
GimpChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y);
|
||||
|
||||
|
||||
#endif /* __GIMP_IMAGE_MASK_SELECT_H__ */
|
||||
|
|
|
@ -827,12 +827,12 @@ gimp_channel_sub_segment (GimpChannel *mask,
|
|||
}
|
||||
|
||||
void
|
||||
gimp_channel_combine_rect (GimpChannel *mask,
|
||||
ChannelOps op,
|
||||
gint x,
|
||||
gint y,
|
||||
gint w,
|
||||
gint h)
|
||||
gimp_channel_combine_rect (GimpChannel *mask,
|
||||
GimpChannelOps op,
|
||||
gint x,
|
||||
gint y,
|
||||
gint w,
|
||||
gint h)
|
||||
{
|
||||
gint x2, y2;
|
||||
PixelRegion maskPR;
|
||||
|
@ -853,14 +853,16 @@ gimp_channel_combine_rect (GimpChannel *mask,
|
|||
|
||||
pixel_region_init (&maskPR, GIMP_DRAWABLE (mask)->tiles,
|
||||
x, y, x2 - x, y2 - y, TRUE);
|
||||
if (op == CHANNEL_OP_ADD || op == CHANNEL_OP_REPLACE)
|
||||
|
||||
if (op == GIMP_CHANNEL_OP_ADD || op == GIMP_CHANNEL_OP_REPLACE)
|
||||
color = 255;
|
||||
else
|
||||
color = 0;
|
||||
|
||||
color_region (&maskPR, &color);
|
||||
|
||||
/* Determine new boundary */
|
||||
if (mask->bounds_known && (op == CHANNEL_OP_ADD) && !mask->empty)
|
||||
if (mask->bounds_known && (op == GIMP_CHANNEL_OP_ADD) && !mask->empty)
|
||||
{
|
||||
if (x < mask->x1)
|
||||
mask->x1 = x;
|
||||
|
@ -871,7 +873,7 @@ gimp_channel_combine_rect (GimpChannel *mask,
|
|||
if ((y + h) > mask->y2)
|
||||
mask->y2 = (y + h);
|
||||
}
|
||||
else if (op == CHANNEL_OP_REPLACE || mask->empty)
|
||||
else if (op == GIMP_CHANNEL_OP_REPLACE || mask->empty)
|
||||
{
|
||||
mask->empty = FALSE;
|
||||
mask->x1 = x;
|
||||
|
@ -889,13 +891,13 @@ gimp_channel_combine_rect (GimpChannel *mask,
|
|||
}
|
||||
|
||||
void
|
||||
gimp_channel_combine_ellipse (GimpChannel *mask,
|
||||
ChannelOps op,
|
||||
gint x,
|
||||
gint y,
|
||||
gint w,
|
||||
gint h,
|
||||
gboolean antialias)
|
||||
gimp_channel_combine_ellipse (GimpChannel *mask,
|
||||
GimpChannelOps op,
|
||||
gint x,
|
||||
gint y,
|
||||
gint w,
|
||||
gint h,
|
||||
gboolean antialias)
|
||||
{
|
||||
gint i, j;
|
||||
gint x0, x1, x2;
|
||||
|
@ -935,11 +937,11 @@ gimp_channel_combine_ellipse (GimpChannel *mask,
|
|||
|
||||
switch (op)
|
||||
{
|
||||
case CHANNEL_OP_ADD:
|
||||
case CHANNEL_OP_REPLACE:
|
||||
case GIMP_CHANNEL_OP_ADD:
|
||||
case GIMP_CHANNEL_OP_REPLACE:
|
||||
gimp_channel_add_segment (mask, x1, i, (x2 - x1), 255);
|
||||
break;
|
||||
case CHANNEL_OP_SUBTRACT:
|
||||
case GIMP_CHANNEL_OP_SUBTRACT:
|
||||
gimp_channel_sub_segment (mask, x1, i, (x2 - x1), 255);
|
||||
break;
|
||||
default:
|
||||
|
@ -979,11 +981,11 @@ gimp_channel_combine_ellipse (GimpChannel *mask,
|
|||
{
|
||||
switch (op)
|
||||
{
|
||||
case CHANNEL_OP_ADD:
|
||||
case CHANNEL_OP_REPLACE:
|
||||
case GIMP_CHANNEL_OP_ADD:
|
||||
case GIMP_CHANNEL_OP_REPLACE:
|
||||
gimp_channel_add_segment (mask, x0, i, j - x0, last);
|
||||
break;
|
||||
case CHANNEL_OP_SUBTRACT:
|
||||
case GIMP_CHANNEL_OP_SUBTRACT:
|
||||
gimp_channel_sub_segment (mask, x0, i, j - x0, last);
|
||||
break;
|
||||
default:
|
||||
|
@ -1005,12 +1007,19 @@ gimp_channel_combine_ellipse (GimpChannel *mask,
|
|||
|
||||
if (last)
|
||||
{
|
||||
if (op == CHANNEL_OP_ADD || op == CHANNEL_OP_REPLACE)
|
||||
gimp_channel_add_segment (mask, x0, i, j - x0, last);
|
||||
else if (op == CHANNEL_OP_SUBTRACT)
|
||||
gimp_channel_sub_segment (mask, x0, i, j - x0, last);
|
||||
else
|
||||
g_warning ("Only ADD, REPLACE, and SUBTRACT are valid for channel_combine!");
|
||||
switch (op)
|
||||
{
|
||||
case GIMP_CHANNEL_OP_ADD:
|
||||
case GIMP_CHANNEL_OP_REPLACE:
|
||||
gimp_channel_add_segment (mask, x0, i, j - x0, last);
|
||||
break;
|
||||
case GIMP_CHANNEL_OP_SUBTRACT:
|
||||
gimp_channel_sub_segment (mask, x0, i, j - x0, last);
|
||||
break;
|
||||
default:
|
||||
g_warning ("Only ADD, REPLACE, and SUBTRACT are valid for channel_combine!");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1018,7 +1027,7 @@ gimp_channel_combine_ellipse (GimpChannel *mask,
|
|||
}
|
||||
|
||||
/* Determine new boundary */
|
||||
if (mask->bounds_known && (op == CHANNEL_OP_ADD) && !mask->empty)
|
||||
if (mask->bounds_known && (op == GIMP_CHANNEL_OP_ADD) && !mask->empty)
|
||||
{
|
||||
if (x < mask->x1)
|
||||
mask->x1 = x;
|
||||
|
@ -1029,7 +1038,7 @@ gimp_channel_combine_ellipse (GimpChannel *mask,
|
|||
if ((y + h) > mask->y2)
|
||||
mask->y2 = (y + h);
|
||||
}
|
||||
else if (op == CHANNEL_OP_REPLACE || mask->empty)
|
||||
else if (op == GIMP_CHANNEL_OP_REPLACE || mask->empty)
|
||||
{
|
||||
mask->empty = FALSE;
|
||||
mask->x1 = x;
|
||||
|
@ -1120,11 +1129,11 @@ gimp_channel_combine_sub_region_intersect (gpointer unused,
|
|||
}
|
||||
|
||||
void
|
||||
gimp_channel_combine_mask (GimpChannel *mask,
|
||||
GimpChannel *add_on,
|
||||
ChannelOps op,
|
||||
gint off_x,
|
||||
gint off_y)
|
||||
gimp_channel_combine_mask (GimpChannel *mask,
|
||||
GimpChannel *add_on,
|
||||
GimpChannelOps op,
|
||||
gint off_x,
|
||||
gint off_y)
|
||||
{
|
||||
PixelRegion srcPR, destPR;
|
||||
gint x1, y1, x2, y2;
|
||||
|
@ -1149,18 +1158,18 @@ gimp_channel_combine_mask (GimpChannel *mask,
|
|||
|
||||
switch (op)
|
||||
{
|
||||
case CHANNEL_OP_ADD:
|
||||
case CHANNEL_OP_REPLACE:
|
||||
case GIMP_CHANNEL_OP_ADD:
|
||||
case GIMP_CHANNEL_OP_REPLACE:
|
||||
pixel_regions_process_parallel ((p_func)
|
||||
gimp_channel_combine_sub_region_add,
|
||||
NULL, 2, &srcPR, &destPR);
|
||||
break;
|
||||
case CHANNEL_OP_SUBTRACT:
|
||||
case GIMP_CHANNEL_OP_SUBTRACT:
|
||||
pixel_regions_process_parallel ((p_func)
|
||||
gimp_channel_combine_sub_region_sub,
|
||||
NULL, 2, &srcPR, &destPR);
|
||||
break;
|
||||
case CHANNEL_OP_INTERSECT:
|
||||
case GIMP_CHANNEL_OP_INTERSECT:
|
||||
pixel_regions_process_parallel ((p_func)
|
||||
gimp_channel_combine_sub_region_intersect,
|
||||
NULL, 2, &srcPR, &destPR);
|
||||
|
|
|
@ -132,13 +132,13 @@ void gimp_channel_sub_segment (GimpChannel *mask,
|
|||
gint width,
|
||||
gint value);
|
||||
void gimp_channel_combine_rect (GimpChannel *mask,
|
||||
ChannelOps op,
|
||||
GimpChannelOps op,
|
||||
gint x,
|
||||
gint y,
|
||||
gint w,
|
||||
gint h);
|
||||
void gimp_channel_combine_ellipse (GimpChannel *mask,
|
||||
ChannelOps op,
|
||||
GimpChannelOps op,
|
||||
gint x,
|
||||
gint y,
|
||||
gint w,
|
||||
|
@ -146,7 +146,7 @@ void gimp_channel_combine_ellipse (GimpChannel *mask,
|
|||
gboolean antialias);
|
||||
void gimp_channel_combine_mask (GimpChannel *mask,
|
||||
GimpChannel *add_on,
|
||||
ChannelOps op,
|
||||
GimpChannelOps op,
|
||||
gint off_x,
|
||||
gint off_y);
|
||||
|
||||
|
|
|
@ -34,20 +34,20 @@
|
|||
|
||||
|
||||
void
|
||||
gimp_image_mask_select_rectangle (GimpImage *gimage,
|
||||
gint x,
|
||||
gint y,
|
||||
gint w,
|
||||
gint h,
|
||||
ChannelOps op,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y)
|
||||
gimp_image_mask_select_rectangle (GimpImage *gimage,
|
||||
gint x,
|
||||
gint y,
|
||||
gint w,
|
||||
gint h,
|
||||
GimpChannelOps op,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_IMAGE (gimage));
|
||||
|
||||
/* if applicable, replace the current selection */
|
||||
if (op == CHANNEL_OP_REPLACE)
|
||||
if (op == GIMP_CHANNEL_OP_REPLACE)
|
||||
gimp_image_mask_clear (gimage);
|
||||
else
|
||||
gimp_image_mask_undo (gimage);
|
||||
|
@ -55,12 +55,12 @@ gimp_image_mask_select_rectangle (GimpImage *gimage,
|
|||
/* if feathering for rect, make a new mask with the
|
||||
* rectangle and feather that with the old mask
|
||||
*/
|
||||
if (feather || op == CHANNEL_OP_INTERSECT)
|
||||
if (feather || op == GIMP_CHANNEL_OP_INTERSECT)
|
||||
{
|
||||
GimpChannel *mask;
|
||||
|
||||
mask = gimp_channel_new_mask (gimage, gimage->width, gimage->height);
|
||||
gimp_channel_combine_rect (mask, CHANNEL_OP_ADD, x, y, w, h);
|
||||
gimp_channel_combine_rect (mask, GIMP_CHANNEL_OP_ADD, x, y, w, h);
|
||||
|
||||
if (feather)
|
||||
gimp_channel_feather (mask,
|
||||
|
@ -78,21 +78,21 @@ gimp_image_mask_select_rectangle (GimpImage *gimage,
|
|||
}
|
||||
|
||||
void
|
||||
gimp_image_mask_select_ellipse (GimpImage *gimage,
|
||||
gint x,
|
||||
gint y,
|
||||
gint w,
|
||||
gint h,
|
||||
ChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y)
|
||||
gimp_image_mask_select_ellipse (GimpImage *gimage,
|
||||
gint x,
|
||||
gint y,
|
||||
gint w,
|
||||
gint h,
|
||||
GimpChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_IMAGE (gimage));
|
||||
|
||||
/* if applicable, replace the current selection */
|
||||
if (op == CHANNEL_OP_REPLACE)
|
||||
if (op == GIMP_CHANNEL_OP_REPLACE)
|
||||
gimp_image_mask_clear (gimage);
|
||||
else
|
||||
gimp_image_mask_undo (gimage);
|
||||
|
@ -100,12 +100,13 @@ gimp_image_mask_select_ellipse (GimpImage *gimage,
|
|||
/* if feathering for rect, make a new mask with the
|
||||
* rectangle and feather that with the old mask
|
||||
*/
|
||||
if (feather || op == CHANNEL_OP_INTERSECT)
|
||||
if (feather || op == GIMP_CHANNEL_OP_INTERSECT)
|
||||
{
|
||||
GimpChannel *mask;
|
||||
|
||||
mask = gimp_channel_new_mask (gimage, gimage->width, gimage->height);
|
||||
gimp_channel_combine_ellipse (mask, CHANNEL_OP_ADD, x, y, w, h, antialias);
|
||||
gimp_channel_combine_ellipse (mask, GIMP_CHANNEL_OP_ADD,
|
||||
x, y, w, h, antialias);
|
||||
|
||||
if (feather)
|
||||
gimp_channel_feather (mask,
|
||||
|
@ -124,14 +125,14 @@ gimp_image_mask_select_ellipse (GimpImage *gimage,
|
|||
}
|
||||
|
||||
void
|
||||
gimp_image_mask_select_polygon (GimpImage *gimage,
|
||||
gint n_points,
|
||||
GimpVector2 *points,
|
||||
ChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y)
|
||||
gimp_image_mask_select_polygon (GimpImage *gimage,
|
||||
gint n_points,
|
||||
GimpVector2 *points,
|
||||
GimpChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y)
|
||||
{
|
||||
GimpScanConvert *scan_convert;
|
||||
GimpChannel *mask;
|
||||
|
@ -141,7 +142,7 @@ gimp_image_mask_select_polygon (GimpImage *gimage,
|
|||
/* if applicable, replace the current selection
|
||||
* or insure that a floating selection is anchored down...
|
||||
*/
|
||||
if (op == CHANNEL_OP_REPLACE)
|
||||
if (op == GIMP_CHANNEL_OP_REPLACE)
|
||||
gimp_image_mask_clear (gimage);
|
||||
else
|
||||
gimp_image_mask_undo (gimage);
|
||||
|
@ -173,13 +174,13 @@ gimp_image_mask_select_polygon (GimpImage *gimage,
|
|||
}
|
||||
|
||||
void
|
||||
gimp_image_mask_select_vectors (GimpImage *gimage,
|
||||
GimpVectors *vectors,
|
||||
ChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y)
|
||||
gimp_image_mask_select_vectors (GimpImage *gimage,
|
||||
GimpVectors *vectors,
|
||||
GimpChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y)
|
||||
{
|
||||
GimpStroke *stroke;
|
||||
GimpCoords *coords = NULL;
|
||||
|
@ -230,20 +231,20 @@ gimp_image_mask_select_vectors (GimpImage *gimage,
|
|||
}
|
||||
|
||||
void
|
||||
gimp_image_mask_select_channel (GimpImage *gimage,
|
||||
GimpChannel *channel,
|
||||
gint offset_x,
|
||||
gint offset_y,
|
||||
ChannelOps op,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y)
|
||||
gimp_image_mask_select_channel (GimpImage *gimage,
|
||||
GimpChannel *channel,
|
||||
gint offset_x,
|
||||
gint offset_y,
|
||||
GimpChannelOps op,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_IMAGE (gimage));
|
||||
g_return_if_fail (GIMP_IS_CHANNEL (channel));
|
||||
|
||||
/* if applicable, replace the current selection */
|
||||
if (op == CHANNEL_OP_REPLACE)
|
||||
if (op == GIMP_CHANNEL_OP_REPLACE)
|
||||
gimp_image_mask_clear (gimage);
|
||||
else
|
||||
gimp_image_mask_undo (gimage);
|
||||
|
@ -259,18 +260,18 @@ gimp_image_mask_select_channel (GimpImage *gimage,
|
|||
}
|
||||
|
||||
void
|
||||
gimp_image_mask_select_fuzzy (GimpImage *gimage,
|
||||
GimpDrawable *drawable,
|
||||
gboolean sample_merged,
|
||||
gint x,
|
||||
gint y,
|
||||
gint threshold,
|
||||
gboolean select_transparent,
|
||||
ChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y)
|
||||
gimp_image_mask_select_fuzzy (GimpImage *gimage,
|
||||
GimpDrawable *drawable,
|
||||
gboolean sample_merged,
|
||||
gint x,
|
||||
gint y,
|
||||
gint threshold,
|
||||
gboolean select_transparent,
|
||||
GimpChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y)
|
||||
{
|
||||
GimpChannel *mask;
|
||||
gint mask_x;
|
||||
|
@ -309,17 +310,17 @@ gimp_image_mask_select_fuzzy (GimpImage *gimage,
|
|||
}
|
||||
|
||||
void
|
||||
gimp_image_mask_select_by_color (GimpImage *gimage,
|
||||
GimpDrawable *drawable,
|
||||
gboolean sample_merged,
|
||||
const GimpRGB *color,
|
||||
gint threshold,
|
||||
gboolean select_transparent,
|
||||
ChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y)
|
||||
gimp_image_mask_select_by_color (GimpImage *gimage,
|
||||
GimpDrawable *drawable,
|
||||
gboolean sample_merged,
|
||||
const GimpRGB *color,
|
||||
gint threshold,
|
||||
gboolean select_transparent,
|
||||
GimpChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y)
|
||||
{
|
||||
GimpChannel *mask;
|
||||
gint mask_x;
|
||||
|
|
|
@ -20,77 +20,77 @@
|
|||
#define __GIMP_IMAGE_MASK_SELECT_H__
|
||||
|
||||
|
||||
void gimp_image_mask_select_rectangle (GimpImage *gimage,
|
||||
gint x,
|
||||
gint y,
|
||||
gint w,
|
||||
gint h,
|
||||
ChannelOps op,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y);
|
||||
void gimp_image_mask_select_rectangle (GimpImage *gimage,
|
||||
gint x,
|
||||
gint y,
|
||||
gint w,
|
||||
gint h,
|
||||
GimpChannelOps op,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y);
|
||||
|
||||
void gimp_image_mask_select_ellipse (GimpImage *gimage,
|
||||
gint x,
|
||||
gint y,
|
||||
gint w,
|
||||
gint h,
|
||||
ChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y);
|
||||
void gimp_image_mask_select_ellipse (GimpImage *gimage,
|
||||
gint x,
|
||||
gint y,
|
||||
gint w,
|
||||
gint h,
|
||||
GimpChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y);
|
||||
|
||||
void gimp_image_mask_select_polygon (GimpImage *gimage,
|
||||
gint n_points,
|
||||
GimpVector2 *points,
|
||||
ChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y);
|
||||
void gimp_image_mask_select_polygon (GimpImage *gimage,
|
||||
gint n_points,
|
||||
GimpVector2 *points,
|
||||
GimpChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y);
|
||||
|
||||
void gimp_image_mask_select_vectors (GimpImage *gimage,
|
||||
GimpVectors *vectors,
|
||||
ChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y);
|
||||
void gimp_image_mask_select_vectors (GimpImage *gimage,
|
||||
GimpVectors *vectors,
|
||||
GimpChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y);
|
||||
|
||||
void gimp_image_mask_select_channel (GimpImage *gimage,
|
||||
GimpChannel *channel,
|
||||
gint offset_x,
|
||||
gint offset_y,
|
||||
ChannelOps op,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y);
|
||||
void gimp_image_mask_select_channel (GimpImage *gimage,
|
||||
GimpChannel *channel,
|
||||
gint offset_x,
|
||||
gint offset_y,
|
||||
GimpChannelOps op,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y);
|
||||
|
||||
void gimp_image_mask_select_fuzzy (GimpImage *gimage,
|
||||
GimpDrawable *drawable,
|
||||
gboolean sample_merged,
|
||||
gint x,
|
||||
gint y,
|
||||
gint threshold,
|
||||
gboolean select_transparent,
|
||||
ChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y);
|
||||
void gimp_image_mask_select_fuzzy (GimpImage *gimage,
|
||||
GimpDrawable *drawable,
|
||||
gboolean sample_merged,
|
||||
gint x,
|
||||
gint y,
|
||||
gint threshold,
|
||||
gboolean select_transparent,
|
||||
GimpChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y);
|
||||
|
||||
void gimp_image_mask_select_by_color (GimpImage *gimage,
|
||||
GimpDrawable *drawable,
|
||||
gboolean sample_merged,
|
||||
const GimpRGB *color,
|
||||
gint threshold,
|
||||
gboolean select_transparent,
|
||||
ChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y);
|
||||
void gimp_image_mask_select_by_color (GimpImage *gimage,
|
||||
GimpDrawable *drawable,
|
||||
gboolean sample_merged,
|
||||
const GimpRGB *color,
|
||||
gint threshold,
|
||||
gboolean select_transparent,
|
||||
GimpChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
gdouble feather_radius_x,
|
||||
gdouble feather_radius_y);
|
||||
|
||||
|
||||
#endif /* __GIMP_IMAGE_MASK_SELECT_H__ */
|
||||
|
|
|
@ -133,9 +133,9 @@ channels_delete_channel_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
static void
|
||||
channels_channel_to_sel (GtkWidget *widget,
|
||||
gpointer data,
|
||||
ChannelOps op)
|
||||
channels_channel_to_sel (GtkWidget *widget,
|
||||
gpointer data,
|
||||
GimpChannelOps op)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpChannel *active_channel;
|
||||
|
@ -153,28 +153,28 @@ void
|
|||
channels_channel_to_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
channels_channel_to_sel (widget, data, CHANNEL_OP_REPLACE);
|
||||
channels_channel_to_sel (widget, data, GIMP_CHANNEL_OP_REPLACE);
|
||||
}
|
||||
|
||||
void
|
||||
channels_add_channel_to_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
channels_channel_to_sel (widget, data, CHANNEL_OP_ADD);
|
||||
channels_channel_to_sel (widget, data, GIMP_CHANNEL_OP_ADD);
|
||||
}
|
||||
|
||||
void
|
||||
channels_sub_channel_from_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
channels_channel_to_sel (widget, data, CHANNEL_OP_SUBTRACT);
|
||||
channels_channel_to_sel (widget, data, GIMP_CHANNEL_OP_SUBTRACT);
|
||||
}
|
||||
|
||||
void
|
||||
channels_intersect_channel_with_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
channels_channel_to_sel (widget, data, CHANNEL_OP_INTERSECT);
|
||||
channels_channel_to_sel (widget, data, GIMP_CHANNEL_OP_INTERSECT);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -137,9 +137,9 @@ vectors_delete_vectors_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
|
||||
static void
|
||||
vectors_vectors_to_sel (GtkWidget *widget,
|
||||
gpointer data,
|
||||
ChannelOps op)
|
||||
vectors_vectors_to_sel (GtkWidget *widget,
|
||||
gpointer data,
|
||||
GimpChannelOps op)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GimpVectors *active_vectors;
|
||||
|
@ -157,28 +157,28 @@ void
|
|||
vectors_vectors_to_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
vectors_vectors_to_sel (widget, data, CHANNEL_OP_REPLACE);
|
||||
vectors_vectors_to_sel (widget, data, GIMP_CHANNEL_OP_REPLACE);
|
||||
}
|
||||
|
||||
void
|
||||
vectors_add_vectors_to_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
vectors_vectors_to_sel (widget, data, CHANNEL_OP_ADD);
|
||||
vectors_vectors_to_sel (widget, data, GIMP_CHANNEL_OP_ADD);
|
||||
}
|
||||
|
||||
void
|
||||
vectors_sub_vectors_from_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
vectors_vectors_to_sel (widget, data, CHANNEL_OP_SUBTRACT);
|
||||
vectors_vectors_to_sel (widget, data, GIMP_CHANNEL_OP_SUBTRACT);
|
||||
}
|
||||
|
||||
void
|
||||
vectors_intersect_vectors_with_sel_cmd_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
vectors_vectors_to_sel (widget, data, CHANNEL_OP_INTERSECT);
|
||||
vectors_vectors_to_sel (widget, data, GIMP_CHANNEL_OP_INTERSECT);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include "pdb-types.h"
|
||||
#include "procedural_db.h"
|
||||
|
||||
#include "core/core-types.h"
|
||||
#include "core/core-enums.h"
|
||||
#include "core/gimpchannel.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "pdb_glue.h"
|
||||
|
@ -312,7 +312,7 @@ channel_combine_masks_invoker (Gimp *gimp,
|
|||
success = FALSE;
|
||||
|
||||
operation = args[2].value.pdb_int;
|
||||
if (operation < CHANNEL_OP_ADD || operation > CHANNEL_OP_INTERSECT)
|
||||
if (operation < GIMP_CHANNEL_OP_ADD || operation > GIMP_CHANNEL_OP_INTERSECT)
|
||||
success = FALSE;
|
||||
|
||||
offx = args[3].value.pdb_int;
|
||||
|
@ -342,7 +342,7 @@ static ProcArg channel_combine_masks_inargs[] =
|
|||
{
|
||||
GIMP_PDB_INT32,
|
||||
"operation",
|
||||
"The selection operation: { CHANNEL_OP_ADD (0), CHANNEL_OP_SUBTRACT (1), CHANNEL_OP_REPLACE (2), CHANNEL_OP_INTERSECT (3) }"
|
||||
"The selection operation: { GIMP_CHANNEL_OP_ADD (0), GIMP_CHANNEL_OP_SUBTRACT (1), GIMP_CHANNEL_OP_REPLACE (2), GIMP_CHANNEL_OP_INTERSECT (3) }"
|
||||
},
|
||||
{
|
||||
GIMP_PDB_INT32,
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include "pdb-types.h"
|
||||
#include "procedural_db.h"
|
||||
|
||||
#include "core/core-types.h"
|
||||
#include "core/core-enums.h"
|
||||
#include "core/gimpchannel.h"
|
||||
#include "core/gimpdrawable.h"
|
||||
#include "core/gimpimage-mask.h"
|
||||
|
@ -1014,7 +1014,7 @@ selection_combine_invoker (Gimp *gimp,
|
|||
success = FALSE;
|
||||
|
||||
operation = args[1].value.pdb_int;
|
||||
if (operation < CHANNEL_OP_ADD || operation > CHANNEL_OP_INTERSECT)
|
||||
if (operation < GIMP_CHANNEL_OP_ADD || operation > GIMP_CHANNEL_OP_INTERSECT)
|
||||
success = FALSE;
|
||||
|
||||
if (success)
|
||||
|
@ -1051,7 +1051,7 @@ static ProcArg selection_combine_inargs[] =
|
|||
{
|
||||
GIMP_PDB_INT32,
|
||||
"operation",
|
||||
"The selection operation: { CHANNEL_OP_ADD (0), CHANNEL_OP_SUBTRACT (1), CHANNEL_OP_REPLACE (2), CHANNEL_OP_INTERSECT (3) }"
|
||||
"The selection operation: { GIMP_CHANNEL_OP_ADD (0), GIMP_CHANNEL_OP_SUBTRACT (1), GIMP_CHANNEL_OP_REPLACE (2), GIMP_CHANNEL_OP_INTERSECT (3) }"
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include "pdb-types.h"
|
||||
#include "procedural_db.h"
|
||||
|
||||
#include "core/core-types.h"
|
||||
#include "core/core-enums.h"
|
||||
#include "core/gimpdrawable.h"
|
||||
#include "core/gimpimage-mask-select.h"
|
||||
#include "core/gimpimage.h"
|
||||
|
@ -77,7 +77,7 @@ by_color_select_invoker (Gimp *gimp,
|
|||
success = FALSE;
|
||||
|
||||
operation = args[3].value.pdb_int;
|
||||
if (operation < CHANNEL_OP_ADD || operation > CHANNEL_OP_INTERSECT)
|
||||
if (operation < GIMP_CHANNEL_OP_ADD || operation > GIMP_CHANNEL_OP_INTERSECT)
|
||||
success = FALSE;
|
||||
|
||||
antialias = args[4].value.pdb_int ? TRUE : FALSE;
|
||||
|
@ -127,7 +127,7 @@ static ProcArg by_color_select_inargs[] =
|
|||
{
|
||||
GIMP_PDB_INT32,
|
||||
"operation",
|
||||
"The selection operation: { CHANNEL_OP_ADD (0), CHANNEL_OP_SUBTRACT (1), CHANNEL_OP_REPLACE (2), CHANNEL_OP_INTERSECT (3) }"
|
||||
"The selection operation: { GIMP_CHANNEL_OP_ADD (0), GIMP_CHANNEL_OP_SUBTRACT (1), GIMP_CHANNEL_OP_REPLACE (2), GIMP_CHANNEL_OP_INTERSECT (3) }"
|
||||
},
|
||||
{
|
||||
GIMP_PDB_INT32,
|
||||
|
@ -199,7 +199,7 @@ ellipse_select_invoker (Gimp *gimp,
|
|||
success = FALSE;
|
||||
|
||||
operation = args[5].value.pdb_int;
|
||||
if (operation < CHANNEL_OP_ADD || operation > CHANNEL_OP_INTERSECT)
|
||||
if (operation < GIMP_CHANNEL_OP_ADD || operation > GIMP_CHANNEL_OP_INTERSECT)
|
||||
success = FALSE;
|
||||
|
||||
antialias = args[6].value.pdb_int ? TRUE : FALSE;
|
||||
|
@ -251,7 +251,7 @@ static ProcArg ellipse_select_inargs[] =
|
|||
{
|
||||
GIMP_PDB_INT32,
|
||||
"operation",
|
||||
"The selection operation: { CHANNEL_OP_ADD (0), CHANNEL_OP_SUBTRACT (1), CHANNEL_OP_REPLACE (2), CHANNEL_OP_INTERSECT (3) }"
|
||||
"The selection operation: { GIMP_CHANNEL_OP_ADD (0), GIMP_CHANNEL_OP_SUBTRACT (1), GIMP_CHANNEL_OP_REPLACE (2), GIMP_CHANNEL_OP_INTERSECT (3) }"
|
||||
},
|
||||
{
|
||||
GIMP_PDB_INT32,
|
||||
|
@ -312,7 +312,7 @@ free_select_invoker (Gimp *gimp,
|
|||
segs = (gdouble *) args[2].value.pdb_pointer;
|
||||
|
||||
operation = args[3].value.pdb_int;
|
||||
if (operation < CHANNEL_OP_ADD || operation > CHANNEL_OP_INTERSECT)
|
||||
if (operation < GIMP_CHANNEL_OP_ADD || operation > GIMP_CHANNEL_OP_INTERSECT)
|
||||
success = FALSE;
|
||||
|
||||
antialias = args[4].value.pdb_int ? TRUE : FALSE;
|
||||
|
@ -354,7 +354,7 @@ static ProcArg free_select_inargs[] =
|
|||
{
|
||||
GIMP_PDB_INT32,
|
||||
"operation",
|
||||
"The selection operation: { CHANNEL_OP_ADD (0), CHANNEL_OP_SUBTRACT (1), CHANNEL_OP_REPLACE (2), CHANNEL_OP_INTERSECT (3) }"
|
||||
"The selection operation: { GIMP_CHANNEL_OP_ADD (0), GIMP_CHANNEL_OP_SUBTRACT (1), GIMP_CHANNEL_OP_REPLACE (2), GIMP_CHANNEL_OP_INTERSECT (3) }"
|
||||
},
|
||||
{
|
||||
GIMP_PDB_INT32,
|
||||
|
@ -418,7 +418,7 @@ fuzzy_select_invoker (Gimp *gimp,
|
|||
success = FALSE;
|
||||
|
||||
operation = args[4].value.pdb_int;
|
||||
if (operation < CHANNEL_OP_ADD || operation > CHANNEL_OP_INTERSECT)
|
||||
if (operation < GIMP_CHANNEL_OP_ADD || operation > GIMP_CHANNEL_OP_INTERSECT)
|
||||
success = FALSE;
|
||||
|
||||
antialias = args[5].value.pdb_int ? TRUE : FALSE;
|
||||
|
@ -474,7 +474,7 @@ static ProcArg fuzzy_select_inargs[] =
|
|||
{
|
||||
GIMP_PDB_INT32,
|
||||
"operation",
|
||||
"The selection operation: { CHANNEL_OP_ADD (0), CHANNEL_OP_SUBTRACT (1), CHANNEL_OP_REPLACE (2), CHANNEL_OP_INTERSECT (3) }"
|
||||
"The selection operation: { GIMP_CHANNEL_OP_ADD (0), GIMP_CHANNEL_OP_SUBTRACT (1), GIMP_CHANNEL_OP_REPLACE (2), GIMP_CHANNEL_OP_INTERSECT (3) }"
|
||||
},
|
||||
{
|
||||
GIMP_PDB_INT32,
|
||||
|
@ -546,7 +546,7 @@ rect_select_invoker (Gimp *gimp,
|
|||
success = FALSE;
|
||||
|
||||
operation = args[5].value.pdb_int;
|
||||
if (operation < CHANNEL_OP_ADD || operation > CHANNEL_OP_INTERSECT)
|
||||
if (operation < GIMP_CHANNEL_OP_ADD || operation > GIMP_CHANNEL_OP_INTERSECT)
|
||||
success = FALSE;
|
||||
|
||||
feather = args[6].value.pdb_int ? TRUE : FALSE;
|
||||
|
@ -595,7 +595,7 @@ static ProcArg rect_select_inargs[] =
|
|||
{
|
||||
GIMP_PDB_INT32,
|
||||
"operation",
|
||||
"The selection operation: { CHANNEL_OP_ADD (0), CHANNEL_OP_SUBTRACT (1), CHANNEL_OP_REPLACE (2), CHANNEL_OP_INTERSECT (3) }"
|
||||
"The selection operation: { GIMP_CHANNEL_OP_ADD (0), GIMP_CHANNEL_OP_SUBTRACT (1), GIMP_CHANNEL_OP_REPLACE (2), GIMP_CHANNEL_OP_INTERSECT (3) }"
|
||||
},
|
||||
{
|
||||
GIMP_PDB_INT32,
|
||||
|
|
|
@ -203,7 +203,7 @@ static gboolean test_add_point_on_segment (GimpBezierSelectTool *bezier_s
|
|||
static void bezier_to_sel_internal (GimpBezierSelectTool *bezier_sel,
|
||||
GimpTool *tool,
|
||||
GimpDisplay *gdisp,
|
||||
ChannelOps op);
|
||||
GimpChannelOps op);
|
||||
static void bezier_stack_points_aux (GdkPoint *points,
|
||||
gint start,
|
||||
gint end,
|
||||
|
@ -658,19 +658,19 @@ gimp_bezier_select_tool_button_press (GimpTool *tool,
|
|||
{
|
||||
if ((state & GDK_CONTROL_MASK) && (state & GDK_SHIFT_MASK))
|
||||
{
|
||||
op = CHANNEL_OP_INTERSECT;
|
||||
op = GIMP_CHANNEL_OP_INTERSECT;
|
||||
}
|
||||
else if (state & GDK_SHIFT_MASK)
|
||||
{
|
||||
op = CHANNEL_OP_ADD;
|
||||
op = GIMP_CHANNEL_OP_ADD;
|
||||
}
|
||||
else if (state & GDK_CONTROL_MASK)
|
||||
{
|
||||
op = CHANNEL_OP_SUBTRACT;
|
||||
op = GIMP_CHANNEL_OP_SUBTRACT;
|
||||
}
|
||||
else
|
||||
{
|
||||
op = CHANNEL_OP_REPLACE;
|
||||
op = GIMP_CHANNEL_OP_REPLACE;
|
||||
}
|
||||
|
||||
bezier_to_sel_internal (bezier_sel, tool, gdisp, op);
|
||||
|
@ -2889,7 +2889,7 @@ static void
|
|||
bezier_to_sel_internal (GimpBezierSelectTool *bezier_sel,
|
||||
GimpTool *tool,
|
||||
GimpDisplay *gdisp,
|
||||
ChannelOps op)
|
||||
GimpChannelOps op)
|
||||
{
|
||||
SelectionOptions *sel_options;
|
||||
|
||||
|
@ -3178,7 +3178,7 @@ bezier_to_selection (GimpBezierSelectTool *bezier_sel,
|
|||
*/
|
||||
bezier_paste_bezierselect_to_current (gdisp, bezier_sel);
|
||||
bezier_to_sel_internal (curSel, (GimpTool *) curTool, gdisp,
|
||||
CHANNEL_OP_REPLACE);
|
||||
GIMP_CHANNEL_OP_REPLACE);
|
||||
}
|
||||
|
||||
/* check whether vectors (offx, offy), (l_offx, l_offy) have the same angle. */
|
||||
|
|
|
@ -69,10 +69,10 @@ typedef void (* GimpToolRegisterFunc) (Gimp *gimp,
|
|||
|
||||
typedef enum /*< pdb-skip >*/
|
||||
{
|
||||
SELECTION_ADD = CHANNEL_OP_ADD,
|
||||
SELECTION_SUBTRACT = CHANNEL_OP_SUBTRACT,
|
||||
SELECTION_REPLACE = CHANNEL_OP_REPLACE,
|
||||
SELECTION_INTERSECT = CHANNEL_OP_INTERSECT,
|
||||
SELECTION_ADD = GIMP_CHANNEL_OP_ADD,
|
||||
SELECTION_SUBTRACT = GIMP_CHANNEL_OP_SUBTRACT,
|
||||
SELECTION_REPLACE = GIMP_CHANNEL_OP_REPLACE,
|
||||
SELECTION_INTERSECT = GIMP_CHANNEL_OP_INTERSECT,
|
||||
SELECTION_MOVE_MASK,
|
||||
SELECTION_MOVE,
|
||||
SELECTION_ANCHOR
|
||||
|
|
|
@ -62,7 +62,7 @@ static void gimp_channel_list_view_set_preview_size (GimpContainerView *view);
|
|||
|
||||
static void gimp_channel_list_view_to_selection (GimpChannelListView *view,
|
||||
GimpChannel *channel,
|
||||
ChannelOps operation);
|
||||
GimpChannelOps operation);
|
||||
static void gimp_channel_list_view_toselection_clicked
|
||||
(GtkWidget *widget,
|
||||
GimpChannelListView *view);
|
||||
|
@ -293,7 +293,7 @@ gimp_channel_list_view_set_preview_size (GimpContainerView *view)
|
|||
static void
|
||||
gimp_channel_list_view_to_selection (GimpChannelListView *view,
|
||||
GimpChannel *channel,
|
||||
ChannelOps operation)
|
||||
GimpChannelOps operation)
|
||||
{
|
||||
if (channel)
|
||||
{
|
||||
|
@ -302,7 +302,7 @@ gimp_channel_list_view_to_selection (GimpChannelListView *view,
|
|||
|
||||
gimage = gimp_item_get_image (GIMP_ITEM (channel));
|
||||
|
||||
if (operation == CHANNEL_OP_REPLACE)
|
||||
if (operation == GIMP_CHANNEL_OP_REPLACE)
|
||||
{
|
||||
new_channel = channel;
|
||||
|
||||
|
@ -349,18 +349,18 @@ gimp_channel_list_view_toselection_extended_clicked (GtkWidget *widget
|
|||
|
||||
if (viewable)
|
||||
{
|
||||
ChannelOps operation = CHANNEL_OP_REPLACE;
|
||||
GimpChannelOps operation = GIMP_CHANNEL_OP_REPLACE;
|
||||
|
||||
if (state & GDK_SHIFT_MASK)
|
||||
{
|
||||
if (state & GDK_CONTROL_MASK)
|
||||
operation = CHANNEL_OP_INTERSECT;
|
||||
operation = GIMP_CHANNEL_OP_INTERSECT;
|
||||
else
|
||||
operation = CHANNEL_OP_ADD;
|
||||
operation = GIMP_CHANNEL_OP_ADD;
|
||||
}
|
||||
else if (state & GDK_CONTROL_MASK)
|
||||
{
|
||||
operation = CHANNEL_OP_SUBTRACT;
|
||||
operation = GIMP_CHANNEL_OP_SUBTRACT;
|
||||
}
|
||||
|
||||
gimp_channel_list_view_to_selection (view, GIMP_CHANNEL (viewable),
|
||||
|
|
|
@ -62,7 +62,7 @@ static void gimp_channel_list_view_set_preview_size (GimpContainerView *view);
|
|||
|
||||
static void gimp_channel_list_view_to_selection (GimpChannelListView *view,
|
||||
GimpChannel *channel,
|
||||
ChannelOps operation);
|
||||
GimpChannelOps operation);
|
||||
static void gimp_channel_list_view_toselection_clicked
|
||||
(GtkWidget *widget,
|
||||
GimpChannelListView *view);
|
||||
|
@ -293,7 +293,7 @@ gimp_channel_list_view_set_preview_size (GimpContainerView *view)
|
|||
static void
|
||||
gimp_channel_list_view_to_selection (GimpChannelListView *view,
|
||||
GimpChannel *channel,
|
||||
ChannelOps operation)
|
||||
GimpChannelOps operation)
|
||||
{
|
||||
if (channel)
|
||||
{
|
||||
|
@ -302,7 +302,7 @@ gimp_channel_list_view_to_selection (GimpChannelListView *view,
|
|||
|
||||
gimage = gimp_item_get_image (GIMP_ITEM (channel));
|
||||
|
||||
if (operation == CHANNEL_OP_REPLACE)
|
||||
if (operation == GIMP_CHANNEL_OP_REPLACE)
|
||||
{
|
||||
new_channel = channel;
|
||||
|
||||
|
@ -349,18 +349,18 @@ gimp_channel_list_view_toselection_extended_clicked (GtkWidget *widget
|
|||
|
||||
if (viewable)
|
||||
{
|
||||
ChannelOps operation = CHANNEL_OP_REPLACE;
|
||||
GimpChannelOps operation = GIMP_CHANNEL_OP_REPLACE;
|
||||
|
||||
if (state & GDK_SHIFT_MASK)
|
||||
{
|
||||
if (state & GDK_CONTROL_MASK)
|
||||
operation = CHANNEL_OP_INTERSECT;
|
||||
operation = GIMP_CHANNEL_OP_INTERSECT;
|
||||
else
|
||||
operation = CHANNEL_OP_ADD;
|
||||
operation = GIMP_CHANNEL_OP_ADD;
|
||||
}
|
||||
else if (state & GDK_CONTROL_MASK)
|
||||
{
|
||||
operation = CHANNEL_OP_SUBTRACT;
|
||||
operation = GIMP_CHANNEL_OP_SUBTRACT;
|
||||
}
|
||||
|
||||
gimp_channel_list_view_to_selection (view, GIMP_CHANNEL (viewable),
|
||||
|
|
|
@ -60,7 +60,7 @@ static void gimp_vectors_list_view_select_item (GimpContainerView *view,
|
|||
gpointer insert_data);
|
||||
static void gimp_vectors_list_view_to_selection (GimpVectorsListView *view,
|
||||
GimpVectors *vectors,
|
||||
ChannelOps operation);
|
||||
GimpChannelOps operation);
|
||||
static void gimp_vectors_list_view_toselection_clicked
|
||||
(GtkWidget *widget,
|
||||
GimpVectorsListView *view);
|
||||
|
@ -189,7 +189,7 @@ gimp_vectors_list_view_select_item (GimpContainerView *view,
|
|||
static void
|
||||
gimp_vectors_list_view_to_selection (GimpVectorsListView *view,
|
||||
GimpVectors *vectors,
|
||||
ChannelOps operation)
|
||||
GimpChannelOps operation)
|
||||
{
|
||||
if (vectors)
|
||||
{
|
||||
|
@ -224,18 +224,18 @@ gimp_vectors_list_view_toselection_extended_clicked (GtkWidget *widget
|
|||
|
||||
if (viewable)
|
||||
{
|
||||
ChannelOps operation = CHANNEL_OP_REPLACE;
|
||||
GimpChannelOps operation = GIMP_CHANNEL_OP_REPLACE;
|
||||
|
||||
if (state & GDK_SHIFT_MASK)
|
||||
{
|
||||
if (state & GDK_CONTROL_MASK)
|
||||
operation = CHANNEL_OP_INTERSECT;
|
||||
operation = GIMP_CHANNEL_OP_INTERSECT;
|
||||
else
|
||||
operation = CHANNEL_OP_ADD;
|
||||
operation = GIMP_CHANNEL_OP_ADD;
|
||||
}
|
||||
else if (state & GDK_CONTROL_MASK)
|
||||
{
|
||||
operation = CHANNEL_OP_SUBTRACT;
|
||||
operation = GIMP_CHANNEL_OP_SUBTRACT;
|
||||
}
|
||||
|
||||
gimp_vectors_list_view_to_selection (view, GIMP_VECTORS (viewable),
|
||||
|
|
|
@ -60,7 +60,7 @@ static void gimp_vectors_list_view_select_item (GimpContainerView *view,
|
|||
gpointer insert_data);
|
||||
static void gimp_vectors_list_view_to_selection (GimpVectorsListView *view,
|
||||
GimpVectors *vectors,
|
||||
ChannelOps operation);
|
||||
GimpChannelOps operation);
|
||||
static void gimp_vectors_list_view_toselection_clicked
|
||||
(GtkWidget *widget,
|
||||
GimpVectorsListView *view);
|
||||
|
@ -189,7 +189,7 @@ gimp_vectors_list_view_select_item (GimpContainerView *view,
|
|||
static void
|
||||
gimp_vectors_list_view_to_selection (GimpVectorsListView *view,
|
||||
GimpVectors *vectors,
|
||||
ChannelOps operation)
|
||||
GimpChannelOps operation)
|
||||
{
|
||||
if (vectors)
|
||||
{
|
||||
|
@ -224,18 +224,18 @@ gimp_vectors_list_view_toselection_extended_clicked (GtkWidget *widget
|
|||
|
||||
if (viewable)
|
||||
{
|
||||
ChannelOps operation = CHANNEL_OP_REPLACE;
|
||||
GimpChannelOps operation = GIMP_CHANNEL_OP_REPLACE;
|
||||
|
||||
if (state & GDK_SHIFT_MASK)
|
||||
{
|
||||
if (state & GDK_CONTROL_MASK)
|
||||
operation = CHANNEL_OP_INTERSECT;
|
||||
operation = GIMP_CHANNEL_OP_INTERSECT;
|
||||
else
|
||||
operation = CHANNEL_OP_ADD;
|
||||
operation = GIMP_CHANNEL_OP_ADD;
|
||||
}
|
||||
else if (state & GDK_CONTROL_MASK)
|
||||
{
|
||||
operation = CHANNEL_OP_SUBTRACT;
|
||||
operation = GIMP_CHANNEL_OP_SUBTRACT;
|
||||
}
|
||||
|
||||
gimp_vectors_list_view_to_selection (view, GIMP_VECTORS (viewable),
|
||||
|
|
|
@ -31,14 +31,6 @@ typedef enum
|
|||
GIMP_PRESSURE
|
||||
} GimpBrushApplicationMode;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GIMP_CHANNEL_OP_ADD,
|
||||
GIMP_CHANNEL_OP_SUBTRACT,
|
||||
GIMP_CHANNEL_OP_REPLACE,
|
||||
GIMP_CHANNEL_OP_INTERSECT
|
||||
} GimpChannelOps;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GIMP_IMAGE_CLONE,
|
||||
|
@ -93,6 +85,14 @@ typedef enum
|
|||
GIMP_ALPHA_LUT
|
||||
} GimpChannelLutType;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GIMP_CHANNEL_OP_ADD,
|
||||
GIMP_CHANNEL_OP_SUBTRACT,
|
||||
GIMP_CHANNEL_OP_REPLACE,
|
||||
GIMP_CHANNEL_OP_INTERSECT
|
||||
} GimpChannelOps;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GIMP_RED_CHANNEL,
|
||||
|
|
|
@ -27,11 +27,6 @@ init_generated_constants (void)
|
|||
setvar (cintern ("SOFT"), flocons (1), NIL);
|
||||
setvar (cintern ("PRESSURE"), flocons (2), NIL);
|
||||
|
||||
setvar (cintern ("CHANNEL-OP-ADD"), flocons (0), NIL);
|
||||
setvar (cintern ("CHANNEL-OP-SUBTRACT"), flocons (1), NIL);
|
||||
setvar (cintern ("CHANNEL-OP-REPLACE"), flocons (2), NIL);
|
||||
setvar (cintern ("CHANNEL-OP-INTERSECT"), flocons (3), NIL);
|
||||
|
||||
setvar (cintern ("IMAGE-CLONE"), flocons (0), NIL);
|
||||
setvar (cintern ("PATTERN-CLONE"), flocons (1), NIL);
|
||||
|
||||
|
@ -65,6 +60,11 @@ init_generated_constants (void)
|
|||
setvar (cintern ("BLUE-LUT"), flocons (3), NIL);
|
||||
setvar (cintern ("ALPHA-LUT"), flocons (4), NIL);
|
||||
|
||||
setvar (cintern ("CHANNEL-OP-ADD"), flocons (0), NIL);
|
||||
setvar (cintern ("CHANNEL-OP-SUBTRACT"), flocons (1), NIL);
|
||||
setvar (cintern ("CHANNEL-OP-REPLACE"), flocons (2), NIL);
|
||||
setvar (cintern ("CHANNEL-OP-INTERSECT"), flocons (3), NIL);
|
||||
|
||||
setvar (cintern ("RED-CHANNEL"), flocons (0), NIL);
|
||||
setvar (cintern ("GREEN-CHANNEL"), flocons (1), NIL);
|
||||
setvar (cintern ("BLUE-CHANNEL"), flocons (2), NIL);
|
||||
|
|
|
@ -169,16 +169,6 @@ package Gimp::CodeGen::enums;
|
|||
VERTICAL => '1',
|
||||
UNKNOWN => '2' }
|
||||
},
|
||||
ChannelOps =>
|
||||
{ contig => 1,
|
||||
header => 'core/core-types.h',
|
||||
symbols => [ qw(CHANNEL_OP_ADD CHANNEL_OP_SUBTRACT
|
||||
CHANNEL_OP_REPLACE CHANNEL_OP_INTERSECT) ],
|
||||
mapping => { CHANNEL_OP_ADD => '0',
|
||||
CHANNEL_OP_SUBTRACT => '1',
|
||||
CHANNEL_OP_REPLACE => '2',
|
||||
CHANNEL_OP_INTERSECT => '3' }
|
||||
},
|
||||
GimpOffsetType =>
|
||||
{ contig => 1,
|
||||
header => 'core/core-types.h',
|
||||
|
@ -265,6 +255,16 @@ package Gimp::CodeGen::enums;
|
|||
GIMP_BG_BUCKET_FILL => '1',
|
||||
GIMP_PATTERN_BUCKET_FILL => '2' }
|
||||
},
|
||||
GimpChannelOps =>
|
||||
{ contig => 1,
|
||||
header => 'core/core-enums.h',
|
||||
symbols => [ qw(GIMP_CHANNEL_OP_ADD GIMP_CHANNEL_OP_SUBTRACT
|
||||
GIMP_CHANNEL_OP_REPLACE GIMP_CHANNEL_OP_INTERSECT) ],
|
||||
mapping => { GIMP_CHANNEL_OP_ADD => '0',
|
||||
GIMP_CHANNEL_OP_SUBTRACT => '1',
|
||||
GIMP_CHANNEL_OP_REPLACE => '2',
|
||||
GIMP_CHANNEL_OP_INTERSECT => '3' }
|
||||
},
|
||||
GimpConvertPaletteType =>
|
||||
{ contig => 1,
|
||||
header => 'core/core-enums.h',
|
||||
|
|
|
@ -25,7 +25,7 @@ sub channel_arg () {{
|
|||
|
||||
sub operation_arg () {{
|
||||
name => 'operation',
|
||||
type => 'enum ChannelOps',
|
||||
type => 'enum GimpChannelOps',
|
||||
desc => 'The selection operation: { %%desc%% }'
|
||||
}}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ sub channel_arg () {{
|
|||
|
||||
sub operation_arg () {{
|
||||
name => 'operation',
|
||||
type => 'enum ChannelOps',
|
||||
type => 'enum GimpChannelOps',
|
||||
desc => 'The selection operation: { %%desc%% }'
|
||||
}}
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ sub sample_merged_arg () {{
|
|||
|
||||
sub operation_arg () {{
|
||||
name => 'operation',
|
||||
type => 'enum ChannelOps',
|
||||
type => 'enum GimpChannelOps',
|
||||
desc => 'The selection operation: { %%desc%% }'
|
||||
}}
|
||||
|
||||
|
|
Loading…
Reference in New Issue