Commit ea267753 authored by William Skaggs's avatar William Skaggs

Bill Skaggs <weskaggs@primate.ucdavis.edu>

	* app/core/gimpimage-sample-points.c
	* app/core/gimpimage-sample-points.h: new files

	* app/actions/view-actions.c
	* app/actions/view-commands.c
	* app/actions/view-commands.h
	* app/config/gimprc-blurbs.h
	* app/core/Makefile.am
	* app/core/core-enums.c
	* app/core/core-enums.h
	* app/core/core-types.h
	* app/core/gimp.c
	* app/core/gimp.h
	* app/core/gimpimage-crop.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-flip.c
	* app/core/gimpimage-rotate.c
	* app/core/gimpimage-scale.c
	* app/core/gimpimage-undo-push.c
	* app/core/gimpimage-undo-push.h
	* app/core/gimpimage.c
	* app/core/gimpimage.h
	* app/display/gimpdisplayoptions.c
	* app/display/gimpdisplayoptions.h
	* app/display/gimpdisplayshell-appearance.c
	* app/display/gimpdisplayshell-appearance.h
	* app/display/gimpdisplayshell-callbacks.c
	* app/display/gimpdisplayshell-draw.c
	* app/display/gimpdisplayshell-draw.h
	* app/display/gimpdisplayshell-handlers.c
	* app/display/gimpdisplayshell.c
	* app/display/gimpdisplayshell.h
	* app/widgets/gimphelp-ids.h
	* menus/image-menu.xml.in: add support for a list of "sample
	points" in each image, coded and handled very similarly to
	guides, for use mainly in color correction.  See bug #137776.
parent 8312bf27
2005-03-04 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/core/gimpimage-sample-points.c
* app/core/gimpimage-sample-points.h: new files
* app/actions/view-actions.c
* app/actions/view-commands.c
* app/actions/view-commands.h
* app/config/gimprc-blurbs.h
* app/core/Makefile.am
* app/core/core-enums.c
* app/core/core-enums.h
* app/core/core-types.h
* app/core/gimp.c
* app/core/gimp.h
* app/core/gimpimage-crop.c
* app/core/gimpimage-duplicate.c
* app/core/gimpimage-flip.c
* app/core/gimpimage-rotate.c
* app/core/gimpimage-scale.c
* app/core/gimpimage-undo-push.c
* app/core/gimpimage-undo-push.h
* app/core/gimpimage.c
* app/core/gimpimage.h
* app/display/gimpdisplayoptions.c
* app/display/gimpdisplayoptions.h
* app/display/gimpdisplayshell-appearance.c
* app/display/gimpdisplayshell-appearance.h
* app/display/gimpdisplayshell-callbacks.c
* app/display/gimpdisplayshell-draw.c
* app/display/gimpdisplayshell-draw.h
* app/display/gimpdisplayshell-handlers.c
* app/display/gimpdisplayshell.c
* app/display/gimpdisplayshell.h
* app/widgets/gimphelp-ids.h
* menus/image-menu.xml.in: add support for a list of "sample
points" in each image, coded and handled very similarly to
guides, for use mainly in color correction. See bug #137776.
2005-03-04 Sven Neumann <sven@gimp.org>
* plug-ins/script-fu/script-fu-scripts.c (script_fu_find_scripts):
......
......@@ -138,6 +138,12 @@ static GimpToggleActionEntry view_toggle_actions[] =
TRUE,
GIMP_HELP_VIEW_SHOW_GUIDES },
{ "view-show-sample-points", NULL,
N_("Show Sample Points"), NULL, NULL,
G_CALLBACK (view_toggle_sample_points_cmd_callback),
TRUE,
GIMP_HELP_VIEW_SHOW_SAMPLE_POINTS },
{ "view-show-grid", NULL,
N_("S_how Grid"), NULL, NULL,
G_CALLBACK (view_toggle_grid_cmd_callback),
......@@ -522,6 +528,7 @@ view_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("view-show-layer-boundary", gdisp);
SET_ACTIVE ("view-show-layer-boundary", gdisp && options->show_layer_boundary);
SET_ACTIVE ("view-show-guides", gdisp && options->show_guides);
SET_ACTIVE ("view-show-sample-points", gdisp && options->show_sample_points);
SET_ACTIVE ("view-show-grid", gdisp && options->show_grid);
SET_ACTIVE ("view-snap-to-guides", gdisp && shell->snap_to_guides);
SET_ACTIVE ("view-snap-to-grid", gdisp && shell->snap_to_grid);
......
......@@ -472,6 +472,22 @@ view_toggle_guides_cmd_callback (GtkAction *action,
gimp_display_shell_set_show_guides (shell, active);
}
void
view_toggle_sample_points_cmd_callback (GtkAction *action,
gpointer data)
{
GimpDisplay *gdisp;
GimpDisplayShell *shell;
gboolean active;
return_if_no_display (gdisp, data);
shell = GIMP_DISPLAY_SHELL (gdisp->shell);
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
gimp_display_shell_set_show_sample_points (shell, active);
}
void
view_toggle_grid_cmd_callback (GtkAction *action,
gpointer data)
......
......@@ -67,6 +67,8 @@ void view_toggle_statusbar_cmd_callback (GtkAction *action,
gpointer data);
void view_toggle_guides_cmd_callback (GtkAction *action,
gpointer data);
void view_toggle_sample_points_cmd_callback (GtkAction *action,
gpointer data);
void view_toggle_grid_cmd_callback (GtkAction *action,
gpointer data);
......
......@@ -318,6 +318,10 @@ N_("When enabled, the layer boundary is visible by default. This can also " \
N_("When enabled, the guides are visible by default. This can also be " \
"toggled with the \"View->Show Guides\" command.")
#define SHOW_SAMPLE_POINTS_BLURB \
N_("When enabled, the sample points are visible by default. This can also be " \
"toggled with the \"View->Show Sample Points\" command.")
#define SHOW_GRID_BLURB \
N_("When enabled, the grid is visible by default. This can also be toggled " \
"with the \"View->Show Grid\" command.")
......
......@@ -148,6 +148,8 @@ libappcore_a_sources = \
gimpimage-resize.h \
gimpimage-rotate.c \
gimpimage-rotate.h \
gimpimage-sample-points.c \
gimpimage-sample-points.h \
gimpimage-scale.c \
gimpimage-scale.h \
gimpimage-snap.c \
......
......@@ -691,6 +691,7 @@ gimp_undo_type_get_type (void)
{ GIMP_UNDO_GROUP_IMAGE_QMASK, "GIMP_UNDO_GROUP_IMAGE_QMASK", "group-image-qmask" },
{ GIMP_UNDO_GROUP_IMAGE_GRID, "GIMP_UNDO_GROUP_IMAGE_GRID", "group-image-grid" },
{ GIMP_UNDO_GROUP_IMAGE_GUIDE, "GIMP_UNDO_GROUP_IMAGE_GUIDE", "group-image-guide" },
{ GIMP_UNDO_GROUP_IMAGE_SAMPLE_POINT, "GIMP_UNDO_GROUP_IMAGE_SAMPLE_POINT", "group-image-sample-point" },
{ GIMP_UNDO_GROUP_DRAWABLE, "GIMP_UNDO_GROUP_DRAWABLE", "group-drawable" },
{ GIMP_UNDO_GROUP_DRAWABLE_MOD, "GIMP_UNDO_GROUP_DRAWABLE_MOD", "group-drawable-mod" },
{ GIMP_UNDO_GROUP_MASK, "GIMP_UNDO_GROUP_MASK", "group-mask" },
......@@ -720,6 +721,7 @@ gimp_undo_type_get_type (void)
{ GIMP_UNDO_IMAGE_RESOLUTION, "GIMP_UNDO_IMAGE_RESOLUTION", "image-resolution" },
{ GIMP_UNDO_IMAGE_GRID, "GIMP_UNDO_IMAGE_GRID", "image-grid" },
{ GIMP_UNDO_IMAGE_GUIDE, "GIMP_UNDO_IMAGE_GUIDE", "image-guide" },
{ GIMP_UNDO_IMAGE_SAMPLE_POINT, "GIMP_UNDO_IMAGE_SAMPLE_POINT", "image-sample-point" },
{ GIMP_UNDO_IMAGE_COLORMAP, "GIMP_UNDO_IMAGE_COLORMAP", "image-colormap" },
{ GIMP_UNDO_DRAWABLE, "GIMP_UNDO_DRAWABLE", "drawable" },
{ GIMP_UNDO_DRAWABLE_MOD, "GIMP_UNDO_DRAWABLE_MOD", "drawable-mod" },
......@@ -772,6 +774,7 @@ gimp_undo_type_get_type (void)
{ GIMP_UNDO_GROUP_IMAGE_QMASK, N_("Quick Mask"), NULL },
{ GIMP_UNDO_GROUP_IMAGE_GRID, N_("Grid"), NULL },
{ GIMP_UNDO_GROUP_IMAGE_GUIDE, N_("Guide"), NULL },
{ GIMP_UNDO_GROUP_IMAGE_SAMPLE_POINT, N_("Sample Point"), NULL },
{ GIMP_UNDO_GROUP_DRAWABLE, N_("Drawable"), NULL },
{ GIMP_UNDO_GROUP_DRAWABLE_MOD, N_("Drawable mod"), NULL },
{ GIMP_UNDO_GROUP_MASK, N_("Selection mask"), NULL },
......@@ -801,6 +804,7 @@ gimp_undo_type_get_type (void)
{ GIMP_UNDO_IMAGE_RESOLUTION, N_("Resolution change"), NULL },
{ GIMP_UNDO_IMAGE_GRID, N_("Grid"), NULL },
{ GIMP_UNDO_IMAGE_GUIDE, N_("Guide"), NULL },
{ GIMP_UNDO_IMAGE_SAMPLE_POINT, N_("Sample Point"), NULL },
{ GIMP_UNDO_IMAGE_COLORMAP, N_("Change indexed palette"), NULL },
{ GIMP_UNDO_DRAWABLE, N_("Drawable"), NULL },
{ GIMP_UNDO_DRAWABLE_MOD, N_("Drawable mod"), NULL },
......
......@@ -336,6 +336,7 @@ typedef enum /*< pdb-skip >*/
GIMP_UNDO_GROUP_IMAGE_QMASK, /*< desc="Quick Mask" >*/
GIMP_UNDO_GROUP_IMAGE_GRID, /*< desc="Grid" >*/
GIMP_UNDO_GROUP_IMAGE_GUIDE, /*< desc="Guide" >*/
GIMP_UNDO_GROUP_IMAGE_SAMPLE_POINT, /*< desc="Sample Point" >*/
GIMP_UNDO_GROUP_DRAWABLE, /*< desc="Drawable" >*/
GIMP_UNDO_GROUP_DRAWABLE_MOD, /*< desc="Drawable mod" >*/
GIMP_UNDO_GROUP_MASK, /*< desc="Selection mask" >*/
......@@ -370,6 +371,7 @@ typedef enum /*< pdb-skip >*/
GIMP_UNDO_IMAGE_RESOLUTION, /*< desc="Resolution change" >*/
GIMP_UNDO_IMAGE_GRID, /*< desc="Grid" >*/
GIMP_UNDO_IMAGE_GUIDE, /*< desc="Guide" >*/
GIMP_UNDO_IMAGE_SAMPLE_POINT, /*< desc="Sample Point" >*/
GIMP_UNDO_IMAGE_COLORMAP, /*< desc="Change indexed palette" >*/
GIMP_UNDO_DRAWABLE, /*< desc="Drawable" >*/
GIMP_UNDO_DRAWABLE_MOD, /*< desc="Drawable mod" >*/
......
......@@ -133,6 +133,7 @@ typedef struct _GimpArea GimpArea;
typedef struct _GimpCoords GimpCoords;
typedef struct _GimpGradientSegment GimpGradientSegment;
typedef struct _GimpGuide GimpGuide;
typedef struct _GimpSamplePoint GimpSamplePoint;
typedef guint32 GimpTattoo;
typedef struct _GimpPaletteEntry GimpPaletteEntry;
typedef struct _GimpPlugInDebug GimpPlugInDebug;
......
......@@ -241,6 +241,7 @@ gimp_init (Gimp *gimp)
gimp->next_image_ID = 1;
gimp->next_guide_ID = 1;
gimp->next_sample_point_ID = 1;
gimp->image_table = g_hash_table_new (g_direct_hash, NULL);
gimp->next_item_ID = 1;
......
......@@ -88,6 +88,7 @@ struct _Gimp
GimpContainer *images;
gint next_image_ID;
guint32 next_guide_ID;
guint32 next_sample_point_ID;
GHashTable *image_table;
gint next_item_ID;
......
......@@ -31,6 +31,7 @@
#include "gimpimage.h"
#include "gimpimage-crop.h"
#include "gimpimage-guides.h"
#include "gimpimage-sample-points.h"
#include "gimpimage-undo.h"
#include "gimpimage-undo-push.h"
#include "gimplayer.h"
......@@ -229,6 +230,31 @@ gimp_image_crop (GimpImage *gimage,
gimp_image_move_guide (gimage, guide, new_position, TRUE);
}
/* Reposition or remove sample points */
list = gimage->sample_points;
while (list)
{
GimpSamplePoint *sample_point = list->data;
gboolean remove_sample_point = FALSE;
gint new_x = sample_point->x;
gint new_y = sample_point->y;
list = g_list_next (list);
new_y -= y1;
if ((sample_point->y < y1) || (sample_point->y > y2))
remove_sample_point = TRUE;
new_x -= x1;
if ((sample_point->x < x1) || (sample_point->x > x2))
remove_sample_point = TRUE;
if (remove_sample_point)
gimp_image_remove_sample_point (gimage, sample_point, TRUE);
else if (new_x != sample_point->x || new_y != sample_point->y)
gimp_image_move_sample_point (gimage, sample_point, new_x, new_y, TRUE);
}
gimp_image_undo_group_end (gimage);
gimp_image_update (gimage, 0, 0, gimage->width, gimage->height);
......
......@@ -33,6 +33,7 @@
#include "gimpimage-duplicate.h"
#include "gimpimage-grid.h"
#include "gimpimage-guides.h"
#include "gimpimage-sample-points.h"
#include "gimplayer.h"
#include "gimplayer-floating-sel.h"
#include "gimplist.h"
......@@ -235,6 +236,17 @@ gimp_image_duplicate (GimpImage *gimage)
}
}
/* Copy any sample points */
for (list = gimage->sample_points; list; list = g_list_next (list))
{
GimpSamplePoint *sample_point = list->data;
gimp_image_add_sample_point_at_pos (new_gimage,
sample_point->x,
sample_point->y,
FALSE);
}
/* Copy the grid */
if (gimage->grid)
gimp_image_set_grid (new_gimage, gimage->grid, FALSE);
......
......@@ -27,6 +27,7 @@
#include "gimpimage.h"
#include "gimpimage-flip.h"
#include "gimpimage-guides.h"
#include "gimpimage-sample-points.h"
#include "gimpimage-undo.h"
#include "gimpimage-undo-push.h"
#include "gimpitem.h"
......@@ -144,6 +145,24 @@ gimp_image_flip (GimpImage *gimage,
}
}
/* Flip all sample points */
for (list = gimage->sample_points; list; list = g_list_next (list))
{
GimpSamplePoint *sample_point = list->data;
if (flip_type == GIMP_ORIENTATION_VERTICAL)
gimp_image_move_sample_point (gimage, sample_point,
sample_point->x,
gimage->height - sample_point->y,
TRUE);
if (flip_type == GIMP_ORIENTATION_HORIZONTAL)
gimp_image_move_sample_point (gimage, sample_point,
gimage->width - sample_point->x,
sample_point->y,
TRUE);
}
gimp_image_undo_group_end (gimage);
gimp_unset_busy (gimage->gimp);
......
......@@ -27,6 +27,7 @@
#include "gimpimage.h"
#include "gimpimage-rotate.h"
#include "gimpimage-guides.h"
#include "gimpimage-sample-points.h"
#include "gimpimage-undo.h"
#include "gimpimage-undo-push.h"
#include "gimpitem.h"
......@@ -34,13 +35,15 @@
#include "gimpprogress.h"
static void gimp_image_rotate_item_offset (GimpImage *gimage,
GimpRotationType rotate_type,
GimpItem *item,
gint off_x,
gint off_y);
static void gimp_image_rotate_guides (GimpImage *gimage,
GimpRotationType rotate_type);
static void gimp_image_rotate_item_offset (GimpImage *gimage,
GimpRotationType rotate_type,
GimpItem *item,
gint off_x,
gint off_y);
static void gimp_image_rotate_guides (GimpImage *gimage,
GimpRotationType rotate_type);
static void gimp_image_rotate_sample_points (GimpImage *gimage,
GimpRotationType rotate_type);
void
......@@ -169,6 +172,9 @@ gimp_image_rotate (GimpImage *gimage,
/* Rotate all Guides */
gimp_image_rotate_guides (gimage, rotate_type);
/* Rotate all sample points */
gimp_image_rotate_sample_points (gimage, rotate_type);
/* Resize the image (if needed) */
if (size_changed)
{
......@@ -308,3 +314,40 @@ gimp_image_rotate_guides (GimpImage *gimage,
}
}
}
static void
gimp_image_rotate_sample_points (GimpImage *gimage,
GimpRotationType rotate_type)
{
GList *list;
/* Rotate all sample points */
for (list = gimage->sample_points; list; list = g_list_next (list))
{
GimpSamplePoint *sample_point = list->data;
gint old_x;
gint old_y;
old_x = sample_point->x;
old_y = sample_point->y;
switch (rotate_type)
{
case GIMP_ROTATE_90:
sample_point->x = old_y;
sample_point->y = gimage->height - old_x;
break;
case GIMP_ROTATE_180:
sample_point->x = gimage->height - old_x;
sample_point->y = gimage->width - old_y;
break;
case GIMP_ROTATE_270:
sample_point->x = gimage->width - old_y;
sample_point->y = old_x;
break;
}
}
}
/* The GIMP -- an 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 2 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, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "config.h"
#include <glib-object.h>
#include "core-types.h"
#include "gimp.h"
#include "gimpimage.h"
#include "gimpimage-sample-points.h"
#include "gimpimage-undo-push.h"
#include "gimp-intl.h"
/* public functions */
GimpSamplePoint *
gimp_image_add_sample_point_at_pos (GimpImage *gimage,
gint x,
gint y,
gboolean push_undo)
{
GimpSamplePoint *sample_point;
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), NULL);
g_return_val_if_fail (x >= 0 && x <= gimage->width, NULL);
g_return_val_if_fail (y >= 0 && y <= gimage->height, NULL);
sample_point = g_new0 (GimpSamplePoint, 1);
sample_point->ref_count = 1;
sample_point->x = -1;
sample_point->y = -1;
sample_point->sample_point_ID = gimage->gimp->next_sample_point_ID++;
if (push_undo)
gimp_image_undo_push_image_sample_point (gimage, _("Add Sample_Point"),
sample_point);
gimp_image_add_sample_point (gimage, sample_point, x, y);
gimp_image_sample_point_unref (sample_point);
return sample_point;
}
GimpSamplePoint *
gimp_image_sample_point_ref (GimpSamplePoint *sample_point)
{
g_return_val_if_fail (sample_point != NULL, NULL);
sample_point->ref_count++;
return sample_point;
}
void
gimp_image_sample_point_unref (GimpSamplePoint *sample_point)
{
g_return_if_fail (sample_point != NULL);
sample_point->ref_count--;
if (sample_point->ref_count < 1)
g_free (sample_point);
}
void
gimp_image_add_sample_point (GimpImage *gimage,
GimpSamplePoint *sample_point,
gint x,
gint y)
{
g_return_if_fail (GIMP_IS_IMAGE (gimage));
g_return_if_fail (sample_point != NULL);
g_return_if_fail (x >= 0);
g_return_if_fail (y >= 0);
g_return_if_fail (x <= gimage->width);
g_return_if_fail (y <= gimage->height);
gimage->sample_points = g_list_prepend (gimage->sample_points, sample_point);
sample_point->x = x;
sample_point->y = y;
gimp_image_sample_point_ref (sample_point);
gimp_image_update_sample_point (gimage, sample_point);
}
void
gimp_image_remove_sample_point (GimpImage *gimage,
GimpSamplePoint *sample_point,
gboolean push_undo)
{
g_return_if_fail (GIMP_IS_IMAGE (gimage));
g_return_if_fail (sample_point != NULL);
gimp_image_update_sample_point (gimage, sample_point);
if (push_undo)
gimp_image_undo_push_image_sample_point (gimage, _("Remove Sample Point"), sample_point);
gimage->sample_points = g_list_remove (gimage->sample_points, sample_point);
sample_point->x = -1;
sample_point->y = -1;
gimp_image_sample_point_unref (sample_point);
}
void
gimp_image_move_sample_point (GimpImage *gimage,
GimpSamplePoint *sample_point,
gint x,
gint y,
gboolean push_undo)
{
g_return_if_fail (GIMP_IS_IMAGE (gimage));
g_return_if_fail (sample_point != NULL);
g_return_if_fail (x >= 0);
g_return_if_fail (y >= 0);
g_return_if_fail (x <= gimage->width);
g_return_if_fail (y <= gimage->height);
if (push_undo)
gimp_image_undo_push_image_sample_point (gimage, _("Move Sample Point"), sample_point);
gimp_image_update_sample_point (gimage, sample_point);
sample_point->x = x;
sample_point->y = y;
gimp_image_update_sample_point (gimage, sample_point);
}
GimpSamplePoint *
gimp_image_find_sample_point (GimpImage *gimage,
gdouble x,
gdouble y,
gdouble epsilon_x,
gdouble epsilon_y)
{
GList *list;
GimpSamplePoint *sample_point;
GimpSamplePoint *ret = NULL;
gdouble dist;
gdouble mindist = G_MAXDOUBLE;
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), NULL);
g_return_val_if_fail (epsilon_x > 0 && epsilon_y > 0, NULL);
if (x < 0 || x >= gimage->width ||
y < 0 || y >= gimage->height)
{
return NULL;
}
for (list = gimage->sample_points; list; list = g_list_next (list))
{
sample_point = (GimpSamplePoint *) list->data;
if (sample_point->x < 0 || sample_point->y < 0)
continue;
dist = hypot ( sample_point->x - x, sample_point->y - y);
if (dist < MIN (epsilon_y, mindist))
{
mindist = dist;
ret = sample_point;
}
}
return ret;
}
/* The GIMP -- an 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 2 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, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __GIMP_IMAGE_SAMPLE_POINTS_H__
#define __GIMP_IMAGE_SAMPLE_POINTS_H__
#define GIMP_SAMPLE_POINT_DRAW_SIZE 10
struct _GimpSamplePoint
{
gint ref_count;
gint x;
gint y;
guint32 sample_point_ID;
};
GimpSamplePoint * gimp_image_add_sample_point_at_pos (GimpImage *gimage,
gint x,
gint y,
gboolean push_undo);
GimpSamplePoint * gimp_image_sample_point_ref (GimpSamplePoint *sample_point);
void gimp_image_sample_point_unref (GimpSamplePoint *sample_point);
void gimp_image_add_sample_point (GimpImage *gimage,
GimpSamplePoint *sample_point,
gint x,
gint y);
void gimp_image_remove_sample_point (GimpImage *gimage,
GimpSamplePoint *sample_point,
gboolean push_undo);
void gimp_image_move_sample_point (GimpImage *gimage,
GimpSamplePoint *sample_point,
gint x,
gint y,
gboolean push_undo);
GimpSamplePoint * gimp_image_find_sample_point (GimpImage *gimage,
gdouble x,
gdouble y,
gdouble epsilon_x,
gdouble epsilon_y);
#endif /* __GIMP_IMAGE_SAMPLE_POINTS_H__ */
......@@ -27,6 +27,7 @@
#include "gimp.h"
#include "gimpimage.h"
#include "gimpimage-guides.h"
#include "gimpimage-sample-points.h"
#include "gimpimage-scale.h"
#include "gimpimage-undo.h"
#include "gimpimage-undo-push.h"
......@@ -181,6 +182,16 @@ gimp_image_scale (GimpImage *gimage,
}
}