Commit 260d7b2d authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

plug-ins/libgck/gck/Makefile.am plug-ins/libgck/gck/gckcommon.h

2000-02-14  Michael Natterer  <mitch@gimp.org>

	* plug-ins/libgck/gck/Makefile.am
	* plug-ins/libgck/gck/gckcommon.h
	* plug-ins/libgck/gck/gcklistbox.[ch]
	* plug-ins/libgck/gck/gckmath.[ch]
	* plug-ins/libgck/gck/gckvector.[ch]: removed.

	* plug-ins/libgck/gck/gck.h
	* plug-ins/libgck/gck/gcktypes.h: modified accordingly.

	* libgimp/Makefile.am
	* libgimp/gimpvector.[ch]: new files. Modified the vector
	functions from GCK. Changed the licence to LGPL, if there are any
	objections, please let me know.

	* libgimp/gimp.h: #include "gimpvector.h"

	* libgimp/gimpmath.h: added deg <-> rad conversion macros.

	* libgimp/gimpmatrix.[ch]: added a 4x4 vector to rotation angle
	function from GCK,
	s/GimpMatrix,gimp_matrix/GimpMatrix3,gimp_matrix3/

	* plug-ins/Lighting/*
	* plug-ins/MapObject/*:
	s/GckVector,gck_vector/GimpVector,gimp_vector/

	* app/pathsP.h
	* app/paths_dialog.c
	* app/perspective_tool.[ch]
	* app/rotate_tool.[ch]
	* app/scale_tool.[ch]
	* app/shear_tool.[ch]
	* app/tools_cmds.c
	* app/transform_core.[ch]
	* tools/pdbgen/pdb/tools.pdb:
	s/GimpMatrix,gimp_matrix/GimpMatrix3,gimp_matrix3/
parent f0432d81
2000-02-14 Michael Natterer <mitch@gimp.org>
* plug-ins/libgck/gck/Makefile.am
* plug-ins/libgck/gck/gckcommon.h
* plug-ins/libgck/gck/gcklistbox.[ch]
* plug-ins/libgck/gck/gckmath.[ch]
* plug-ins/libgck/gck/gckvector.[ch]: removed.
* plug-ins/libgck/gck/gck.h
* plug-ins/libgck/gck/gcktypes.h: modified accordingly.
* libgimp/Makefile.am
* libgimp/gimpvector.[ch]: new files. Modified the vector
functions from GCK. Changed the licence to LGPL, if there are any
objections, please let me know.
* libgimp/gimp.h: #include "gimpvector.h"
* libgimp/gimpmath.h: added deg <-> rad conversion macros.
* libgimp/gimpmatrix.[ch]: added a 4x4 vector to rotation angle
function from GCK,
s/GimpMatrix,gimp_matrix/GimpMatrix3,gimp_matrix3/
* plug-ins/Lighting/*
* plug-ins/MapObject/*:
s/GckVector,gck_vector/GimpVector,gimp_vector/
* app/pathsP.h
* app/paths_dialog.c
* app/perspective_tool.[ch]
* app/rotate_tool.[ch]
* app/scale_tool.[ch]
* app/shear_tool.[ch]
* app/tools_cmds.c
* app/transform_core.[ch]
* tools/pdbgen/pdb/tools.pdb:
s/GimpMatrix,gimp_matrix/GimpMatrix3,gimp_matrix3/
2000-02-14 Michael Natterer <mitch@gimp.org>
* app/preferences_dialog.c: purely cosmetic.
......
......@@ -2672,9 +2672,9 @@ paths_transform_xy (GimpImage *gimage,
}
void
paths_transform_current_path (GimpImage *gimage,
GimpMatrix transform,
gboolean forpreview)
paths_transform_current_path (GimpImage *gimage,
GimpMatrix3 transform,
gboolean forpreview)
{
PATHIMAGELISTP plp;
PATHP p;
......@@ -2715,10 +2715,10 @@ paths_transform_current_path (GimpImage *gimage,
/* printf("[x,y] = [%g,%g]\n",ppoint->x, ppoint->y); */
gimp_matrix_transform_point (transform,
ppoint->x,
ppoint->y,
&newx,&newy);
gimp_matrix3_transform_point (transform,
ppoint->x,
ppoint->y,
&newx,&newy);
/* printf("->[x,y] = [%g,%g]\n", newx, newy); */
......@@ -2754,9 +2754,9 @@ paths_transform_current_path (GimpImage *gimage,
}
void
paths_draw_current (GDisplay *gdisp,
DrawCore *core,
GimpMatrix transform)
paths_draw_current (GDisplay *gdisp,
DrawCore *core,
GimpMatrix3 transform)
{
PATHIMAGELISTP plp;
PATHP bzp;
......@@ -2790,10 +2790,10 @@ paths_draw_current (GDisplay *gdisp,
/* printf("[x,y] = [%g,%g]\n",ppoint->x, ppoint->y); */
gimp_matrix_transform_point (transform,
ppoint->x,
ppoint->y,
&newx,&newy);
gimp_matrix3_transform_point (transform,
ppoint->x,
ppoint->y,
&newx,&newy);
/* printf("->[x,y] = [%g,%g]\n", newx, newy); */
......
......@@ -72,7 +72,7 @@ PATHP paths_get_path_by_tattoo(GimpImage *,Tattoo);
void * paths_transform_start_undo(GimpImage *);
void paths_transform_free_undo(void *);
void paths_transform_do_undo(GimpImage *,void *);
void paths_transform_current_path(GimpImage *,GimpMatrix,gboolean);
void paths_transform_current_path(GimpImage *,GimpMatrix3,gboolean);
gboolean paths_delete_path(GimpImage *,gchar *);
#endif /* __PATHSP_H__ */
......@@ -2672,9 +2672,9 @@ paths_transform_xy (GimpImage *gimage,
}
void
paths_transform_current_path (GimpImage *gimage,
GimpMatrix transform,
gboolean forpreview)
paths_transform_current_path (GimpImage *gimage,
GimpMatrix3 transform,
gboolean forpreview)
{
PATHIMAGELISTP plp;
PATHP p;
......@@ -2715,10 +2715,10 @@ paths_transform_current_path (GimpImage *gimage,
/* printf("[x,y] = [%g,%g]\n",ppoint->x, ppoint->y); */
gimp_matrix_transform_point (transform,
ppoint->x,
ppoint->y,
&newx,&newy);
gimp_matrix3_transform_point (transform,
ppoint->x,
ppoint->y,
&newx,&newy);
/* printf("->[x,y] = [%g,%g]\n", newx, newy); */
......@@ -2754,9 +2754,9 @@ paths_transform_current_path (GimpImage *gimage,
}
void
paths_draw_current (GDisplay *gdisp,
DrawCore *core,
GimpMatrix transform)
paths_draw_current (GDisplay *gdisp,
DrawCore *core,
GimpMatrix3 transform)
{
PATHIMAGELISTP plp;
PATHP bzp;
......@@ -2790,10 +2790,10 @@ paths_draw_current (GDisplay *gdisp,
/* printf("[x,y] = [%g,%g]\n",ppoint->x, ppoint->y); */
gimp_matrix_transform_point (transform,
ppoint->x,
ppoint->y,
&newx,&newy);
gimp_matrix3_transform_point (transform,
ppoint->x,
ppoint->y,
&newx,&newy);
/* printf("->[x,y] = [%g,%g]\n", newx, newy); */
......
......@@ -125,7 +125,7 @@ tools_new_perspective_tool (void)
private->trans_info[Y3] = 0;
/* assemble the transformation matrix */
gimp_matrix_identity (private->transform);
gimp_matrix3_identity (private->transform);
return tool;
}
......@@ -205,7 +205,7 @@ perspective_tool_recalc (Tool *tool,
{
TransformCore *transform_core;
GDisplay *gdisp;
GimpMatrix m;
GimpMatrix3 m;
gdouble cx, cy;
gdouble scalex, scaley;
......@@ -228,10 +228,10 @@ perspective_tool_recalc (Tool *tool,
scaley = 1.0 / (transform_core->y2 - transform_core->y1);
/* assemble the transformation matrix */
gimp_matrix_identity (transform_core->transform);
gimp_matrix_translate (transform_core->transform, -cx, -cy);
gimp_matrix_scale (transform_core->transform, scalex, scaley);
gimp_matrix_mult (m, transform_core->transform);
gimp_matrix3_identity (transform_core->transform);
gimp_matrix3_translate (transform_core->transform, -cx, -cy);
gimp_matrix3_scale (transform_core->transform, scalex, scaley);
gimp_matrix3_mult (m, transform_core->transform);
/* transform the bounding box */
transform_core_transform_bounding_box (tool);
......@@ -241,8 +241,8 @@ perspective_tool_recalc (Tool *tool,
}
void
perspective_find_transform (gdouble *coords,
GimpMatrix matrix)
perspective_find_transform (gdouble *coords,
GimpMatrix3 matrix)
{
gdouble dx1, dx2, dx3, dy1, dy2, dy3;
gdouble det1, det2;
......@@ -294,7 +294,7 @@ perspective_tool_perspective (GImage *gimage,
GDisplay *gdisp,
TileManager *float_tiles,
gboolean interpolation,
GimpMatrix matrix)
GimpMatrix3 matrix)
{
gimp_progress *progress;
TileManager *ret;
......
......@@ -29,9 +29,9 @@ TileManager * perspective_tool_perspective (GimpImage *gimage,
GDisplay *gdisp,
TileManager *float_tiles,
gboolean interpolation,
GimpMatrix matrix);
GimpMatrix3 matrix);
void perspective_find_transform (gdouble *coords,
GimpMatrix matrix);
GimpMatrix3 matrix);
Tool * tools_new_perspective_tool (void);
void tools_free_perspective_tool (Tool *tool);
......
......@@ -202,7 +202,7 @@ tools_new_rotate_tool (void)
private->trans_info[CENTER_Y] = 0.0;
/* assemble the transformation matrix */
gimp_matrix_identity (private->transform);
gimp_matrix3_identity (private->transform);
return tool;
}
......@@ -364,11 +364,11 @@ rotate_tool_recalc (Tool *tool,
cy = transform_core->cy;
/* assemble the transformation matrix */
gimp_matrix_identity (transform_core->transform);
gimp_matrix_translate (transform_core->transform, -cx, -cy);
gimp_matrix_rotate (transform_core->transform,
transform_core->trans_info[ANGLE]);
gimp_matrix_translate (transform_core->transform, +cx, +cy);
gimp_matrix3_identity (transform_core->transform);
gimp_matrix3_translate (transform_core->transform, -cx, -cy);
gimp_matrix3_rotate (transform_core->transform,
transform_core->trans_info[ANGLE]);
gimp_matrix3_translate (transform_core->transform, +cx, +cy);
/* transform the bounding box */
transform_core_transform_bounding_box (tool);
......@@ -384,7 +384,7 @@ rotate_tool_rotate (GImage *gimage,
gdouble angle,
TileManager *float_tiles,
gboolean interpolation,
GimpMatrix matrix)
GimpMatrix3 matrix)
{
gimp_progress *progress;
TileManager *ret;
......
......@@ -30,7 +30,7 @@ TileManager * rotate_tool_rotate (GimpImage *gimage,
gdouble angle,
TileManager *float_tiles,
gboolean interpolation,
GimpMatrix matrix);
GimpMatrix3 matrix);
Tool * tools_new_rotate_tool (void);
void tools_free_rotate_tool (Tool *tool);
......
......@@ -189,7 +189,7 @@ tools_new_scale_tool (void)
private->trans_info[Y1] = 0.0;
/* assemble the transformation matrix */
gimp_matrix_identity (private->transform);
gimp_matrix3_identity (private->transform);
return tool;
}
......@@ -475,10 +475,11 @@ scale_tool_recalc (Tool *tool,
}
/* assemble the transformation matrix */
gimp_matrix_identity (transform_core->transform);
gimp_matrix_translate (transform_core->transform, (double) -cx + diffx, (double) -cy + diffy);
gimp_matrix_scale (transform_core->transform, scalex, scaley);
gimp_matrix_translate (transform_core->transform, (double) cx, (double) cy);
gimp_matrix3_identity (transform_core->transform);
gimp_matrix3_translate (transform_core->transform,
(double) -cx + diffx, (double) -cy + diffy);
gimp_matrix3_scale (transform_core->transform, scalex, scaley);
gimp_matrix3_translate (transform_core->transform, (double) cx, (double) cy);
/* transform the bounding box */
transform_core_transform_bounding_box (tool);
......@@ -494,7 +495,7 @@ scale_tool_scale (GImage *gimage,
gdouble *trans_info,
TileManager *float_tiles,
gboolean interpolation,
GimpMatrix matrix)
GimpMatrix3 matrix)
{
gimp_progress *progress;
TileManager *ret;
......
......@@ -30,7 +30,7 @@ TileManager * scale_tool_scale (GimpImage *gimage,
gdouble *trans_info,
TileManager *float_tiles,
gboolean interpolation,
GimpMatrix matrix);
GimpMatrix3 matrix);
Tool * tools_new_scale_tool (void);
void tools_free_scale_tool (Tool *tool);
......
......@@ -129,7 +129,7 @@ tools_new_shear_tool (void)
private->trans_func = shear_tool_transform;
/* assemble the transformation matrix */
gimp_matrix_identity (private->transform);
gimp_matrix3_identity (private->transform);
return tool;
}
......@@ -310,18 +310,18 @@ shear_tool_recalc (Tool *tool,
height = 1;
/* assemble the transformation matrix */
gimp_matrix_identity (transform_core->transform);
gimp_matrix_translate (transform_core->transform, -cx, -cy);
gimp_matrix3_identity (transform_core->transform);
gimp_matrix3_translate (transform_core->transform, -cx, -cy);
/* shear matrix */
if (transform_core->trans_info[HORZ_OR_VERT] == ORIENTATION_HORIZONTAL)
gimp_matrix_xshear (transform_core->transform,
(float) transform_core->trans_info [XSHEAR] / height);
gimp_matrix3_xshear (transform_core->transform,
(float) transform_core->trans_info [XSHEAR] / height);
else
gimp_matrix_yshear (transform_core->transform,
(float) transform_core->trans_info [YSHEAR] / width);
gimp_matrix3_yshear (transform_core->transform,
(float) transform_core->trans_info [YSHEAR] / width);
gimp_matrix_translate (transform_core->transform, +cx, +cy);
gimp_matrix3_translate (transform_core->transform, +cx, +cy);
/* transform the bounding box */
transform_core_transform_bounding_box (tool);
......@@ -336,7 +336,7 @@ shear_tool_shear (GimpImage *gimage,
GDisplay *gdisp,
TileManager *float_tiles,
gboolean interpolation,
GimpMatrix matrix)
GimpMatrix3 matrix)
{
gimp_progress *progress;
TileManager *ret;
......
......@@ -29,7 +29,7 @@ TileManager * shear_tool_shear (GimpImage *gimage,
GDisplay *gdisp,
TileManager *float_tiles,
gboolean interpolation,
GimpMatrix matrix);
GimpMatrix3 matrix);
Tool * tools_new_shear_tool (void);
void tools_free_shear_tool (Tool *matrix);
......
......@@ -125,7 +125,7 @@ tools_new_perspective_tool (void)
private->trans_info[Y3] = 0;
/* assemble the transformation matrix */
gimp_matrix_identity (private->transform);
gimp_matrix3_identity (private->transform);
return tool;
}
......@@ -205,7 +205,7 @@ perspective_tool_recalc (Tool *tool,
{
TransformCore *transform_core;
GDisplay *gdisp;
GimpMatrix m;
GimpMatrix3 m;
gdouble cx, cy;
gdouble scalex, scaley;
......@@ -228,10 +228,10 @@ perspective_tool_recalc (Tool *tool,
scaley = 1.0 / (transform_core->y2 - transform_core->y1);
/* assemble the transformation matrix */
gimp_matrix_identity (transform_core->transform);
gimp_matrix_translate (transform_core->transform, -cx, -cy);
gimp_matrix_scale (transform_core->transform, scalex, scaley);
gimp_matrix_mult (m, transform_core->transform);
gimp_matrix3_identity (transform_core->transform);
gimp_matrix3_translate (transform_core->transform, -cx, -cy);
gimp_matrix3_scale (transform_core->transform, scalex, scaley);
gimp_matrix3_mult (m, transform_core->transform);
/* transform the bounding box */
transform_core_transform_bounding_box (tool);
......@@ -241,8 +241,8 @@ perspective_tool_recalc (Tool *tool,
}
void
perspective_find_transform (gdouble *coords,
GimpMatrix matrix)
perspective_find_transform (gdouble *coords,
GimpMatrix3 matrix)
{
gdouble dx1, dx2, dx3, dy1, dy2, dy3;
gdouble det1, det2;
......@@ -294,7 +294,7 @@ perspective_tool_perspective (GImage *gimage,
GDisplay *gdisp,
TileManager *float_tiles,
gboolean interpolation,
GimpMatrix matrix)
GimpMatrix3 matrix)
{
gimp_progress *progress;
TileManager *ret;
......
......@@ -29,9 +29,9 @@ TileManager * perspective_tool_perspective (GimpImage *gimage,
GDisplay *gdisp,
TileManager *float_tiles,
gboolean interpolation,
GimpMatrix matrix);
GimpMatrix3 matrix);
void perspective_find_transform (gdouble *coords,
GimpMatrix matrix);
GimpMatrix3 matrix);
Tool * tools_new_perspective_tool (void);
void tools_free_perspective_tool (Tool *tool);
......
......@@ -202,7 +202,7 @@ tools_new_rotate_tool (void)
private->trans_info[CENTER_Y] = 0.0;
/* assemble the transformation matrix */
gimp_matrix_identity (private->transform);
gimp_matrix3_identity (private->transform);
return tool;
}
......@@ -364,11 +364,11 @@ rotate_tool_recalc (Tool *tool,
cy = transform_core->cy;
/* assemble the transformation matrix */
gimp_matrix_identity (transform_core->transform);
gimp_matrix_translate (transform_core->transform, -cx, -cy);
gimp_matrix_rotate (transform_core->transform,
transform_core->trans_info[ANGLE]);
gimp_matrix_translate (transform_core->transform, +cx, +cy);
gimp_matrix3_identity (transform_core->transform);
gimp_matrix3_translate (transform_core->transform, -cx, -cy);
gimp_matrix3_rotate (transform_core->transform,
transform_core->trans_info[ANGLE]);
gimp_matrix3_translate (transform_core->transform, +cx, +cy);
/* transform the bounding box */
transform_core_transform_bounding_box (tool);
......@@ -384,7 +384,7 @@ rotate_tool_rotate (GImage *gimage,
gdouble angle,
TileManager *float_tiles,
gboolean interpolation,
GimpMatrix matrix)
GimpMatrix3 matrix)
{
gimp_progress *progress;
TileManager *ret;
......
......@@ -30,7 +30,7 @@ TileManager * rotate_tool_rotate (GimpImage *gimage,
gdouble angle,
TileManager *float_tiles,
gboolean interpolation,
GimpMatrix matrix);
GimpMatrix3 matrix);
Tool * tools_new_rotate_tool (void);
void tools_free_rotate_tool (Tool *tool);
......
......@@ -189,7 +189,7 @@ tools_new_scale_tool (void)
private->trans_info[Y1] = 0.0;
/* assemble the transformation matrix */
gimp_matrix_identity (private->transform);
gimp_matrix3_identity (private->transform);
return tool;
}
......@@ -475,10 +475,11 @@ scale_tool_recalc (Tool *tool,
}
/* assemble the transformation matrix */
gimp_matrix_identity (transform_core->transform);
gimp_matrix_translate (transform_core->transform, (double) -cx + diffx, (double) -cy + diffy);
gimp_matrix_scale (transform_core->transform, scalex, scaley);
gimp_matrix_translate (transform_core->transform, (double) cx, (double) cy);
gimp_matrix3_identity (transform_core->transform);
gimp_matrix3_translate (transform_core->transform,
(double) -cx + diffx, (double) -cy + diffy);
gimp_matrix3_scale (transform_core->transform, scalex, scaley);
gimp_matrix3_translate (transform_core->transform, (double) cx, (double) cy);
/* transform the bounding box */
transform_core_transform_bounding_box (tool);
......@@ -494,7 +495,7 @@ scale_tool_scale (GImage *gimage,
gdouble *trans_info,
TileManager *float_tiles,
gboolean interpolation,
GimpMatrix matrix)
GimpMatrix3 matrix)
{
gimp_progress *progress;
TileManager *ret;
......
......@@ -30,7 +30,7 @@ TileManager * scale_tool_scale (GimpImage *gimage,
gdouble *trans_info,
TileManager *float_tiles,
gboolean interpolation,
GimpMatrix matrix);
GimpMatrix3 matrix);
Tool * tools_new_scale_tool (void);
void tools_free_scale_tool (Tool *tool);
......
......@@ -129,7 +129,7 @@ tools_new_shear_tool (void)
private->trans_func = shear_tool_transform;
/* assemble the transformation matrix */
gimp_matrix_identity (private->transform);
gimp_matrix3_identity (private->transform);
return tool;
}
......@@ -310,18 +310,18 @@ shear_tool_recalc (Tool *tool,
height = 1;
/* assemble the transformation matrix */
gimp_matrix_identity (transform_core->transform);
gimp_matrix_translate (transform_core->transform, -cx, -cy);
gimp_matrix3_identity (transform_core->transform);
gimp_matrix3_translate (transform_core->transform, -cx, -cy);
/* shear matrix */
if (transform_core->trans_info[HORZ_OR_VERT] == ORIENTATION_HORIZONTAL)
gimp_matrix_xshear (transform_core->transform,
(float) transform_core->trans_info [XSHEAR] / height);
gimp_matrix3_xshear (transform_core->transform,
(float) transform_core->trans_info [XSHEAR] / height);
else
gimp_matrix_yshear (transform_core->transform,
(float) transform_core->trans_info [YSHEAR] / width);
gimp_matrix3_yshear (transform_core->transform,
(float) transform_core->trans_info [YSHEAR] / width);
gimp_matrix_translate (transform_core->transform, +cx, +cy);
gimp_matrix3_translate (transform_core->transform, +cx, +cy);
/* transform the bounding box */
transform_core_transform_bounding_box (tool);
......@@ -336,7 +336,7 @@ shear_tool_shear (GimpImage *gimage,
GDisplay *gdisp,
TileManager *float_tiles,
gboolean interpolation,
GimpMatrix matrix)
GimpMatrix3 matrix)
{
gimp_progress *progress;
TileManager *ret;
......
......@@ -29,7 +29,7 @@ TileManager * shear_tool_shear (GimpImage *gimage,
GDisplay *gdisp,
TileManager *float_tiles,
gboolean interpolation,
GimpMatrix matrix);
GimpMatrix3 matrix);
Tool * tools_new_shear_tool (void);
void tools_free_shear_tool (Tool *matrix);
......
......@@ -125,7 +125,7 @@ tools_new_perspective_tool (void)
private->trans_info[Y3] = 0;
/* assemble the transformation matrix */
gimp_matrix_identity (private->transform);
gimp_matrix3_identity (private->transform);
return tool;
}
......@@ -205,7 +205,7 @@ perspective_tool_recalc (Tool *tool,
{
TransformCore *transform_core;
GDisplay *gdisp;
GimpMatrix m;
GimpMatrix3 m;
gdouble cx, cy;
gdouble scalex, scaley;
......@@ -228,10 +228,10 @@ perspective_tool_recalc (Tool *tool,
scaley = 1.0 / (transform_core->y2 - transform_core->y1);
/* assemble the transformation matrix */
gimp_matrix_identity (transform_core->transform);
gimp_matrix_translate (transform_core->transform, -cx, -cy);
gimp_matrix_scale (transform_core->transform, scalex, scaley);
gimp_matrix_mult (m, transform_core->transform);
gimp_matrix3_identity (transform_core->transform);
gimp_matrix3_translate (transform_core->transform, -cx, -cy);
gimp_matrix3_scale (transform_core->transform, scalex, scaley);
gimp_matrix3_mult (m, transform_core->transform);
/* transform the bounding box */
transform_core_transform_bounding_box (tool);
......@@ -241,8 +241,8 @@ perspective_tool_recalc (Tool *tool,
}
void
perspective_find_transform (gdouble *coords,
GimpMatrix matrix)
perspective_find_transform (gdouble *coords,
GimpMatrix3 matrix)
{
gdouble dx1, dx2, dx3, dy1, dy2, dy3;
gdouble det1, det2;
......@@ -294,7 +294,7 @@ perspective_tool_perspective (GImage *gimage,
GDisplay *gdisp,
TileManager *float_tiles,
gboolean interpolation,
GimpMatrix matrix)
GimpMatrix3 matrix)
{
gimp_progress *progress;
TileManager *ret;
......
......@@ -29,9 +29,9 @@ TileManager * perspective_tool_perspective (GimpImage *gimage,
GDisplay *gdisp,
TileManager *float_tiles,
gboolean interpolation,
GimpMatrix matrix);
GimpMatrix3 matrix);
void perspective_find_transform (gdouble *coords,
GimpMatrix matrix);
GimpMatrix3 matrix);
Tool * tools_new_perspective_tool (void);
void tools_free_perspective_tool (Tool *tool);
......
......@@ -202,7 +202,7 @@ tools_new_rotate_tool (void)
private->trans_info[CENTER_Y] = 0.0;
/* assemble the transformation matrix */
gimp_matrix_identity (private->transform);
gimp_matrix3_identity (private->transform);
return tool;
}
......@@ -364,11 +364,11 @@ rotate_tool_recalc (Tool *tool,
cy = transform_core->cy;
/* assemble the transformation matrix */
gimp_matrix_identity (transform_core->transform);
gimp_matrix_translate (transform_core->transform, -cx, -cy);
gimp_matrix_rotate (transform_core->transform,
transform_core->trans_info[ANGLE]);
gimp_matrix_translate (transform_core->transform, +cx, +cy);
gimp_matrix3_identity (transform_core->transform);
gimp_matrix3_translate (transform_core->transform, -cx, -cy);
gimp_matrix3_rotate (transform_core->transform,
transform_core->trans_info[ANGLE]);
gimp_matrix3_translate (transform_core->transform, +cx, +cy);
/* transform the bounding box */
transform_core_transform_bounding_box (tool);
......@@ -384,7 +384,7 @@ rotate_tool_rotate (GImage *gimage,
gdouble angle,
TileManager *float_tiles,
gboolean interpolation,
GimpMatrix matrix)
GimpMatrix3 matrix)
{
gimp_progress *progress;
TileManager *ret;
......
......@@ -30,7 +30,7 @@ TileManager * rotate_tool_rotate (GimpImage *gimage,
gdouble angle,
TileManager *float_tiles,
gboolean interpolation,
GimpMatrix matrix);
GimpMatrix3 matrix);
Tool * tools_new_rotate_tool (void);
void tools_free_rotate_tool (Tool *tool);
......
......@@ -189,7 +189,7 @@ tools_new_scale_tool (void)
private->trans_info[Y1] = 0.0;
/* assemble the transformation matrix */
gimp_matrix_identity (private->transform);
gimp_matrix3_identity (private->transform);
return tool;
}
......@@ -475,10 +475,11 @@ scale_tool_recalc (Tool *tool,
}
/* assemble the transformation matrix */
gimp_matrix_identity (transform_core->transform);
gimp_matrix_translate (transform_core->transform, (double) -cx + diffx, (double) -cy + diffy);
gimp_matrix_scale (transform_core->transform, scalex, scaley);
gimp_matrix_translate (transform_core->transform, (double) cx, (double) cy);
gimp_matrix3_identity (transform_core->transform);
gimp_matrix3_translate (transform_core->transform,
(double) -cx + diffx, (double) -cy + diffy);
gimp_matrix3_scale (transform_core->transform, scalex, scaley);
gimp_matrix3_translate (transform_core->transform, (double) cx, (double) cy);
/* transform the bounding box */
transform_core_transform_bounding_box (tool);
......@@ -494,7 +495,7 @@ scale_tool_scale (GImage *gimage,
gdouble *trans_info,
TileManager *float_tiles,
gboolean interpolation,