123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918 |
- /* LIBGIMP - The GIMP Library
- * Copyright (C) 1995-2003 Peter Mattis and Spencer Kimball
- *
- * gimpdrawabletransform_pdb.c
- *
- * This library is free software: you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library. If not, see
- * <http://www.gnu.org/licenses/>.
- */
- /* NOTE: This file is auto-generated by pdbgen.pl */
- #include "config.h"
- #include "gimp.h"
- /**
- * SECTION: gimpdrawabletransform
- * @title: gimpdrawabletransform
- * @short_description: Functions to perform transformatrions on drawables.
- *
- * Functions to perform transformatrions on drawables.
- **/
- /**
- * gimp_drawable_transform_flip_simple:
- * @drawable_ID: The affected drawable.
- * @flip_type: Type of flip.
- * @auto_center: Whether to automatically position the axis in the selection center.
- * @axis: coord. of flip axis.
- * @clip_result: Whether to clip results.
- *
- * Deprecated: Use gimp_item_transform_flip_simple() instead.
- *
- * Returns: The flipped drawable.
- *
- * Since: GIMP 2.2
- **/
- gint32
- gimp_drawable_transform_flip_simple (gint32 drawable_ID,
- GimpOrientationType flip_type,
- gboolean auto_center,
- gdouble axis,
- gboolean clip_result)
- {
- GimpParam *return_vals;
- gint nreturn_vals;
- gint32 ret_drawable_ID = -1;
- return_vals = gimp_run_procedure ("gimp-drawable-transform-flip-simple",
- &nreturn_vals,
- GIMP_PDB_DRAWABLE, drawable_ID,
- GIMP_PDB_INT32, flip_type,
- GIMP_PDB_INT32, auto_center,
- GIMP_PDB_FLOAT, axis,
- GIMP_PDB_INT32, clip_result,
- GIMP_PDB_END);
- if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
- ret_drawable_ID = return_vals[1].data.d_drawable;
- gimp_destroy_params (return_vals, nreturn_vals);
- return ret_drawable_ID;
- }
- /**
- * gimp_drawable_transform_flip:
- * @drawable_ID: The affected drawable.
- * @x0: horz. coord. of one end of axis.
- * @y0: vert. coord. of one end of axis.
- * @x1: horz. coord. of other end of axis.
- * @y1: vert. coord. of other end of axis.
- * @transform_direction: Direction of transformation.
- * @interpolation: Type of interpolation.
- * @supersample: This parameter is ignored, supersampling is performed based on the interpolation type.
- * @recursion_level: Maximum recursion level used for supersampling (3 is a nice value).
- * @clip_result: Whether to clip results.
- *
- * Deprecated: Use gimp_item_transform_flip() instead.
- *
- * Returns: The flipped drawable.
- *
- * Since: GIMP 2.2
- **/
- gint32
- gimp_drawable_transform_flip (gint32 drawable_ID,
- gdouble x0,
- gdouble y0,
- gdouble x1,
- gdouble y1,
- GimpTransformDirection transform_direction,
- GimpInterpolationType interpolation,
- gboolean supersample,
- gint recursion_level,
- gboolean clip_result)
- {
- GimpParam *return_vals;
- gint nreturn_vals;
- gint32 ret_drawable_ID = -1;
- return_vals = gimp_run_procedure ("gimp-drawable-transform-flip",
- &nreturn_vals,
- GIMP_PDB_DRAWABLE, drawable_ID,
- GIMP_PDB_FLOAT, x0,
- GIMP_PDB_FLOAT, y0,
- GIMP_PDB_FLOAT, x1,
- GIMP_PDB_FLOAT, y1,
- GIMP_PDB_INT32, transform_direction,
- GIMP_PDB_INT32, interpolation,
- GIMP_PDB_INT32, supersample,
- GIMP_PDB_INT32, recursion_level,
- GIMP_PDB_INT32, clip_result,
- GIMP_PDB_END);
- if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
- ret_drawable_ID = return_vals[1].data.d_drawable;
- gimp_destroy_params (return_vals, nreturn_vals);
- return ret_drawable_ID;
- }
- /**
- * gimp_drawable_transform_flip_default:
- * @drawable_ID: The affected drawable.
- * @x0: horz. coord. of one end of axis.
- * @y0: vert. coord. of one end of axis.
- * @x1: horz. coord. of other end of axis.
- * @y1: vert. coord. of other end of axis.
- * @interpolate: Whether to use interpolation and supersampling.
- * @clip_result: Whether to clip results.
- *
- * Deprecated: Use gimp_item_transform_flip() instead.
- *
- * Returns: The flipped drawable.
- *
- * Since: GIMP 2.2
- **/
- gint32
- gimp_drawable_transform_flip_default (gint32 drawable_ID,
- gdouble x0,
- gdouble y0,
- gdouble x1,
- gdouble y1,
- gboolean interpolate,
- gboolean clip_result)
- {
- GimpParam *return_vals;
- gint nreturn_vals;
- gint32 ret_drawable_ID = -1;
- return_vals = gimp_run_procedure ("gimp-drawable-transform-flip-default",
- &nreturn_vals,
- GIMP_PDB_DRAWABLE, drawable_ID,
- GIMP_PDB_FLOAT, x0,
- GIMP_PDB_FLOAT, y0,
- GIMP_PDB_FLOAT, x1,
- GIMP_PDB_FLOAT, y1,
- GIMP_PDB_INT32, interpolate,
- GIMP_PDB_INT32, clip_result,
- GIMP_PDB_END);
- if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
- ret_drawable_ID = return_vals[1].data.d_drawable;
- gimp_destroy_params (return_vals, nreturn_vals);
- return ret_drawable_ID;
- }
- /**
- * gimp_drawable_transform_perspective:
- * @drawable_ID: The affected drawable.
- * @x0: The new x coordinate of upper-left corner of original bounding box.
- * @y0: The new y coordinate of upper-left corner of original bounding box.
- * @x1: The new x coordinate of upper-right corner of original bounding box.
- * @y1: The new y coordinate of upper-right corner of original bounding box.
- * @x2: The new x coordinate of lower-left corner of original bounding box.
- * @y2: The new y coordinate of lower-left corner of original bounding box.
- * @x3: The new x coordinate of lower-right corner of original bounding box.
- * @y3: The new y coordinate of lower-right corner of original bounding box.
- * @transform_direction: Direction of transformation.
- * @interpolation: Type of interpolation.
- * @supersample: This parameter is ignored, supersampling is performed based on the interpolation type.
- * @recursion_level: Maximum recursion level used for supersampling (3 is a nice value).
- * @clip_result: How to clip results.
- *
- * Deprecated: Use gimp_item_transform_perspective() instead.
- *
- * Returns: The newly mapped drawable.
- *
- * Since: GIMP 2.2
- **/
- gint32
- gimp_drawable_transform_perspective (gint32 drawable_ID,
- gdouble x0,
- gdouble y0,
- gdouble x1,
- gdouble y1,
- gdouble x2,
- gdouble y2,
- gdouble x3,
- gdouble y3,
- GimpTransformDirection transform_direction,
- GimpInterpolationType interpolation,
- gboolean supersample,
- gint recursion_level,
- GimpTransformResize clip_result)
- {
- GimpParam *return_vals;
- gint nreturn_vals;
- gint32 ret_drawable_ID = -1;
- return_vals = gimp_run_procedure ("gimp-drawable-transform-perspective",
- &nreturn_vals,
- GIMP_PDB_DRAWABLE, drawable_ID,
- GIMP_PDB_FLOAT, x0,
- GIMP_PDB_FLOAT, y0,
- GIMP_PDB_FLOAT, x1,
- GIMP_PDB_FLOAT, y1,
- GIMP_PDB_FLOAT, x2,
- GIMP_PDB_FLOAT, y2,
- GIMP_PDB_FLOAT, x3,
- GIMP_PDB_FLOAT, y3,
- GIMP_PDB_INT32, transform_direction,
- GIMP_PDB_INT32, interpolation,
- GIMP_PDB_INT32, supersample,
- GIMP_PDB_INT32, recursion_level,
- GIMP_PDB_INT32, clip_result,
- GIMP_PDB_END);
- if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
- ret_drawable_ID = return_vals[1].data.d_drawable;
- gimp_destroy_params (return_vals, nreturn_vals);
- return ret_drawable_ID;
- }
- /**
- * gimp_drawable_transform_perspective_default:
- * @drawable_ID: The affected drawable.
- * @x0: The new x coordinate of upper-left corner of original bounding box.
- * @y0: The new y coordinate of upper-left corner of original bounding box.
- * @x1: The new x coordinate of upper-right corner of original bounding box.
- * @y1: The new y coordinate of upper-right corner of original bounding box.
- * @x2: The new x coordinate of lower-left corner of original bounding box.
- * @y2: The new y coordinate of lower-left corner of original bounding box.
- * @x3: The new x coordinate of lower-right corner of original bounding box.
- * @y3: The new y coordinate of lower-right corner of original bounding box.
- * @interpolate: Whether to use interpolation and supersampling.
- * @clip_result: How to clip results.
- *
- * Deprecated: Use gimp_item_transform_perspective() instead.
- *
- * Returns: The newly mapped drawable.
- *
- * Since: GIMP 2.2
- **/
- gint32
- gimp_drawable_transform_perspective_default (gint32 drawable_ID,
- gdouble x0,
- gdouble y0,
- gdouble x1,
- gdouble y1,
- gdouble x2,
- gdouble y2,
- gdouble x3,
- gdouble y3,
- gboolean interpolate,
- GimpTransformResize clip_result)
- {
- GimpParam *return_vals;
- gint nreturn_vals;
- gint32 ret_drawable_ID = -1;
- return_vals = gimp_run_procedure ("gimp-drawable-transform-perspective-default",
- &nreturn_vals,
- GIMP_PDB_DRAWABLE, drawable_ID,
- GIMP_PDB_FLOAT, x0,
- GIMP_PDB_FLOAT, y0,
- GIMP_PDB_FLOAT, x1,
- GIMP_PDB_FLOAT, y1,
- GIMP_PDB_FLOAT, x2,
- GIMP_PDB_FLOAT, y2,
- GIMP_PDB_FLOAT, x3,
- GIMP_PDB_FLOAT, y3,
- GIMP_PDB_INT32, interpolate,
- GIMP_PDB_INT32, clip_result,
- GIMP_PDB_END);
- if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
- ret_drawable_ID = return_vals[1].data.d_drawable;
- gimp_destroy_params (return_vals, nreturn_vals);
- return ret_drawable_ID;
- }
- /**
- * gimp_drawable_transform_rotate_simple:
- * @drawable_ID: The affected drawable.
- * @rotate_type: Type of rotation.
- * @auto_center: Whether to automatically rotate around the selection center.
- * @center_x: The hor. coordinate of the center of rotation.
- * @center_y: The vert. coordinate of the center of rotation.
- * @clip_result: Whether to clip results.
- *
- * Deprecated: Use gimp_item_transform_rotate_simple() instead.
- *
- * Returns: The rotated drawable.
- *
- * Since: GIMP 2.2
- **/
- gint32
- gimp_drawable_transform_rotate_simple (gint32 drawable_ID,
- GimpRotationType rotate_type,
- gboolean auto_center,
- gint center_x,
- gint center_y,
- gboolean clip_result)
- {
- GimpParam *return_vals;
- gint nreturn_vals;
- gint32 ret_drawable_ID = -1;
- return_vals = gimp_run_procedure ("gimp-drawable-transform-rotate-simple",
- &nreturn_vals,
- GIMP_PDB_DRAWABLE, drawable_ID,
- GIMP_PDB_INT32, rotate_type,
- GIMP_PDB_INT32, auto_center,
- GIMP_PDB_INT32, center_x,
- GIMP_PDB_INT32, center_y,
- GIMP_PDB_INT32, clip_result,
- GIMP_PDB_END);
- if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
- ret_drawable_ID = return_vals[1].data.d_drawable;
- gimp_destroy_params (return_vals, nreturn_vals);
- return ret_drawable_ID;
- }
- /**
- * gimp_drawable_transform_rotate:
- * @drawable_ID: The affected drawable.
- * @angle: The angle of rotation (radians).
- * @auto_center: Whether to automatically rotate around the selection center.
- * @center_x: The hor. coordinate of the center of rotation.
- * @center_y: The vert. coordinate of the center of rotation.
- * @transform_direction: Direction of transformation.
- * @interpolation: Type of interpolation.
- * @supersample: This parameter is ignored, supersampling is performed based on the interpolation type.
- * @recursion_level: Maximum recursion level used for supersampling (3 is a nice value).
- * @clip_result: How to clip results.
- *
- * Deprecated: Use gimp_item_transform_rotate() instead.
- *
- * Returns: The rotated drawable.
- *
- * Since: GIMP 2.2
- **/
- gint32
- gimp_drawable_transform_rotate (gint32 drawable_ID,
- gdouble angle,
- gboolean auto_center,
- gint center_x,
- gint center_y,
- GimpTransformDirection transform_direction,
- GimpInterpolationType interpolation,
- gboolean supersample,
- gint recursion_level,
- GimpTransformResize clip_result)
- {
- GimpParam *return_vals;
- gint nreturn_vals;
- gint32 ret_drawable_ID = -1;
- return_vals = gimp_run_procedure ("gimp-drawable-transform-rotate",
- &nreturn_vals,
- GIMP_PDB_DRAWABLE, drawable_ID,
- GIMP_PDB_FLOAT, angle,
- GIMP_PDB_INT32, auto_center,
- GIMP_PDB_INT32, center_x,
- GIMP_PDB_INT32, center_y,
- GIMP_PDB_INT32, transform_direction,
- GIMP_PDB_INT32, interpolation,
- GIMP_PDB_INT32, supersample,
- GIMP_PDB_INT32, recursion_level,
- GIMP_PDB_INT32, clip_result,
- GIMP_PDB_END);
- if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
- ret_drawable_ID = return_vals[1].data.d_drawable;
- gimp_destroy_params (return_vals, nreturn_vals);
- return ret_drawable_ID;
- }
- /**
- * gimp_drawable_transform_rotate_default:
- * @drawable_ID: The affected drawable.
- * @angle: The angle of rotation (radians).
- * @auto_center: Whether to automatically rotate around the selection center.
- * @center_x: The hor. coordinate of the center of rotation.
- * @center_y: The vert. coordinate of the center of rotation.
- * @interpolate: Whether to use interpolation and supersampling.
- * @clip_result: How to clip results.
- *
- * Deprecated: Use gimp_item_transform_rotate() instead.
- *
- * Returns: The rotated drawable.
- *
- * Since: GIMP 2.2
- **/
- gint32
- gimp_drawable_transform_rotate_default (gint32 drawable_ID,
- gdouble angle,
- gboolean auto_center,
- gint center_x,
- gint center_y,
- gboolean interpolate,
- GimpTransformResize clip_result)
- {
- GimpParam *return_vals;
- gint nreturn_vals;
- gint32 ret_drawable_ID = -1;
- return_vals = gimp_run_procedure ("gimp-drawable-transform-rotate-default",
- &nreturn_vals,
- GIMP_PDB_DRAWABLE, drawable_ID,
- GIMP_PDB_FLOAT, angle,
- GIMP_PDB_INT32, auto_center,
- GIMP_PDB_INT32, center_x,
- GIMP_PDB_INT32, center_y,
- GIMP_PDB_INT32, interpolate,
- GIMP_PDB_INT32, clip_result,
- GIMP_PDB_END);
- if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
- ret_drawable_ID = return_vals[1].data.d_drawable;
- gimp_destroy_params (return_vals, nreturn_vals);
- return ret_drawable_ID;
- }
- /**
- * gimp_drawable_transform_scale:
- * @drawable_ID: The affected drawable.
- * @x0: The new x coordinate of the upper-left corner of the scaled region.
- * @y0: The new y coordinate of the upper-left corner of the scaled region.
- * @x1: The new x coordinate of the lower-right corner of the scaled region.
- * @y1: The new y coordinate of the lower-right corner of the scaled region.
- * @transform_direction: Direction of transformation.
- * @interpolation: Type of interpolation.
- * @supersample: This parameter is ignored, supersampling is performed based on the interpolation type.
- * @recursion_level: Maximum recursion level used for supersampling (3 is a nice value).
- * @clip_result: How to clip results.
- *
- * Deprecated: Use gimp_item_transform_scale() instead.
- *
- * Returns: The scaled drawable.
- *
- * Since: GIMP 2.2
- **/
- gint32
- gimp_drawable_transform_scale (gint32 drawable_ID,
- gdouble x0,
- gdouble y0,
- gdouble x1,
- gdouble y1,
- GimpTransformDirection transform_direction,
- GimpInterpolationType interpolation,
- gboolean supersample,
- gint recursion_level,
- GimpTransformResize clip_result)
- {
- GimpParam *return_vals;
- gint nreturn_vals;
- gint32 ret_drawable_ID = -1;
- return_vals = gimp_run_procedure ("gimp-drawable-transform-scale",
- &nreturn_vals,
- GIMP_PDB_DRAWABLE, drawable_ID,
- GIMP_PDB_FLOAT, x0,
- GIMP_PDB_FLOAT, y0,
- GIMP_PDB_FLOAT, x1,
- GIMP_PDB_FLOAT, y1,
- GIMP_PDB_INT32, transform_direction,
- GIMP_PDB_INT32, interpolation,
- GIMP_PDB_INT32, supersample,
- GIMP_PDB_INT32, recursion_level,
- GIMP_PDB_INT32, clip_result,
- GIMP_PDB_END);
- if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
- ret_drawable_ID = return_vals[1].data.d_drawable;
- gimp_destroy_params (return_vals, nreturn_vals);
- return ret_drawable_ID;
- }
- /**
- * gimp_drawable_transform_scale_default:
- * @drawable_ID: The affected drawable.
- * @x0: The new x coordinate of the upper-left corner of the scaled region.
- * @y0: The new y coordinate of the upper-left corner of the scaled region.
- * @x1: The new x coordinate of the lower-right corner of the scaled region.
- * @y1: The new y coordinate of the lower-right corner of the scaled region.
- * @interpolate: Whether to use interpolation and supersampling.
- * @clip_result: How to clip results.
- *
- * Deprecated: Use gimp_item_transform_scale() instead.
- *
- * Returns: The scaled drawable.
- *
- * Since: GIMP 2.2
- **/
- gint32
- gimp_drawable_transform_scale_default (gint32 drawable_ID,
- gdouble x0,
- gdouble y0,
- gdouble x1,
- gdouble y1,
- gboolean interpolate,
- GimpTransformResize clip_result)
- {
- GimpParam *return_vals;
- gint nreturn_vals;
- gint32 ret_drawable_ID = -1;
- return_vals = gimp_run_procedure ("gimp-drawable-transform-scale-default",
- &nreturn_vals,
- GIMP_PDB_DRAWABLE, drawable_ID,
- GIMP_PDB_FLOAT, x0,
- GIMP_PDB_FLOAT, y0,
- GIMP_PDB_FLOAT, x1,
- GIMP_PDB_FLOAT, y1,
- GIMP_PDB_INT32, interpolate,
- GIMP_PDB_INT32, clip_result,
- GIMP_PDB_END);
- if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
- ret_drawable_ID = return_vals[1].data.d_drawable;
- gimp_destroy_params (return_vals, nreturn_vals);
- return ret_drawable_ID;
- }
- /**
- * gimp_drawable_transform_shear:
- * @drawable_ID: The affected drawable.
- * @shear_type: Type of shear.
- * @magnitude: The magnitude of the shear.
- * @transform_direction: Direction of transformation.
- * @interpolation: Type of interpolation.
- * @supersample: This parameter is ignored, supersampling is performed based on the interpolation type.
- * @recursion_level: Maximum recursion level used for supersampling (3 is a nice value).
- * @clip_result: How to clip results.
- *
- * Deprecated: Use gimp_item_transform_shear() instead.
- *
- * Returns: The sheared drawable.
- *
- * Since: GIMP 2.2
- **/
- gint32
- gimp_drawable_transform_shear (gint32 drawable_ID,
- GimpOrientationType shear_type,
- gdouble magnitude,
- GimpTransformDirection transform_direction,
- GimpInterpolationType interpolation,
- gboolean supersample,
- gint recursion_level,
- GimpTransformResize clip_result)
- {
- GimpParam *return_vals;
- gint nreturn_vals;
- gint32 ret_drawable_ID = -1;
- return_vals = gimp_run_procedure ("gimp-drawable-transform-shear",
- &nreturn_vals,
- GIMP_PDB_DRAWABLE, drawable_ID,
- GIMP_PDB_INT32, shear_type,
- GIMP_PDB_FLOAT, magnitude,
- GIMP_PDB_INT32, transform_direction,
- GIMP_PDB_INT32, interpolation,
- GIMP_PDB_INT32, supersample,
- GIMP_PDB_INT32, recursion_level,
- GIMP_PDB_INT32, clip_result,
- GIMP_PDB_END);
- if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
- ret_drawable_ID = return_vals[1].data.d_drawable;
- gimp_destroy_params (return_vals, nreturn_vals);
- return ret_drawable_ID;
- }
- /**
- * gimp_drawable_transform_shear_default:
- * @drawable_ID: The affected drawable.
- * @shear_type: Type of shear.
- * @magnitude: The magnitude of the shear.
- * @interpolate: Whether to use interpolation and supersampling.
- * @clip_result: How to clip results.
- *
- * Deprecated: Use gimp_item_transform_shear() instead.
- *
- * Returns: The sheared drawable.
- *
- * Since: GIMP 2.2
- **/
- gint32
- gimp_drawable_transform_shear_default (gint32 drawable_ID,
- GimpOrientationType shear_type,
- gdouble magnitude,
- gboolean interpolate,
- GimpTransformResize clip_result)
- {
- GimpParam *return_vals;
- gint nreturn_vals;
- gint32 ret_drawable_ID = -1;
- return_vals = gimp_run_procedure ("gimp-drawable-transform-shear-default",
- &nreturn_vals,
- GIMP_PDB_DRAWABLE, drawable_ID,
- GIMP_PDB_INT32, shear_type,
- GIMP_PDB_FLOAT, magnitude,
- GIMP_PDB_INT32, interpolate,
- GIMP_PDB_INT32, clip_result,
- GIMP_PDB_END);
- if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
- ret_drawable_ID = return_vals[1].data.d_drawable;
- gimp_destroy_params (return_vals, nreturn_vals);
- return ret_drawable_ID;
- }
- /**
- * gimp_drawable_transform_2d:
- * @drawable_ID: The affected drawable.
- * @source_x: X coordinate of the transformation center.
- * @source_y: Y coordinate of the transformation center.
- * @scale_x: Amount to scale in x direction.
- * @scale_y: Amount to scale in y direction.
- * @angle: The angle of rotation (radians).
- * @dest_x: X coordinate of where the center goes.
- * @dest_y: Y coordinate of where the center goes.
- * @transform_direction: Direction of transformation.
- * @interpolation: Type of interpolation.
- * @supersample: This parameter is ignored, supersampling is performed based on the interpolation type.
- * @recursion_level: Maximum recursion level used for supersampling (3 is a nice value).
- * @clip_result: How to clip results.
- *
- * Deprecated: Use gimp_item_transform_2d() instead.
- *
- * Returns: The transformed drawable.
- *
- * Since: GIMP 2.2
- **/
- gint32
- gimp_drawable_transform_2d (gint32 drawable_ID,
- gdouble source_x,
- gdouble source_y,
- gdouble scale_x,
- gdouble scale_y,
- gdouble angle,
- gdouble dest_x,
- gdouble dest_y,
- GimpTransformDirection transform_direction,
- GimpInterpolationType interpolation,
- gboolean supersample,
- gint recursion_level,
- GimpTransformResize clip_result)
- {
- GimpParam *return_vals;
- gint nreturn_vals;
- gint32 ret_drawable_ID = -1;
- return_vals = gimp_run_procedure ("gimp-drawable-transform-2d",
- &nreturn_vals,
- GIMP_PDB_DRAWABLE, drawable_ID,
- GIMP_PDB_FLOAT, source_x,
- GIMP_PDB_FLOAT, source_y,
- GIMP_PDB_FLOAT, scale_x,
- GIMP_PDB_FLOAT, scale_y,
- GIMP_PDB_FLOAT, angle,
- GIMP_PDB_FLOAT, dest_x,
- GIMP_PDB_FLOAT, dest_y,
- GIMP_PDB_INT32, transform_direction,
- GIMP_PDB_INT32, interpolation,
- GIMP_PDB_INT32, supersample,
- GIMP_PDB_INT32, recursion_level,
- GIMP_PDB_INT32, clip_result,
- GIMP_PDB_END);
- if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
- ret_drawable_ID = return_vals[1].data.d_drawable;
- gimp_destroy_params (return_vals, nreturn_vals);
- return ret_drawable_ID;
- }
- /**
- * gimp_drawable_transform_2d_default:
- * @drawable_ID: The affected drawable.
- * @source_x: X coordinate of the transformation center.
- * @source_y: Y coordinate of the transformation center.
- * @scale_x: Amount to scale in x direction.
- * @scale_y: Amount to scale in y direction.
- * @angle: The angle of rotation (radians).
- * @dest_x: X coordinate of where the center goes.
- * @dest_y: Y coordinate of where the center goes.
- * @interpolate: Whether to use interpolation and supersampling.
- * @clip_result: How to clip results.
- *
- * Deprecated: Use gimp_item_transform_2d() instead.
- *
- * Returns: The transformed drawable.
- *
- * Since: GIMP 2.2
- **/
- gint32
- gimp_drawable_transform_2d_default (gint32 drawable_ID,
- gdouble source_x,
- gdouble source_y,
- gdouble scale_x,
- gdouble scale_y,
- gdouble angle,
- gdouble dest_x,
- gdouble dest_y,
- gboolean interpolate,
- GimpTransformResize clip_result)
- {
- GimpParam *return_vals;
- gint nreturn_vals;
- gint32 ret_drawable_ID = -1;
- return_vals = gimp_run_procedure ("gimp-drawable-transform-2d-default",
- &nreturn_vals,
- GIMP_PDB_DRAWABLE, drawable_ID,
- GIMP_PDB_FLOAT, source_x,
- GIMP_PDB_FLOAT, source_y,
- GIMP_PDB_FLOAT, scale_x,
- GIMP_PDB_FLOAT, scale_y,
- GIMP_PDB_FLOAT, angle,
- GIMP_PDB_FLOAT, dest_x,
- GIMP_PDB_FLOAT, dest_y,
- GIMP_PDB_INT32, interpolate,
- GIMP_PDB_INT32, clip_result,
- GIMP_PDB_END);
- if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
- ret_drawable_ID = return_vals[1].data.d_drawable;
- gimp_destroy_params (return_vals, nreturn_vals);
- return ret_drawable_ID;
- }
- /**
- * gimp_drawable_transform_matrix:
- * @drawable_ID: The affected drawable.
- * @coeff_0_0: coefficient (0,0) of the transformation matrix.
- * @coeff_0_1: coefficient (0,1) of the transformation matrix.
- * @coeff_0_2: coefficient (0,2) of the transformation matrix.
- * @coeff_1_0: coefficient (1,0) of the transformation matrix.
- * @coeff_1_1: coefficient (1,1) of the transformation matrix.
- * @coeff_1_2: coefficient (1,2) of the transformation matrix.
- * @coeff_2_0: coefficient (2,0) of the transformation matrix.
- * @coeff_2_1: coefficient (2,1) of the transformation matrix.
- * @coeff_2_2: coefficient (2,2) of the transformation matrix.
- * @transform_direction: Direction of transformation.
- * @interpolation: Type of interpolation.
- * @supersample: This parameter is ignored, supersampling is performed based on the interpolation type.
- * @recursion_level: Maximum recursion level used for supersampling (3 is a nice value).
- * @clip_result: How to clip results.
- *
- * Deprecated: Use gimp_item_transform_matrix() instead.
- *
- * Returns: The transformed drawable.
- *
- * Since: GIMP 2.2
- **/
- gint32
- gimp_drawable_transform_matrix (gint32 drawable_ID,
- gdouble coeff_0_0,
- gdouble coeff_0_1,
- gdouble coeff_0_2,
- gdouble coeff_1_0,
- gdouble coeff_1_1,
- gdouble coeff_1_2,
- gdouble coeff_2_0,
- gdouble coeff_2_1,
- gdouble coeff_2_2,
- GimpTransformDirection transform_direction,
- GimpInterpolationType interpolation,
- gboolean supersample,
- gint recursion_level,
- GimpTransformResize clip_result)
- {
- GimpParam *return_vals;
- gint nreturn_vals;
- gint32 ret_drawable_ID = -1;
- return_vals = gimp_run_procedure ("gimp-drawable-transform-matrix",
- &nreturn_vals,
- GIMP_PDB_DRAWABLE, drawable_ID,
- GIMP_PDB_FLOAT, coeff_0_0,
- GIMP_PDB_FLOAT, coeff_0_1,
- GIMP_PDB_FLOAT, coeff_0_2,
- GIMP_PDB_FLOAT, coeff_1_0,
- GIMP_PDB_FLOAT, coeff_1_1,
- GIMP_PDB_FLOAT, coeff_1_2,
- GIMP_PDB_FLOAT, coeff_2_0,
- GIMP_PDB_FLOAT, coeff_2_1,
- GIMP_PDB_FLOAT, coeff_2_2,
- GIMP_PDB_INT32, transform_direction,
- GIMP_PDB_INT32, interpolation,
- GIMP_PDB_INT32, supersample,
- GIMP_PDB_INT32, recursion_level,
- GIMP_PDB_INT32, clip_result,
- GIMP_PDB_END);
- if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
- ret_drawable_ID = return_vals[1].data.d_drawable;
- gimp_destroy_params (return_vals, nreturn_vals);
- return ret_drawable_ID;
- }
- /**
- * gimp_drawable_transform_matrix_default:
- * @drawable_ID: The affected drawable.
- * @coeff_0_0: coefficient (0,0) of the transformation matrix.
- * @coeff_0_1: coefficient (0,1) of the transformation matrix.
- * @coeff_0_2: coefficient (0,2) of the transformation matrix.
- * @coeff_1_0: coefficient (1,0) of the transformation matrix.
- * @coeff_1_1: coefficient (1,1) of the transformation matrix.
- * @coeff_1_2: coefficient (1,2) of the transformation matrix.
- * @coeff_2_0: coefficient (2,0) of the transformation matrix.
- * @coeff_2_1: coefficient (2,1) of the transformation matrix.
- * @coeff_2_2: coefficient (2,2) of the transformation matrix.
- * @interpolate: Whether to use interpolation and supersampling.
- * @clip_result: How to clip results.
- *
- * Deprecated: Use gimp_item_transform_matrix() instead.
- *
- * Returns: The transformed drawable.
- *
- * Since: GIMP 2.2
- **/
- gint32
- gimp_drawable_transform_matrix_default (gint32 drawable_ID,
- gdouble coeff_0_0,
- gdouble coeff_0_1,
- gdouble coeff_0_2,
- gdouble coeff_1_0,
- gdouble coeff_1_1,
- gdouble coeff_1_2,
- gdouble coeff_2_0,
- gdouble coeff_2_1,
- gdouble coeff_2_2,
- gboolean interpolate,
- GimpTransformResize clip_result)
- {
- GimpParam *return_vals;
- gint nreturn_vals;
- gint32 ret_drawable_ID = -1;
- return_vals = gimp_run_procedure ("gimp-drawable-transform-matrix-default",
- &nreturn_vals,
- GIMP_PDB_DRAWABLE, drawable_ID,
- GIMP_PDB_FLOAT, coeff_0_0,
- GIMP_PDB_FLOAT, coeff_0_1,
- GIMP_PDB_FLOAT, coeff_0_2,
- GIMP_PDB_FLOAT, coeff_1_0,
- GIMP_PDB_FLOAT, coeff_1_1,
- GIMP_PDB_FLOAT, coeff_1_2,
- GIMP_PDB_FLOAT, coeff_2_0,
- GIMP_PDB_FLOAT, coeff_2_1,
- GIMP_PDB_FLOAT, coeff_2_2,
- GIMP_PDB_INT32, interpolate,
- GIMP_PDB_INT32, clip_result,
- GIMP_PDB_END);
- if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
- ret_drawable_ID = return_vals[1].data.d_drawable;
- gimp_destroy_params (return_vals, nreturn_vals);
- return ret_drawable_ID;
- }
|