|
Packit |
bc1512 |
/* This file is part of GEGL
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* GEGL is free software; you can redistribute it and/or
|
|
Packit |
bc1512 |
* modify it under the terms of the GNU Lesser General Public
|
|
Packit |
bc1512 |
* License as published by the Free Software Foundation; either
|
|
Packit |
bc1512 |
* version 3 of the License, or (at your option) any later version.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* GEGL is distributed in the hope that it will be useful,
|
|
Packit |
bc1512 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
bc1512 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
bc1512 |
* Lesser General Public License for more details.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* You should have received a copy of the GNU Lesser General Public
|
|
Packit |
bc1512 |
* License along with GEGL; if not, see <http://www.gnu.org/licenses/>.
|
|
Packit |
bc1512 |
*
|
|
Packit |
bc1512 |
* Copyright 2006 Philip Lafleur
|
|
Packit |
bc1512 |
*/
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
#include "config.h"
|
|
Packit |
bc1512 |
#include <glib/gi18n-lib.h>
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
#ifdef GEGL_CHANT_PROPERTIES
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
gegl_chant_double (x, -G_MAXDOUBLE, G_MAXDOUBLE, 1.0,
|
|
Packit |
bc1512 |
_("Horizontal shear amount"))
|
|
Packit |
bc1512 |
gegl_chant_double (y, -G_MAXDOUBLE, G_MAXDOUBLE, 1.0,
|
|
Packit |
bc1512 |
_("Vertical shear amount"))
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
#else
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
#define GEGL_CHANT_NAME shear
|
|
Packit |
bc1512 |
#define GEGL_CHANT_DESCRIPTION _("Shears the buffer")
|
|
Packit |
bc1512 |
#define GEGL_CHANT_SELF "shear.c"
|
|
Packit |
bc1512 |
#include "chant.h"
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
#include <math.h>
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
static void
|
|
Packit |
bc1512 |
create_matrix (OpTransform *op,
|
|
Packit |
bc1512 |
GeglMatrix3 *matrix)
|
|
Packit |
bc1512 |
{
|
|
Packit |
bc1512 |
GeglChantOperation *chant = GEGL_CHANT_OPERATION (op);
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
matrix->coeff [0][1] = chant->x;
|
|
Packit |
bc1512 |
matrix->coeff [1][0] = chant->y;
|
|
Packit |
bc1512 |
}
|
|
Packit |
bc1512 |
|
|
Packit |
bc1512 |
#endif
|