2006-12-10 05:33:38 +08:00
|
|
|
/* GIMP - The GNU Image Manipulation Program
|
2003-09-01 05:47:26 +08:00
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
2004-05-25 00:45:24 +08:00
|
|
|
* gimpcoords.h
|
2003-09-01 05:47:26 +08:00
|
|
|
* Copyright (C) 2002 Simon Budig <simon@gimp.org>
|
|
|
|
*
|
2009-01-18 06:28:01 +08:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
2003-09-01 05:47:26 +08:00
|
|
|
* it under the terms of the GNU General Public License as published by
|
2009-01-18 06:28:01 +08:00
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
2003-09-01 05:47:26 +08:00
|
|
|
* (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/>.
|
2003-09-01 05:47:26 +08:00
|
|
|
*/
|
|
|
|
|
2004-05-25 00:45:24 +08:00
|
|
|
#ifndef __GIMP_COORDS_H__
|
|
|
|
#define __GIMP_COORDS_H__
|
2003-09-01 05:47:26 +08:00
|
|
|
|
|
|
|
|
2004-06-09 20:44:13 +08:00
|
|
|
void gimp_coords_mix (const gdouble amul,
|
|
|
|
const GimpCoords *a,
|
|
|
|
const gdouble bmul,
|
|
|
|
const GimpCoords *b,
|
|
|
|
GimpCoords *ret_val);
|
|
|
|
void gimp_coords_average (const GimpCoords *a,
|
|
|
|
const GimpCoords *b,
|
|
|
|
GimpCoords *ret_average);
|
|
|
|
void gimp_coords_add (const GimpCoords *a,
|
|
|
|
const GimpCoords *b,
|
|
|
|
GimpCoords *ret_add);
|
|
|
|
void gimp_coords_difference (const GimpCoords *a,
|
|
|
|
const GimpCoords *b,
|
|
|
|
GimpCoords *difference);
|
|
|
|
void gimp_coords_scale (const gdouble f,
|
|
|
|
const GimpCoords *a,
|
|
|
|
GimpCoords *ret_product);
|
2004-05-25 00:45:24 +08:00
|
|
|
|
2004-06-09 20:44:13 +08:00
|
|
|
gdouble gimp_coords_scalarprod (const GimpCoords *a,
|
|
|
|
const GimpCoords *b);
|
|
|
|
gdouble gimp_coords_length (const GimpCoords *a);
|
|
|
|
gdouble gimp_coords_length_squared (const GimpCoords *a);
|
2005-10-01 08:49:44 +08:00
|
|
|
gdouble gimp_coords_manhattan_dist (const GimpCoords *a,
|
|
|
|
const GimpCoords *b);
|
2004-05-25 00:45:24 +08:00
|
|
|
|
2004-06-09 20:44:13 +08:00
|
|
|
gboolean gimp_coords_equal (const GimpCoords *a,
|
|
|
|
const GimpCoords *b);
|
2004-05-25 00:45:24 +08:00
|
|
|
|
2010-11-17 06:03:07 +08:00
|
|
|
gdouble gimp_coords_direction (const GimpCoords *a,
|
|
|
|
const GimpCoords *b);
|
|
|
|
|
2004-05-25 00:45:24 +08:00
|
|
|
|
|
|
|
#endif /* __GIMP_COORDS_H__ */
|