2016-04-03 22:27:41 +08:00
|
|
|
/* GIMP - The GNU Image Manipulation Program
|
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
|
|
|
* 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
|
2018-07-12 05:27:07 +08:00
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
2016-04-03 22:27:41 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GIMP_GUIDE_TOOL_H__
|
|
|
|
#define __GIMP_GUIDE_TOOL_H__
|
|
|
|
|
|
|
|
|
|
|
|
#include "gimpdrawtool.h"
|
|
|
|
|
|
|
|
|
|
|
|
#define GIMP_TYPE_GUIDE_TOOL (gimp_guide_tool_get_type ())
|
|
|
|
#define GIMP_GUIDE_TOOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_GUIDE_TOOL, GimpGuideTool))
|
|
|
|
#define GIMP_GUIDE_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_GUIDE_TOOL, GimpGuideToolClass))
|
|
|
|
#define GIMP_IS_GUIDE_TOOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_GUIDE_TOOL))
|
|
|
|
#define GIMP_IS_GUIDE_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_GUIDE_TOOL))
|
|
|
|
#define GIMP_GUIDE_TOOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_GUIDE_TOOL, GimpGuideToolClass))
|
|
|
|
|
|
|
|
|
app: allow moving an intersecting pair of guides with the Move tool
This commit adds support for moving together an intersecting pair
of guides using the Move tool, by dragging the guides at their
point of intersection. This is useful when the guides are used to
mark a point, rather than a pair of lines (e.g., as is the case for
the mandala symmetry guides, which mark the symmetry's point of
origin).
Add gimp_image_pick_guides(), which can return a set of guides,
rather than a single guide. The API allows an arbitrary set of
guides to be returned, but, in practice, at most two intersecting
guides are returned, as per the above.
In GimpMoveTool and GimpGuideTool, add support for moving multiple
guides together, and, in GimpMoveTool, use gimp_image_pick_guides()
to potentially pick multiple guides.
2019-05-30 13:39:26 +08:00
|
|
|
typedef struct _GimpGuideToolGuide GimpGuideToolGuide;
|
2016-04-03 22:27:41 +08:00
|
|
|
typedef struct _GimpGuideTool GimpGuideTool;
|
|
|
|
typedef struct _GimpGuideToolClass GimpGuideToolClass;
|
|
|
|
|
app: allow moving an intersecting pair of guides with the Move tool
This commit adds support for moving together an intersecting pair
of guides using the Move tool, by dragging the guides at their
point of intersection. This is useful when the guides are used to
mark a point, rather than a pair of lines (e.g., as is the case for
the mandala symmetry guides, which mark the symmetry's point of
origin).
Add gimp_image_pick_guides(), which can return a set of guides,
rather than a single guide. The API allows an arbitrary set of
guides to be returned, but, in practice, at most two intersecting
guides are returned, as per the above.
In GimpMoveTool and GimpGuideTool, add support for moving multiple
guides together, and, in GimpMoveTool, use gimp_image_pick_guides()
to potentially pick multiple guides.
2019-05-30 13:39:26 +08:00
|
|
|
struct _GimpGuideToolGuide
|
|
|
|
{
|
|
|
|
GimpGuide *guide;
|
|
|
|
|
|
|
|
gint old_position;
|
|
|
|
gint position;
|
|
|
|
GimpOrientationType orientation;
|
|
|
|
gboolean custom;
|
|
|
|
};
|
|
|
|
|
2016-04-03 22:27:41 +08:00
|
|
|
struct _GimpGuideTool
|
|
|
|
{
|
app: allow moving an intersecting pair of guides with the Move tool
This commit adds support for moving together an intersecting pair
of guides using the Move tool, by dragging the guides at their
point of intersection. This is useful when the guides are used to
mark a point, rather than a pair of lines (e.g., as is the case for
the mandala symmetry guides, which mark the symmetry's point of
origin).
Add gimp_image_pick_guides(), which can return a set of guides,
rather than a single guide. The API allows an arbitrary set of
guides to be returned, but, in practice, at most two intersecting
guides are returned, as per the above.
In GimpMoveTool and GimpGuideTool, add support for moving multiple
guides together, and, in GimpMoveTool, use gimp_image_pick_guides()
to potentially pick multiple guides.
2019-05-30 13:39:26 +08:00
|
|
|
GimpDrawTool parent_instance;
|
2016-04-03 22:27:41 +08:00
|
|
|
|
app: allow moving an intersecting pair of guides with the Move tool
This commit adds support for moving together an intersecting pair
of guides using the Move tool, by dragging the guides at their
point of intersection. This is useful when the guides are used to
mark a point, rather than a pair of lines (e.g., as is the case for
the mandala symmetry guides, which mark the symmetry's point of
origin).
Add gimp_image_pick_guides(), which can return a set of guides,
rather than a single guide. The API allows an arbitrary set of
guides to be returned, but, in practice, at most two intersecting
guides are returned, as per the above.
In GimpMoveTool and GimpGuideTool, add support for moving multiple
guides together, and, in GimpMoveTool, use gimp_image_pick_guides()
to potentially pick multiple guides.
2019-05-30 13:39:26 +08:00
|
|
|
GimpGuideToolGuide *guides;
|
|
|
|
gint n_guides;
|
2016-04-03 22:27:41 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GimpGuideToolClass
|
|
|
|
{
|
|
|
|
GimpDrawToolClass parent_class;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
app: allow moving an intersecting pair of guides with the Move tool
This commit adds support for moving together an intersecting pair
of guides using the Move tool, by dragging the guides at their
point of intersection. This is useful when the guides are used to
mark a point, rather than a pair of lines (e.g., as is the case for
the mandala symmetry guides, which mark the symmetry's point of
origin).
Add gimp_image_pick_guides(), which can return a set of guides,
rather than a single guide. The API allows an arbitrary set of
guides to be returned, but, in practice, at most two intersecting
guides are returned, as per the above.
In GimpMoveTool and GimpGuideTool, add support for moving multiple
guides together, and, in GimpMoveTool, use gimp_image_pick_guides()
to potentially pick multiple guides.
2019-05-30 13:39:26 +08:00
|
|
|
GType gimp_guide_tool_get_type (void) G_GNUC_CONST;
|
2016-04-03 22:27:41 +08:00
|
|
|
|
app: allow moving an intersecting pair of guides with the Move tool
This commit adds support for moving together an intersecting pair
of guides using the Move tool, by dragging the guides at their
point of intersection. This is useful when the guides are used to
mark a point, rather than a pair of lines (e.g., as is the case for
the mandala symmetry guides, which mark the symmetry's point of
origin).
Add gimp_image_pick_guides(), which can return a set of guides,
rather than a single guide. The API allows an arbitrary set of
guides to be returned, but, in practice, at most two intersecting
guides are returned, as per the above.
In GimpMoveTool and GimpGuideTool, add support for moving multiple
guides together, and, in GimpMoveTool, use gimp_image_pick_guides()
to potentially pick multiple guides.
2019-05-30 13:39:26 +08:00
|
|
|
void gimp_guide_tool_start_new (GimpTool *parent_tool,
|
|
|
|
GimpDisplay *display,
|
|
|
|
GimpOrientationType orientation);
|
|
|
|
void gimp_guide_tool_start_edit (GimpTool *parent_tool,
|
|
|
|
GimpDisplay *display,
|
|
|
|
GimpGuide *guide);
|
|
|
|
void gimp_guide_tool_start_edit_many (GimpTool *parent_tool,
|
|
|
|
GimpDisplay *display,
|
|
|
|
GList *guides);
|
2016-04-03 22:27:41 +08:00
|
|
|
|
|
|
|
|
|
|
|
#endif /* __GIMP_GUIDE_TOOL_H__ */
|