mirror of https://github.com/GNOME/gimp.git
empty gobject for GimpCage (data structure), GimpOperationCage (Gegl op) and GimpCageTool (frontend)
This commit is contained in:
parent
1ab08ade9f
commit
24652b4fbd
|
@ -72,6 +72,8 @@ libappcore_a_sources = \
|
|||
gimpbrushpipe-load.h \
|
||||
gimpbuffer.c \
|
||||
gimpbuffer.h \
|
||||
gimpcage.c \
|
||||
gimpcage.h \
|
||||
gimpchannel.c \
|
||||
gimpchannel.h \
|
||||
gimpchannel-combine.c \
|
||||
|
|
|
@ -102,6 +102,7 @@ typedef struct _GimpBrush GimpBrush;
|
|||
typedef struct _GimpBrushClipboard GimpBrushClipboard;
|
||||
typedef struct _GimpBrushGenerated GimpBrushGenerated;
|
||||
typedef struct _GimpBrushPipe GimpBrushPipe;
|
||||
typedef struct _GimpCage GimpCage;
|
||||
typedef struct _GimpCurve GimpCurve;
|
||||
typedef struct _GimpDynamics GimpDynamics;
|
||||
typedef struct _GimpDynamicsOutput GimpDynamicsOutput;
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
* Copyright (C) 1999 Adrian Likins and Tor Lillqvist
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "gimpcage.h"
|
||||
|
||||
#include "core-types.h"
|
||||
|
||||
|
||||
static void
|
||||
gimp_cage_class_init (GimpCageClass *klass)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_cage_init (GimpCage *self)
|
||||
{
|
||||
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattisbvf
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GIMP_CAGE_H__
|
||||
#define __GIMP_CAGE_H__
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
#define GIMP_TYPE_CAGE (gimp_cage_get_type ())
|
||||
#define GIMP_CAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_CAGE, GimpCage))
|
||||
#define GIMP_CAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_CAGE, GimpCageClass))
|
||||
#define GIMP_IS_CAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_CAGE))
|
||||
#define GIMP_IS_CAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_CAGE))
|
||||
#define GIMP_CAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_CAGE, GimpCageClass))
|
||||
|
||||
|
||||
typedef struct _GimpCageClass GimpCageClass;
|
||||
|
||||
struct _GimpCage
|
||||
{
|
||||
GObject parent_instance;
|
||||
|
||||
gint cageVerticeNumber;
|
||||
gfloat *cageVerticeX;
|
||||
gfloat *cageVerticeY;
|
||||
|
||||
gint pointNumber;
|
||||
gfloat **CoordsVerticeX;
|
||||
gfloat **CoordsVerticeY;
|
||||
gfloat **CoordsEdgeX;
|
||||
gfloat **CoordsEdgeY;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct _GimpCageClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
};
|
||||
|
||||
GType gimp_cage_get_type (void) G_GNUC_CONST;
|
||||
|
||||
|
||||
#endif /* __GIMP_CAGE_H__ */
|
|
@ -58,6 +58,7 @@ OBJECTS = \
|
|||
gimpbrushpipe-load.obj \
|
||||
gimpbrushpipe.obj \
|
||||
gimpbuffer.obj \
|
||||
gimpcage.obj \
|
||||
gimpchannel-combine.obj \
|
||||
gimpchannel-select.obj \
|
||||
gimpchannel.obj \
|
||||
|
|
|
@ -51,6 +51,9 @@ libappgegl_a_SOURCES = \
|
|||
gimpoperationcolorbalance.h \
|
||||
gimpoperationcolorize.c \
|
||||
gimpoperationcolorize.h \
|
||||
##right place ?
|
||||
gimpoperationcage.h \
|
||||
gimpoperationcage.c \
|
||||
gimpoperationcurves.c \
|
||||
gimpoperationcurves.h \
|
||||
gimpoperationdesaturate.c \
|
||||
|
|
|
@ -31,6 +31,7 @@ typedef struct _GimpOperationTileSource GimpOperationTileSource;
|
|||
typedef struct _GimpOperationPointFilter GimpOperationPointFilter;
|
||||
typedef struct _GimpOperationColorBalance GimpOperationColorBalance;
|
||||
typedef struct _GimpOperationColorize GimpOperationColorize;
|
||||
typedef struct _GimpOperationCage GimpOperationCage;
|
||||
typedef struct _GimpOperationCurves GimpOperationCurves;
|
||||
typedef struct _GimpOperationDesaturate GimpOperationDesaturate;
|
||||
typedef struct _GimpOperationHueSaturation GimpOperationHueSaturation;
|
||||
|
|
|
@ -0,0 +1,66 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationcage.c
|
||||
* Copyright (C) 2010 Michael Muré <batolettre@gmail.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
|
||||
#include "libgimpcolor/gimpcolor.h"
|
||||
#include "libgimpmath/gimpmath.h"
|
||||
|
||||
#include "gimp-gegl-types.h"
|
||||
|
||||
#include "core/gimpcage.h"
|
||||
|
||||
#include "gimpoperationcage.h"
|
||||
|
||||
|
||||
static gboolean gimp_operation_cage_process (GeglOperation *operation,
|
||||
void *in_buf,
|
||||
void *out_buf,
|
||||
glong samples,
|
||||
const GeglRectangle *roi);
|
||||
|
||||
G_DEFINE_TYPE (GimpOperationCage, gimp_operation_cage,
|
||||
GEGL_TYPE_OPERATION_FILTER)
|
||||
|
||||
#define parent_class gimp_operation_cage_parent_class
|
||||
|
||||
|
||||
static void
|
||||
gimp_operation_cage_class_init (GimpOperationCageClass *klass)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_operation_cage_init (GimpOperationCage *self)
|
||||
{
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gimp_operation_cage_process (GeglOperation *operation,
|
||||
void *in_buf,
|
||||
void *out_buf,
|
||||
glong samples,
|
||||
const GeglRectangle *roi)
|
||||
{
|
||||
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationcage.h
|
||||
* Copyright (C) 2010 Michael Muré <batolettre@gmail.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GIMP_OPERATION_CAGE_H__
|
||||
#define __GIMP_OPERATION_CAGE_H__
|
||||
|
||||
#include <gegl-plugin.h>
|
||||
#include <operation/gegl-operation-filter.h>
|
||||
|
||||
#define GIMP_TYPE_OPERATION_CAGE (gimp_operation_cage_get_type ())
|
||||
#define GIMP_OPERATION_CAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_CAGE, GimpOperationCage))
|
||||
#define GIMP_OPERATION_CAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_CAGE, GimpOperationCageClass))
|
||||
#define GIMP_IS_OPERATION_CAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_CAGE))
|
||||
#define GIMP_IS_OPERATION_CAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_CAGE))
|
||||
#define GIMP_OPERATION_CAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_CAGE, GimpOperationCageClass))
|
||||
|
||||
|
||||
typedef struct _GimpOperationCageClass GimpOperationCageClass;
|
||||
|
||||
struct _GimpOperationCage
|
||||
{
|
||||
GeglOperationFilter parent_instance;
|
||||
};
|
||||
|
||||
struct _GimpOperationCageClass
|
||||
{
|
||||
GeglOperationFilter parent_class;
|
||||
};
|
||||
|
||||
|
||||
GType gimp_operation_cage_get_type (void) G_GNUC_CONST;
|
||||
|
||||
|
||||
#endif /* __GIMP_OPERATION_CAGE_H__ */
|
|
@ -36,6 +36,7 @@ OBJECTS = \
|
|||
gimphuesaturationconfig.obj \
|
||||
gimplevelsconfig.obj \
|
||||
gimpoperationcolorbalance.obj \
|
||||
gimpoperationcage.obj \
|
||||
gimpoperationcurves.obj \
|
||||
gimpoperationhuesaturation.obj \
|
||||
gimpoperationlevels.obj \
|
||||
|
|
|
@ -42,6 +42,8 @@ libapptools_a_sources = \
|
|||
gimpbucketfilltool.h \
|
||||
gimpbycolorselecttool.c \
|
||||
gimpbycolorselecttool.h \
|
||||
gimpcagetool.c \
|
||||
gimpcagetool.h \
|
||||
gimpclonetool.c \
|
||||
gimpclonetool.h \
|
||||
gimpcoloroptions.c \
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
#include "gimpbrightnesscontrasttool.h"
|
||||
#include "gimpbucketfilltool.h"
|
||||
#include "gimpbycolorselecttool.h"
|
||||
#include "gimpcagetool.h"
|
||||
#include "gimpclonetool.h"
|
||||
#include "gimpcolorbalancetool.h"
|
||||
#include "gimpcolorizetool.h"
|
||||
|
@ -153,6 +154,7 @@ gimp_tools_init (Gimp *gimp)
|
|||
gimp_crop_tool_register,
|
||||
gimp_align_tool_register,
|
||||
gimp_move_tool_register,
|
||||
gimp_cage_tool_register,
|
||||
|
||||
/* non-modifying tools */
|
||||
|
||||
|
|
|
@ -0,0 +1,79 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995-2001 Spencer Kimball, Peter Mattis, and others
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
|
||||
#include "libgimpmath/gimpmath.h"
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "tools-types.h"
|
||||
|
||||
#include "core/gimp-transform-utils.h"
|
||||
|
||||
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
|
||||
|
||||
|
||||
#include "gimpcagetool.h"
|
||||
|
||||
#include "gimptransformoptions.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpCageTool, gimp_cage_tool, GIMP_TYPE_TRANSFORM_TOOL)
|
||||
|
||||
#define parent_class gimp_cage_tool_parent_class
|
||||
|
||||
|
||||
void
|
||||
gimp_cage_tool_register (GimpToolRegisterCallback callback,
|
||||
gpointer data)
|
||||
{
|
||||
(* callback) (GIMP_TYPE_CAGE_TOOL,
|
||||
GIMP_TYPE_TRANSFORM_OPTIONS,
|
||||
gimp_transform_options_gui,
|
||||
GIMP_CONTEXT_BACKGROUND_MASK,
|
||||
"gimp-cage-tool",
|
||||
_("Rotate"),
|
||||
_("Rotate Tool: Rotate the layer, selection or path"),
|
||||
N_("_Rotate"), "<shift>R",
|
||||
NULL, GIMP_HELP_TOOL_ROTATE,
|
||||
GIMP_STOCK_TOOL_ROTATE,
|
||||
data);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_cage_tool_class_init (GimpCageToolClass *klass)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_cage_tool_init (GimpCageTool *self)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995-2001 Spencer Kimball, Peter Mattis, and others
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GIMP_CAGE_TOOL_H__
|
||||
#define __GIMP_CAGE_TOOL_H__
|
||||
|
||||
#include "gimptransformtool.h"
|
||||
|
||||
|
||||
#define GIMP_TYPE_CAGE_TOOL (gimp_cage_tool_get_type ())
|
||||
#define GIMP_CAGE_TOOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_CAGE_TOOL, GimpCageTool))
|
||||
#define GIMP_CAGE_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_CAGE_TOOL, GimpCageToolClass))
|
||||
#define GIMP_IS_CAGE_TOOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_CAGE_TOOL))
|
||||
#define GIMP_IS_CAGE_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_CAGE_TOOL))
|
||||
#define GIMP_CAGE_TOOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_CAGE_TOOL, GimpCageToolClass))
|
||||
|
||||
|
||||
typedef struct _GimpCageToolClass GimpCageToolClass;
|
||||
typedef struct _GimpCageTool GimpCageTool;
|
||||
|
||||
struct _GimpCageTool
|
||||
{
|
||||
GimpTransformTool parent_instance;
|
||||
};
|
||||
|
||||
|
||||
struct _GimpCageToolClass
|
||||
{
|
||||
GimpTransformToolClass parent_class;
|
||||
};
|
||||
|
||||
void gimp_cage_tool_register (GimpToolRegisterCallback callback,
|
||||
gpointer data);
|
||||
|
||||
GType gimp_cage_tool_get_type (void) G_GNUC_CONST;
|
||||
|
||||
#endif /* __GIMP_CAGE_TOOL_H__ */
|
|
@ -36,6 +36,7 @@ OBJECTS = \
|
|||
gimpbucketfilloptions.obj \
|
||||
gimpbucketfilltool.obj \
|
||||
gimpbycolorselecttool.obj \
|
||||
gimpcagetool.obj \
|
||||
gimpclonetool.obj \
|
||||
gimpcolorbalancetool.obj \
|
||||
gimpcolorizetool.obj \
|
||||
|
|
Loading…
Reference in New Issue