Commit 9d13b929 authored by Seth Burgess's avatar Seth Burgess
Browse files

And he said crop, and there was crop. It was a bit broken though.

	app/tools/crop.c app/tools/crop.h app/tools/Makefile.am
 	app/tools/tool.c app/tools/tools.c
parent a138eae7
......@@ -28,8 +28,8 @@ libapptools_la_SOURCES = \
gimpcolorpickertool.h \
## convolve.c \
## convolve.h \
## crop.c \
## crop.h \
crop.c \
crop.h \
## curves.c \
## curves.h \
## dodgeburn.c \
......
This diff is collapsed.
......@@ -19,15 +19,56 @@
#ifndef __CROP_H__
#define __CROP_H__
#include "gimpdrawtool.h"
#define GIMP_TYPE_CROP_TOOL (gimp_crop_tool_get_type ())
#define GIMP_CROP_TOOL(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_CROP_TOOL, GimpCropTool))
#define GIMP_IS_CROP_TOOL(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_CROP_TOOL))
#define GIMP_CROP_TOOL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_CROP_TOOL, GimpCropToolClass))
typedef struct _GimpCropTool GimpCropTool;
typedef struct _GimpCropToolClass GimpCropToolClass;
/* XXX Used? */
typedef enum
{
CROP_CROP,
RESIZE_CROP
} CropType;
struct _GimpCropTool
{
GimpDrawTool parent_instance;
/* DrawCore *core; */
gint startx; /* starting x coord */
gint starty; /* starting y coord */
gint lastx; /* previous x coord */
gint lasty; /* previous y coord */
gint x1, y1; /* upper left hand coordinate */
gint x2, y2; /* lower right hand coords */
void crop_draw (Tool *tool);
gint srw, srh; /* width and height of corners */
gint tx1, ty1; /* transformed coords */
gint tx2, ty2; /* */
guint function; /* moving or resizing */
guint context_id; /* for the statusbar */
};
struct _GimpCropToolClass
{
GimpToolClass parent_class;
};
void gimp_crop_tool_register (void);
/* Keep around for the PDB, temporarily */
void crop_image (GimpImage *gimage,
gint x1,
gint y1,
......@@ -36,8 +77,4 @@ void crop_image (GimpImage *gimage,
gboolean layer_only,
gboolean crop_layers);
Tool * tools_new_crop (void);
void tools_free_crop (Tool *tool);
#endif /* __CROP_H__ */
This diff is collapsed.
......@@ -19,15 +19,56 @@
#ifndef __CROP_H__
#define __CROP_H__
#include "gimpdrawtool.h"
#define GIMP_TYPE_CROP_TOOL (gimp_crop_tool_get_type ())
#define GIMP_CROP_TOOL(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_CROP_TOOL, GimpCropTool))
#define GIMP_IS_CROP_TOOL(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_CROP_TOOL))
#define GIMP_CROP_TOOL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_CROP_TOOL, GimpCropToolClass))
typedef struct _GimpCropTool GimpCropTool;
typedef struct _GimpCropToolClass GimpCropToolClass;
/* XXX Used? */
typedef enum
{
CROP_CROP,
RESIZE_CROP
} CropType;
struct _GimpCropTool
{
GimpDrawTool parent_instance;
/* DrawCore *core; */
gint startx; /* starting x coord */
gint starty; /* starting y coord */
gint lastx; /* previous x coord */
gint lasty; /* previous y coord */
gint x1, y1; /* upper left hand coordinate */
gint x2, y2; /* lower right hand coords */
void crop_draw (Tool *tool);
gint srw, srh; /* width and height of corners */
gint tx1, ty1; /* transformed coords */
gint tx2, ty2; /* */
guint function; /* moving or resizing */
guint context_id; /* for the statusbar */
};
struct _GimpCropToolClass
{
GimpToolClass parent_class;
};
void gimp_crop_tool_register (void);
/* Keep around for the PDB, temporarily */
void crop_image (GimpImage *gimage,
gint x1,
gint y1,
......@@ -36,8 +77,4 @@ void crop_image (GimpImage *gimage,
gboolean layer_only,
gboolean crop_layers);
Tool * tools_new_crop (void);
void tools_free_crop (Tool *tool);
#endif /* __CROP_H__ */
......@@ -531,7 +531,6 @@ STUB(paths_dialog_import_path_callback)
STUB(paths_dialog_export_path_callback)
STUB(paths_dialog_edit_path_attributes_callback)
QUIET_STUB(GIMP_IS_FUZZY_SELECT)
STUB(crop_image)
STUB(dodgeburn_non_gui)
STUB(dodgeburn_non_gui_default)
STUB(ellipse_select)
......
......@@ -531,7 +531,6 @@ STUB(paths_dialog_import_path_callback)
STUB(paths_dialog_export_path_callback)
STUB(paths_dialog_edit_path_attributes_callback)
QUIET_STUB(GIMP_IS_FUZZY_SELECT)
STUB(crop_image)
STUB(dodgeburn_non_gui)
STUB(dodgeburn_non_gui_default)
STUB(ellipse_select)
......
......@@ -62,6 +62,7 @@ register_tools (void)
gimp_paintbrush_tool_register ();
gimp_bucket_fill_tool_register ();
gimp_measure_tool_register ();
gimp_crop_tool_register ();
gimp_color_picker_tool_register ();
gimp_text_tool_register ();
gimp_move_tool_register ();
......
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