Commit 7cb07a90 authored by Manish Singh's avatar Manish Singh
Browse files

add sample_colorize and curve_bend defs

* plug-ins/common/plugin-defs.pl: add sample_colorize and
curve_bend defs

* libgimp/color_selector.h: minor consistency cleanup

* libgimp/gimpchainbutton.[ch]: use new style gtk object helper macros

* libgimp/gimpfileselection.c
* libgimp/gimpmatrix.h: minor cleanup

* libgimp/gimpintl.h: resync with gnome-i18n.h


* libgimp/color_display.h
* app/gimp.sym
* app/gdisplay_color.[ch]
* app/app_procs.c
* app/gdisplay.h
* app/image_render.c: color display transformation code. Still
unfinished, so it's not activated yet.

* app/buildmenu.h: remove unused defines (PULLDOWN, POPUP, OPTION)

* app/colormaps.[ch]
* app/image_render.c: remove vestigal dithering stuff

* app/convolve.h
* app/gimpdrawable.h
* app/gimpimage.h
* app/lut_funcs.h
* app/paint_funcs.h
* app/plug_in.h: enum nick changes from Marc

* app/channel_ops.c
* app/crop.c
* app/gdisplay.c
* app/gimpimage.[ch]
* app/move.c: s/([A-Z]+)_GUIDE/ORIENTATION_$1/

* app/flip_tool.[ch]
* app/shear_tool.[ch]: use ORIENTATION_* constants instead of our own

* app/disp_callbacks.c: remove HORIZONTAL and VERTICAL #defines

* app/general.h: enumified TOKEN_* symbols

* app/lc_dialog.c
* app/paint_funcs.c: remove unused variables

* tools/pdbgen/lib.pl: autogen gimpenums.h (unfinished)

* tools/pdbgen/stddefs.pdb: new std_orientation_enum, remove
layer_mode shortcut since we've skipped it in app/

* tools/pdbgen/pdb/brush_select.pdb
* tools/pdbgen/pdb/brushes.pdb
* tools/pdbgen/pdb/drawable.pdb
* tools/pdbgen/pdb/gimage.pdb
* tools/pdbgen/pdb/guides.pdb
* tools/pdbgen/pdb/layer.pdb
* tools/pdbgen/pdb/tools.pdb: reflect above enum changes, whitespace
cleanups

* tools/pdbgen/enums.pl
* app/brush_select_cmds.c
* app/brushes_cmds.c
* app/color_cmds.c
* app/drawable_cmds.c
* app/gimage_cmds.c
* app/layer_cmds.c
* app/procedural_db_cmds.c
* app/tools_cmds.c: reflect pdb and enum nick changes above

-Yosh
parent 8b0cef83
Wed Jul 28 15:03:28 PDT 1999 Manish Singh <yosh@gimp.org>
* plug-ins/common/plugin-defs.pl: add sample_colorize and
curve_bend defs
* libgimp/color_selector.h: minor consistency cleanup
* libgimp/gimpchainbutton.[ch]: use new style gtk object helper macros
* libgimp/gimpfileselection.c
* libgimp/gimpmatrix.h: minor cleanup
* libgimp/gimpintl.h: resync with gnome-i18n.h
* libgimp/color_display.h
* app/gimp.sym
* app/gdisplay_color.[ch]
* app/app_procs.c
* app/gdisplay.h
* app/image_render.c: color display transformation code. Still
unfinished, so it's not activated yet.
* app/buildmenu.h: remove unused defines (PULLDOWN, POPUP, OPTION)
* app/colormaps.[ch]
* app/image_render.c: remove vestigal dithering stuff
* app/convolve.h
* app/gimpdrawable.h
* app/gimpimage.h
* app/lut_funcs.h
* app/paint_funcs.h
* app/plug_in.h: enum nick changes from Marc
* app/channel_ops.c
* app/crop.c
* app/gdisplay.c
* app/gimpimage.[ch]
* app/move.c: s/([A-Z]+)_GUIDE/ORIENTATION_$1/
* app/flip_tool.[ch]
* app/shear_tool.[ch]: use ORIENTATION_* constants instead of our own
* app/disp_callbacks.c: remove HORIZONTAL and VERTICAL #defines
* app/general.h: enumified TOKEN_* symbols
* app/lc_dialog.c
* app/paint_funcs.c: remove unused variables
* tools/pdbgen/lib.pl: autogen gimpenums.h (unfinished)
* tools/pdbgen/stddefs.pdb: new std_orientation_enum, remove
layer_mode shortcut since we've skipped it in app/
* tools/pdbgen/pdb/brush_select.pdb
* tools/pdbgen/pdb/brushes.pdb
* tools/pdbgen/pdb/drawable.pdb
* tools/pdbgen/pdb/gimage.pdb
* tools/pdbgen/pdb/guides.pdb
* tools/pdbgen/pdb/layer.pdb
* tools/pdbgen/pdb/tools.pdb: reflect above enum changes, whitespace
cleanups
* tools/pdbgen/enums.pl
* app/brush_select_cmds.c
* app/brushes_cmds.c
* app/color_cmds.c
* app/drawable_cmds.c
* app/gimage_cmds.c
* app/layer_cmds.c
* app/procedural_db_cmds.c
* app/tools_cmds.c: reflect pdb and enum nick changes above
Wed Jul 28 21:32:52 1999 ape@gandalf.spacetec.no (Asbjorn Pettersen)
* libgimp/gimpenv.c (gimp_data_directory): Add __XOS2RedirRoot() for
......
......@@ -168,6 +168,8 @@ gimp_SOURCES = \
gdisplay.h \
gdisplayP.h \
gdisplayF.h \
gdisplay_color.c \
gdisplay_color.h \
gdisplay_cmds.c \
gdisplay_ops.c \
gdisplay_ops.h \
......@@ -317,6 +319,7 @@ gimp_SOURCES = \
pixel_processor.h \
pixel_region.c \
pixel_region.h \
pixel_regionP.h \
pixmaps.h \
pixmaps2.h \
plug_in.c \
......
......@@ -48,6 +48,7 @@
#include "curves.h"
#include "devices.h"
#include "gdisplay.h"
#include "gdisplay_color.h"
#include "gdisplay_ops.h"
#include "colormaps.h"
#include "context_manager.h"
......@@ -491,6 +492,8 @@ app_init (void)
RESET_BAR();
internal_procs_init ();
gdisplay_color_init ();
RESET_BAR();
parse_buffers_init ();
parse_unitrc (); /* this needs to be done before gimprc loading */
......@@ -669,7 +672,7 @@ app_exit_finish (void)
save_sessionrc ();
}
/* gtk_exit (0); */
/* gtk_exit (0); */
gtk_main_quit();
}
......
......@@ -22,9 +22,9 @@
#include "gimplutF.h"
#include "gimphistogramF.h"
typedef enum /*< chop=_LUT >*/
typedef enum
{
VALUE_LUT, /*< nick=VALUE/GRAY >*/
VALUE_LUT,
RED_LUT,
GREEN_LUT,
BLUE_LUT,
......
......@@ -142,7 +142,7 @@ static ProcArg brushes_popup_inargs[] =
{
PDB_INT32,
"paint_mode",
"The initial paint mode: { NORMAL (0), DISSOLVE (1), BEHIND (2), MULTIPLY/BURN (3), SCREEN (4), OVERLAY (5), DIFFERENCE (6), ADDITION (7), SUBTRACT (8), DARKEN_ONLY (9), LIGHTEN_ONLY (10), HUE (11), SATURATION (12), COLOR (13), VALUE (14), DIVIDE/DODGE (15) }"
"The initial paint mode: { NORMAL_MODE (0), DISSOLVE_MODE (1), BEHIND_MODE (2), MULTIPLY_MODE (3), SCREEN_MODE (4), OVERLAY_MODE (5), DIFFERENCE_MODE (6), ADDITION_MODE (7), SUBTRACT_MODE (8), DARKEN_ONLY_MODE (9), LIGHTEN_ONLY_MODE (10), HUE_MODE (11), SATURATION_MODE (12), COLOR_MODE (13), VALUE_MODE (14), DIVIDE_MODE (15) }"
}
};
......@@ -315,7 +315,7 @@ static ProcArg brushes_set_popup_inargs[] =
{
PDB_INT32,
"paint_mode",
"The initial paint mode: { NORMAL (0), DISSOLVE (1), BEHIND (2), MULTIPLY/BURN (3), SCREEN (4), OVERLAY (5), DIFFERENCE (6), ADDITION (7), SUBTRACT (8), DARKEN_ONLY (9), LIGHTEN_ONLY (10), HUE (11), SATURATION (12), COLOR (13), VALUE (14), DIVIDE/DODGE (15) }"
"The initial paint mode: { NORMAL_MODE (0), DISSOLVE_MODE (1), BEHIND_MODE (2), MULTIPLY_MODE (3), SCREEN_MODE (4), OVERLAY_MODE (5), DIFFERENCE_MODE (6), ADDITION_MODE (7), SUBTRACT_MODE (8), DARKEN_ONLY_MODE (9), LIGHTEN_ONLY_MODE (10), HUE_MODE (11), SATURATION_MODE (12), COLOR_MODE (13), VALUE_MODE (14), DIVIDE_MODE (15) }"
}
};
......
......@@ -368,7 +368,7 @@ static ProcArg brushes_get_paint_mode_outargs[] =
{
PDB_INT32,
"paint_mode",
"The paint mode: { NORMAL (0), DISSOLVE (1), BEHIND (2), MULTIPLY/BURN (3), SCREEN (4), OVERLAY (5), DIFFERENCE (6), ADDITION (7), SUBTRACT (8), DARKEN_ONLY (9), LIGHTEN_ONLY (10), HUE (11), SATURATION (12), COLOR (13), VALUE (14), DIVIDE/DODGE (15) }"
"The paint mode: { NORMAL_MODE (0), DISSOLVE_MODE (1), BEHIND_MODE (2), MULTIPLY_MODE (3), SCREEN_MODE (4), OVERLAY_MODE (5), DIFFERENCE_MODE (6), ADDITION_MODE (7), SUBTRACT_MODE (8), DARKEN_ONLY_MODE (9), LIGHTEN_ONLY_MODE (10), HUE_MODE (11), SATURATION_MODE (12), COLOR_MODE (13), VALUE_MODE (14), DIVIDE_MODE (15) }"
}
};
......@@ -409,7 +409,7 @@ static ProcArg brushes_set_paint_mode_inargs[] =
{
PDB_INT32,
"paint_mode",
"The paint mode: { NORMAL (0), DISSOLVE (1), BEHIND (2), MULTIPLY/BURN (3), SCREEN (4), OVERLAY (5), DIFFERENCE (6), ADDITION (7), SUBTRACT (8), DARKEN_ONLY (9), LIGHTEN_ONLY (10), HUE (11), SATURATION (12), COLOR (13), VALUE (14), DIVIDE/DODGE (15) }"
"The paint mode: { NORMAL_MODE (0), DISSOLVE_MODE (1), BEHIND_MODE (2), MULTIPLY_MODE (3), SCREEN_MODE (4), OVERLAY_MODE (5), DIFFERENCE_MODE (6), ADDITION_MODE (7), SUBTRACT_MODE (8), DARKEN_ONLY_MODE (9), LIGHTEN_ONLY_MODE (10), HUE_MODE (11), SATURATION_MODE (12), COLOR_MODE (13), VALUE_MODE (14), DIVIDE_MODE (15) }"
}
};
......@@ -581,7 +581,7 @@ static ProcArg brushes_get_brush_data_outargs[] =
{
PDB_INT32,
"paint_mode",
"The paint mode: { NORMAL (0), DISSOLVE (1), BEHIND (2), MULTIPLY/BURN (3), SCREEN (4), OVERLAY (5), DIFFERENCE (6), ADDITION (7), SUBTRACT (8), DARKEN_ONLY (9), LIGHTEN_ONLY (10), HUE (11), SATURATION (12), COLOR (13), VALUE (14), DIVIDE/DODGE (15) }"
"The paint mode: { NORMAL_MODE (0), DISSOLVE_MODE (1), BEHIND_MODE (2), MULTIPLY_MODE (3), SCREEN_MODE (4), OVERLAY_MODE (5), DIFFERENCE_MODE (6), ADDITION_MODE (7), SUBTRACT_MODE (8), DARKEN_ONLY_MODE (9), LIGHTEN_ONLY_MODE (10), HUE_MODE (11), SATURATION_MODE (12), COLOR_MODE (13), VALUE_MODE (14), DIVIDE_MODE (15) }"
},
{
PDB_INT32,
......
......@@ -20,10 +20,6 @@
#include <gtk/gtk.h>
#define PULLDOWN 0
#define POPUP 1
#define OPTION 2
/* Structures */
typedef struct _MenuItem MenuItem;
......
......@@ -709,11 +709,11 @@ duplicate (GimpImage *gimage)
switch (guide->orientation)
{
case HORIZONTAL_GUIDE:
case ORIENTATION_HORIZONTAL:
new_guide = gimp_image_add_hguide(new_gimage);
new_guide->position = guide->position;
break;
case VERTICAL_GUIDE:
case ORIENTATION_VERTICAL:
new_guide = gimp_image_add_vguide(new_gimage);
new_guide->position = guide->position;
break;
......
......@@ -262,7 +262,7 @@ static ProcArg levels_inargs[] =
{
PDB_INT32,
"channel",
"The channel to modify: { VALUE/GRAY (0), RED (1), GREEN (2), BLUE (3) }"
"The channel to modify: { VALUE_LUT (0), RED_LUT (1), GREEN_LUT (2), BLUE_LUT (3) }"
},
{
PDB_INT32,
......@@ -621,7 +621,7 @@ static ProcArg curves_spline_inargs[] =
{
PDB_INT32,
"channel",
"The channel to modify: { VALUE/GRAY (0), RED (1), GREEN (2), BLUE (3), ALPHA (4) }"
"The channel to modify: { VALUE_LUT (0), RED_LUT (1), GREEN_LUT (2), BLUE_LUT (3), ALPHA_LUT (4) }"
},
{
PDB_INT32,
......@@ -729,7 +729,7 @@ static ProcArg curves_explicit_inargs[] =
{
PDB_INT32,
"channel",
"The channel to modify: { VALUE/GRAY (0), RED (1), GREEN (2), BLUE (3), ALPHA (4) }"
"The channel to modify: { VALUE_LUT (0), RED_LUT (1), GREEN_LUT (2), BLUE_LUT (3), ALPHA_LUT (4) }"
},
{
PDB_INT32,
......@@ -988,7 +988,7 @@ static ProcArg histogram_inargs[] =
{
PDB_INT32,
"channel",
"The channel to modify: { VALUE/GRAY (0), RED (1), GREEN (2), BLUE (3), ALPHA (4) }"
"The channel to modify: { VALUE_LUT (0), RED_LUT (1), GREEN_LUT (2), BLUE_LUT (3), ALPHA_LUT (4) }"
},
{
PDB_INT32,
......
......@@ -50,21 +50,6 @@ gulong new_color_pixel;
gulong marching_ants_pixels[8];
GtkDitherInfo *red_ordered_dither;
GtkDitherInfo *green_ordered_dither;
GtkDitherInfo *blue_ordered_dither;
GtkDitherInfo *gray_ordered_dither;
guchar ***ordered_dither_matrix;
/* These arrays are calculated for quick 24 bit to 16 color conversions */
gulong *g_lookup_red;
gulong *g_lookup_green;
gulong *g_lookup_blue;
gulong *color_pixel_vals;
gulong *gray_pixel_vals;
static void make_color (gulong *pixel_ptr,
int red,
int green,
......@@ -154,22 +139,6 @@ get_standard_colormaps ()
g_visual = info->visual;
g_cmap = info->cmap;
#if 0
color_pixel_vals = info->color_pixels;
gray_pixel_vals = info->gray_pixels;
reserved_pixels = info->reserved_pixels;
red_ordered_dither = info->dither_red;
green_ordered_dither = info->dither_green;
blue_ordered_dither = info->dither_blue;
gray_ordered_dither = info->dither_gray;
ordered_dither_matrix = info->dither_matrix;
g_lookup_red = info->lookup_red;
g_lookup_green = info->lookup_green;
g_lookup_blue = info->lookup_blue;
#endif
set_app_colors ();
}
......@@ -20,12 +20,6 @@
#include "gimage.h" /* For the image types */
/* This is a macro for arranging the red, green, and blue components into
* a value acceptable to the target X server
*/
#define COLOR_COMPOSE(r,g,b) (lookup_red [r] | lookup_green [g] | lookup_blue [b])
extern GdkVisual *g_visual;
extern GdkColormap *g_cmap;
......@@ -48,20 +42,6 @@ extern gulong new_color_pixel;
/* Colormap entries reserved for color cycled marching ants--optional */
extern gulong marching_ants_pixels[8];
extern GtkDitherInfo *red_ordered_dither;
extern GtkDitherInfo *green_ordered_dither;
extern GtkDitherInfo *blue_ordered_dither;
extern GtkDitherInfo *gray_ordered_dither;
extern guchar ***ordered_dither_matrix;
extern gulong *g_lookup_red;
extern gulong *g_lookup_green;
extern gulong *g_lookup_blue;
extern gulong *color_pixel_vals;
extern gulong *gray_pixel_vals;
gulong get_color (int red, int green, int blue);
void store_color (gulong *pixel, int red, int green, int blue);
void get_standard_colormaps (void);
......
......@@ -21,7 +21,7 @@
#include "paint_core.h"
#include "tools.h"
typedef enum /*< chop=_CONVOLVE >*/
typedef enum
{
BLUR_CONVOLVE,
SHARPEN_CONVOLVE,
......
......@@ -709,11 +709,11 @@ duplicate (GimpImage *gimage)
switch (guide->orientation)
{
case HORIZONTAL_GUIDE:
case ORIENTATION_HORIZONTAL:
new_guide = gimp_image_add_hguide(new_gimage);
new_guide->position = guide->position;
break;
case VERTICAL_GUIDE:
case ORIENTATION_VERTICAL:
new_guide = gimp_image_add_vguide(new_gimage);
new_guide->position = guide->position;
break;
......
......@@ -33,11 +33,11 @@ GtkType gimp_drawable_get_type (void);
typedef enum
{
FOREGROUND_FILL,
BACKGROUND_FILL,
WHITE_FILL,
TRANSPARENT_FILL,
NO_FILL
FOREGROUND_FILL, /*< nick=FG_IMAGE_FILL >*/
BACKGROUND_FILL, /*< nick=BG_IMAGE_FILL >*/
WHITE_FILL, /*< nick=WHITE_IMAGE_FILL >*/
TRANSPARENT_FILL, /*< nick=TRANS_IMAGE_FILL >*/
NO_FILL /*< nick=NO_IMAGE_FILL >*/
} GimpFillType;
......
......@@ -709,11 +709,11 @@ duplicate (GimpImage *gimage)
switch (guide->orientation)
{
case HORIZONTAL_GUIDE:
case ORIENTATION_HORIZONTAL:
new_guide = gimp_image_add_hguide(new_gimage);
new_guide->position = guide->position;
break;
case VERTICAL_GUIDE:
case ORIENTATION_VERTICAL:
new_guide = gimp_image_add_vguide(new_gimage);
new_guide->position = guide->position;
break;
......
......@@ -428,12 +428,12 @@ gimp_image_resize (GimpImage *gimage,
switch (guide->orientation)
{
case HORIZONTAL_GUIDE:
case ORIENTATION_HORIZONTAL:
guide->position += offset_y;
if (guide->position < 0 || guide->position > new_height)
gimp_image_delete_guide (gimage, guide);
break;
case VERTICAL_GUIDE:
case ORIENTATION_VERTICAL:
guide->position += offset_x;
if (guide->position < 0 || guide->position > new_width)
gimp_image_delete_guide (gimage, guide);
......@@ -537,10 +537,10 @@ gimp_image_scale (GimpImage *gimage,
switch (guide->orientation)
{
case HORIZONTAL_GUIDE:
case ORIENTATION_HORIZONTAL:
guide->position = (guide->position * new_height) / old_height;
break;
case VERTICAL_GUIDE:
case ORIENTATION_VERTICAL:
guide->position = (guide->position * new_width) / old_width;
break;
default:
......@@ -987,7 +987,7 @@ gimp_image_add_hguide (GimpImage *gimage)
guide->ref_count = 0;
guide->position = -1;
guide->guide_ID = next_guide_id++;
guide->orientation = HORIZONTAL_GUIDE;
guide->orientation = ORIENTATION_HORIZONTAL;
gimage->guides = g_list_prepend (gimage->guides, guide);
......@@ -1003,7 +1003,7 @@ gimp_image_add_vguide (GimpImage *gimage)
guide->ref_count = 0;
guide->position = -1;
guide->guide_ID = next_guide_id++;
guide->orientation = VERTICAL_GUIDE;
guide->orientation = ORIENTATION_VERTICAL;
gimage->guides = g_list_prepend (gimage->guides, guide);
......
......@@ -24,14 +24,14 @@
/* the image types */
typedef enum /*< chop=_GIMAGE >*/
typedef enum
{
RGB_GIMAGE,
RGBA_GIMAGE,
GRAY_GIMAGE,
GRAYA_GIMAGE,
INDEXED_GIMAGE,
INDEXEDA_GIMAGE
RGB_GIMAGE, /*< nick=RGB_IMAGE >*/
RGBA_GIMAGE, /*< nick=RGBA_IMAGE >*/
GRAY_GIMAGE, /*< nick=GRAY_IMAGE >*/
GRAYA_GIMAGE, /*< nick=GRAYA_IMAGE >*/
INDEXED_GIMAGE, /*< nick=INDEXED_IMAGE >*/
INDEXEDA_GIMAGE /*< nick=INDEXEDA_IMAGE >*/
} GimpImageType;
......@@ -57,10 +57,11 @@ typedef enum
#define COLORMAP_SIZE 768
typedef enum { /*< chop=_GUIDE >*/
HORIZONTAL_GUIDE = 1,
VERTICAL_GUIDE
} GuideOrientation;
typedef enum { /*< chop=ORIENTATION_ >*/
ORIENTATION_UNKNOWN,
ORIENTATION_HORIZONTAL,
ORIENTATION_VERTICAL
} OrientationType;
typedef enum
{
......
......@@ -428,12 +428,12 @@ gimp_image_resize (GimpImage *gimage,
switch (guide->orientation)
{
case HORIZONTAL_GUIDE:
case ORIENTATION_HORIZONTAL:
guide->position += offset_y;
if (guide->position < 0 || guide->position > new_height)
gimp_image_delete_guide (gimage, guide);
break;
case VERTICAL_GUIDE:
case ORIENTATION_VERTICAL:
guide->position += offset_x;
if (guide->position < 0 || guide->position > new_width)
gimp_image_delete_guide (gimage, guide);
......@@ -537,10 +537,10 @@ gimp_image_scale (GimpImage *gimage,
switch (guide->orientation)
{
case HORIZONTAL_GUIDE:
case ORIENTATION_HORIZONTAL:
guide->position = (guide->position * new_height) / old_height;
break;
case VERTICAL_GUIDE:
case ORIENTATION_VERTICAL:
guide->position = (guide->position * new_width) / old_width;
break;
default:
......@@ -987,7 +987,7 @@ gimp_image_add_hguide (GimpImage *gimage)
guide->ref_count = 0;
guide->position = -1;
guide->guide_ID = next_guide_id++;
guide->orientation = HORIZONTAL_GUIDE;
guide->orientation = ORIENTATION_HORIZONTAL;
gimage->guides = g_list_prepend (gimage->guides, guide);
......@@ -1003,7 +1003,7 @@ gimp_image_add_vguide (GimpImage *gimage)
guide->ref_count = 0;
guide->position = -1;
guide->guide_ID = next_guide_id++;
guide->orientation = VERTICAL_GUIDE;
guide->orientation = ORIENTATION_VERTICAL;
gimage->guides = g_list_prepend (gimage->guides, guide);
......
......@@ -24,14 +24,14 @@
/* the image types */
typedef enum /*< chop=_GIMAGE >*/
typedef enum
{
RGB_GIMAGE,
RGBA_GIMAGE,
GRAY_GIMAGE,
GRAYA_GIMAGE,
INDEXED_GIMAGE,
INDEXEDA_GIMAGE
RGB_GIMAGE, /*< nick=RGB_IMAGE >*/
RGBA_GIMAGE, /*< nick=RGBA_IMAGE >*/
GRAY_GIMAGE, /*< nick=GRAY_IMAGE >*/
GRAYA_GIMAGE, /*< nick=GRAYA_IMAGE >*/
INDEXED_GIMAGE, /*< nick=INDEXED_IMAGE >*/
INDEXEDA_GIMAGE /*< nick=INDEXEDA_IMAGE >*/
} GimpImageType;
......@@ -57,10 +57,11 @@ typedef enum
#define COLORMAP_SIZE 768
typedef enum { /*< chop=_GUIDE >*/
HORIZONTAL_GUIDE = 1,
VERTICAL_GUIDE
} GuideOrientation;
typedef enum { /*< chop=ORIENTATION_ >*/
ORIENTATION_UNKNOWN,
ORIENTATION_HORIZONTAL,
ORIENTATION_VERTICAL
} OrientationType;
typedef enum
{
......
......@@ -428,12 +428,12 @@ gimp_image_resize (GimpImage *gimage,
switch (guide->orientation)
{
case HORIZONTAL_GUIDE:
case ORIENTATION_HORIZONTAL:
guide->position += offset_y;
if (guide->position < 0 || guide->position > new_height)
gimp_image_delete_guide (gimage, guide);
break;
case VERTICAL_GUIDE:
case ORIENTATION_VERTICAL:
guide->position += offset_x;
if (guide->position < 0 || guide->position > new_width)
gimp_image_delete_guide (gimage, guide);
......@@ -537,10 +537,10 @@ gimp_image_scale (GimpImage *gimage,
switch (guide->orientation)
{
case HORIZONTAL_GUIDE:
case ORIENTATION_HORIZONTAL:
guide->position = (guide->position * new_height) / old_height;
break;
case VERTICAL_GUIDE:
case ORIENTATION_VERTICAL:
guide->position = (guide->position * new_width) / old_width;
break;
default:
......@@ -987,7 +987,7 @@ gimp_image_add_hguide (GimpImage *gimage)
guide->ref_count = 0;
guide->position = -1;
guide->guide_ID = next_guide_id++;
guide->orientation = HORIZONTAL_GUIDE;
guide->orientation = ORIENTATION_HORIZONTAL;
gimage->guides = g_list_prepend (gimage->guides, guide);
......@@ -1003,7 +1003,7 @@ gimp_image_add_vguide (GimpImage *gimage)
guide->ref_count = 0;
guide->position = -1;
guide->guide_ID = next_guide_id++;
guide->orientation = VERTICAL_GUIDE;
guide->orientation = ORIENTATION_VERTICAL;
gimage->guides = g_list_prepend (gimage->guides, guide);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment