mirror of https://github.com/GNOME/gimp.git
app/core/Makefile.am app/core/gimp-transform-resize.c
2006-12-24 Mukund Sivaraman <muks@mukund.org> * app/core/Makefile.am * app/core/gimp-transform-resize.c * app/core/gimpchannel.c * app/core/gimpdrawable-transform.c * app/core/gimpdrawable-transform.h * app/core/gimpdrawable.c * app/core/gimpimage-item-list.c * app/core/gimpimage-item-list.h * app/core/gimpitem-linked.c * app/core/gimpitem-linked.h * app/core/gimpitem.c * app/core/gimpitem.h * app/core/gimplayer.c * app/pdb/drawable_transform_cmds.c * app/text/gimptextlayer-transform.c * app/text/gimptextlayer-transform.h * app/tools/gimptransformoptions.c * app/tools/gimptransformtool.c * app/vectors/gimpvectors.c * libgimp/gimpdrawabletransform_pdb.c * libgimp/gimpdrawabletransform_pdb.h * libgimp/gimpenums.c.tail * libgimpbase/gimpbase.def * libgimpbase/gimpbaseenums.c * libgimpbase/gimpbaseenums.h * tools/pdbgen/enums.pl * tools/pdbgen/pdb/drawable_transform.pdb: implemented UI and PDB for new clipping modes for affine transforms (crop to largest rectangle, and crop to largest rectangle with the source's aspect ratio); fixed various bugs in the largest rectangle computation code; set padding to 6 in the transformation tool options.
This commit is contained in:
parent
6dad38a57c
commit
f0cff0ff92
34
ChangeLog
34
ChangeLog
|
@ -1,3 +1,37 @@
|
|||
2006-12-24 Mukund Sivaraman <muks@mukund.org>
|
||||
|
||||
* app/core/Makefile.am
|
||||
* app/core/gimp-transform-resize.c
|
||||
* app/core/gimpchannel.c
|
||||
* app/core/gimpdrawable-transform.c
|
||||
* app/core/gimpdrawable-transform.h
|
||||
* app/core/gimpdrawable.c
|
||||
* app/core/gimpimage-item-list.c
|
||||
* app/core/gimpimage-item-list.h
|
||||
* app/core/gimpitem-linked.c
|
||||
* app/core/gimpitem-linked.h
|
||||
* app/core/gimpitem.c
|
||||
* app/core/gimpitem.h
|
||||
* app/core/gimplayer.c
|
||||
* app/pdb/drawable_transform_cmds.c
|
||||
* app/text/gimptextlayer-transform.c
|
||||
* app/text/gimptextlayer-transform.h
|
||||
* app/tools/gimptransformoptions.c
|
||||
* app/tools/gimptransformtool.c
|
||||
* app/vectors/gimpvectors.c
|
||||
* libgimp/gimpdrawabletransform_pdb.c
|
||||
* libgimp/gimpdrawabletransform_pdb.h
|
||||
* libgimp/gimpenums.c.tail
|
||||
* libgimpbase/gimpbase.def
|
||||
* libgimpbase/gimpbaseenums.c
|
||||
* libgimpbase/gimpbaseenums.h
|
||||
* tools/pdbgen/enums.pl
|
||||
* tools/pdbgen/pdb/drawable_transform.pdb: implemented UI and PDB
|
||||
for new clipping modes for affine transforms (crop to largest
|
||||
rectangle, and crop to largest rectangle with the source's aspect
|
||||
ratio); fixed various bugs in the largest rectangle computation
|
||||
code; set padding to 6 in the transformation tool options.
|
||||
|
||||
2006-12-22 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* data/tips/gimp-tips.xml.in: another tips change (bug #141443).
|
||||
|
|
|
@ -39,6 +39,8 @@ libappcore_a_sources = \
|
|||
gimp-templates.h \
|
||||
gimp-transform-region.c \
|
||||
gimp-transform-region.h \
|
||||
gimp-transform-resize.c \
|
||||
gimp-transform-resize.h \
|
||||
gimp-transform-utils.c \
|
||||
gimp-transform-utils.h \
|
||||
gimp-units.c \
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
|
||||
typedef struct
|
||||
{
|
||||
gdouble x, y;
|
||||
gint x, y;
|
||||
} Point;
|
||||
|
||||
typedef struct
|
||||
|
@ -102,14 +102,14 @@ gimp_transform_resize_boundary (const GimpMatrix3 *inv,
|
|||
gdouble dy1, dy2, dy3, dy4;
|
||||
|
||||
g_return_if_fail (inv != NULL);
|
||||
|
||||
|
||||
/* initialize with the original boundary */
|
||||
*x1 = u1;
|
||||
*y1 = v1;
|
||||
*x2 = u2;
|
||||
*y2 = v2;
|
||||
|
||||
if (resize == GIMP_TRANSFORM_SIZE_CLIP)
|
||||
|
||||
if (resize == GIMP_TRANSFORM_RESIZE_CLIP)
|
||||
return;
|
||||
|
||||
gimp_matrix3_transform_point (inv, u1, v1, &dx1, &dy1);
|
||||
|
@ -124,25 +124,31 @@ gimp_transform_resize_boundary (const GimpMatrix3 *inv,
|
|||
! FINITE (dx4) || ! FINITE (dy4))
|
||||
{
|
||||
g_warning ("invalid transform matrix");
|
||||
resize = GIMP_TRANSFORM_SIZE_CLIP;
|
||||
resize = GIMP_TRANSFORM_RESIZE_CLIP;
|
||||
}
|
||||
|
||||
switch (resize)
|
||||
{
|
||||
case GIMP_TRANSFORM_SIZE_ADJUST:
|
||||
case GIMP_TRANSFORM_RESIZE_ADJUST:
|
||||
gimp_transform_resize_adjust (dx1, dy1, dx2, dy2, dx3, dy3, dx4, dy4,
|
||||
x1, y1, x2, y2);
|
||||
break;
|
||||
|
||||
case GIMP_TRANSFORM_SIZE_CLIP:
|
||||
case GIMP_TRANSFORM_RESIZE_CLIP:
|
||||
/* we are all done already */
|
||||
break;
|
||||
|
||||
case GIMP_TRANSFORM_SIZE_CROP:
|
||||
case GIMP_TRANSFORM_RESIZE_CROP:
|
||||
gimp_transform_resize_crop (dx1, dy1, dx2, dy2, dx3, dy3, dx4, dy4,
|
||||
0.0,
|
||||
x1, y1, x2, y2);
|
||||
break;
|
||||
|
||||
case GIMP_TRANSFORM_RESIZE_CROP_WITH_ASPECT:
|
||||
gimp_transform_resize_crop (dx1, dy1, dx2, dy2, dx3, dy3, dx4, dy4,
|
||||
((gdouble) u2 - u1) / (v2 - v1),
|
||||
x1, y1, x2, y2);
|
||||
break;
|
||||
}
|
||||
|
||||
if (*x1 == *x2)
|
||||
|
@ -178,16 +184,23 @@ edge_init (Edge *edge,
|
|||
const Point *p,
|
||||
const Point *q)
|
||||
{
|
||||
edge->xmin = MIN (ceil (p->x), ceil (q->x));
|
||||
edge->xmax = MAX (floor (p->x), floor (q->x));
|
||||
gdouble den;
|
||||
|
||||
edge->ymin = MIN (ceil (p->y), ceil (q->y));
|
||||
edge->ymax = MAX (floor (p->y), floor (q->y));
|
||||
edge->xmin = MIN ( (p->x), (q->x));
|
||||
edge->xmax = MAX ( (p->x), (q->x));
|
||||
|
||||
edge->ymin = MIN ( (p->y), (q->y));
|
||||
edge->ymax = MAX ( (p->y), (q->y));
|
||||
|
||||
edge->top = p->x > q->x;
|
||||
edge->right = p->y > q->y;
|
||||
|
||||
edge->m = (q->y - p->y) / (q->x - p->x);
|
||||
den = q->x - p->x;
|
||||
|
||||
if (den == 0)
|
||||
den = 0.001;
|
||||
|
||||
edge->m = ((gdouble) q->y - p->y) / den;
|
||||
edge->b = p->y - edge->m * p->x;
|
||||
}
|
||||
|
||||
|
@ -258,6 +271,10 @@ gimp_transform_resize_crop (gdouble dx1,
|
|||
gint *y2)
|
||||
{
|
||||
Point points[4];
|
||||
gint ax, ay;
|
||||
int min;
|
||||
gint tx, ty;
|
||||
|
||||
Edge edges[4];
|
||||
const Point *a;
|
||||
const Point *b;
|
||||
|
@ -273,16 +290,104 @@ gimp_transform_resize_crop (gdouble dx1,
|
|||
gint i;
|
||||
|
||||
/* fill in the points array */
|
||||
points[0].x = dx1;
|
||||
points[0].y = dy1;
|
||||
points[1].x = dx2;
|
||||
points[1].y = dy2;
|
||||
points[2].x = dx3;
|
||||
points[2].y = dy3;
|
||||
points[3].x = dx4;
|
||||
points[3].y = dy4;
|
||||
points[0].x = floor (dx1);
|
||||
points[0].y = floor (dy1);
|
||||
points[1].x = floor (dx2);
|
||||
points[1].y = floor (dy2);
|
||||
points[2].x = floor (dx3);
|
||||
points[2].y = floor (dy3);
|
||||
points[3].x = floor (dx4);
|
||||
points[3].y = floor (dy4);
|
||||
|
||||
/* first, translate the vertices into the first quadrant */
|
||||
|
||||
/* create an array of edges */
|
||||
ax = 0;
|
||||
ay = 0;
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
if (points[i].x < ax)
|
||||
ax = points[i].x;
|
||||
if (points[i].y < ay)
|
||||
ay = points[i].y;
|
||||
}
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
points[i].x += (-ax) * 2;
|
||||
points[i].y += (-ay) * 2;
|
||||
}
|
||||
|
||||
/* find the convex hull using Jarvis's March as the points are passed
|
||||
* in different orders due to gimp_matrix3_transform_point()
|
||||
*/
|
||||
|
||||
min = 0;
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
if (points[i].y < points[min].y)
|
||||
min = i;
|
||||
}
|
||||
|
||||
tx = points[0].x;
|
||||
ty = points[0].y;
|
||||
|
||||
points[0].x = points[min].x;
|
||||
points[0].y = points[min].y;
|
||||
|
||||
points[min].x = tx;
|
||||
points[min].y = ty;
|
||||
|
||||
for (i = 1; i < 4; i++)
|
||||
{
|
||||
gdouble theta, theta_m = 2 * G_PI;
|
||||
gdouble theta_v = 0;
|
||||
gint j;
|
||||
|
||||
min = 3;
|
||||
|
||||
for (j = i; j < 4; j++)
|
||||
{
|
||||
gdouble sy = points[j].y - points[i - 1].y;
|
||||
gdouble sx = points[j].x - points[i - 1].x;
|
||||
theta = atan2 (sy, sx);
|
||||
|
||||
if ((theta < theta_m) && ((theta > theta_v) || ((theta == theta_v) && (sx > 0))))
|
||||
{
|
||||
theta_m = theta;
|
||||
min = j;
|
||||
}
|
||||
}
|
||||
|
||||
theta_v = theta_m;
|
||||
|
||||
tx = points[i].x;
|
||||
ty = points[i].y;
|
||||
|
||||
points[i].x = points[min].x;
|
||||
points[i].y = points[min].y;
|
||||
|
||||
points[min].x = tx;
|
||||
points[min].y = ty;
|
||||
}
|
||||
|
||||
/* reverse the order of points */
|
||||
|
||||
tx = points[0].x; ty = points[0].y;
|
||||
points[0].x = points[3].x; points[0].y = points[3].y;
|
||||
points[3].x = tx; points[3].y = ty;
|
||||
|
||||
tx = points[1].x; ty = points[1].y;
|
||||
points[1].x = points[2].x; points[1].y = points[2].y;
|
||||
points[2].x = tx; points[2].y = ty;
|
||||
|
||||
|
||||
/* now, find the largest rectangle using the method described in
|
||||
* "Computing the Largest Inscribed Isothetic Rectangle" by
|
||||
* D. Hsu, J. Snoeyink, et al.
|
||||
*/
|
||||
|
||||
/* first create an array of edges */
|
||||
|
||||
cxmin = cxmax = points[3].x;
|
||||
cymin = cymax = points[3].y;
|
||||
|
@ -330,9 +435,9 @@ gimp_transform_resize_crop (gdouble dx1,
|
|||
ymin = intersect_y (top, xi);
|
||||
ymax = intersect_y (bottom, xi);
|
||||
|
||||
for (ylo = ymax; ylo >= ymin; ylo--)
|
||||
for (ylo = ymax; ylo > ymin; ylo--)
|
||||
{
|
||||
for (yhi = ymin; yhi <= ymax; yhi++)
|
||||
for (yhi = ymin; yhi < ymax; yhi++)
|
||||
{
|
||||
if (yhi > ylo)
|
||||
{
|
||||
|
@ -364,7 +469,7 @@ gimp_transform_resize_crop (gdouble dx1,
|
|||
if (area > maxarea)
|
||||
{
|
||||
maxarea = area;
|
||||
|
||||
|
||||
*x1 = xi;
|
||||
*y1 = ylo;
|
||||
*x2 = xi + width;
|
||||
|
@ -382,4 +487,11 @@ gimp_transform_resize_crop (gdouble dx1,
|
|||
}
|
||||
|
||||
g_free (xint);
|
||||
|
||||
/* translate back the vertices */
|
||||
|
||||
*x1 = *x1 - ((-ax) * 2);
|
||||
*y1 = *y1 - ((-ay) * 2);
|
||||
*x2 = *x2 - ((-ax) * 2);
|
||||
*y2 = *y2 - ((-ay) * 2);
|
||||
}
|
||||
|
|
|
@ -116,7 +116,7 @@ static void gimp_channel_transform (GimpItem *item,
|
|||
GimpInterpolationType interpolation_type,
|
||||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result,
|
||||
GimpTransformResize clip_result,
|
||||
GimpProgress *progress);
|
||||
static gboolean gimp_channel_stroke (GimpItem *item,
|
||||
GimpDrawable *drawable,
|
||||
|
@ -654,7 +654,7 @@ gimp_channel_transform (GimpItem *item,
|
|||
GimpInterpolationType interpolation_type,
|
||||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result,
|
||||
GimpTransformResize clip_result,
|
||||
GimpProgress *progress)
|
||||
{
|
||||
if (G_TYPE_FROM_INSTANCE (item) == GIMP_TYPE_CHANNEL)
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
|
||||
#include "gimp.h"
|
||||
#include "gimp-transform-region.h"
|
||||
#include "gimp-transform-resize.h"
|
||||
#include "gimpchannel.h"
|
||||
#include "gimpcontext.h"
|
||||
#include "gimpdrawable-transform.h"
|
||||
|
@ -75,7 +76,7 @@ gimp_drawable_transform_tiles_affine (GimpDrawable *drawable,
|
|||
GimpInterpolationType interpolation_type,
|
||||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result,
|
||||
GimpTransformResize clip_result,
|
||||
GimpProgress *progress)
|
||||
{
|
||||
GimpImage *image;
|
||||
|
@ -118,56 +119,12 @@ gimp_drawable_transform_tiles_affine (GimpDrawable *drawable,
|
|||
/* Always clip unfloated tiles since they must keep their size */
|
||||
if (G_TYPE_FROM_INSTANCE (drawable) == GIMP_TYPE_CHANNEL &&
|
||||
tile_manager_bpp (orig_tiles) == 1)
|
||||
clip_result = TRUE;
|
||||
clip_result = GIMP_TRANSFORM_RESIZE_CLIP;
|
||||
|
||||
/* Find the bounding coordinates of target */
|
||||
if (clip_result)
|
||||
{
|
||||
x1 = u1;
|
||||
y1 = v1;
|
||||
x2 = u2;
|
||||
y2 = v2;
|
||||
}
|
||||
else
|
||||
{
|
||||
gdouble dx1, dy1;
|
||||
gdouble dx2, dy2;
|
||||
gdouble dx3, dy3;
|
||||
gdouble dx4, dy4;
|
||||
|
||||
gimp_matrix3_transform_point (&inv, u1, v1, &dx1, &dy1);
|
||||
gimp_matrix3_transform_point (&inv, u2, v1, &dx2, &dy2);
|
||||
gimp_matrix3_transform_point (&inv, u1, v2, &dx3, &dy3);
|
||||
gimp_matrix3_transform_point (&inv, u2, v2, &dx4, &dy4);
|
||||
|
||||
if (! FINITE (dx1) || ! FINITE (dy1) ||
|
||||
! FINITE (dx2) || ! FINITE (dy2) ||
|
||||
! FINITE (dx3) || ! FINITE (dy3) ||
|
||||
! FINITE (dx4) || ! FINITE (dy4))
|
||||
{
|
||||
/* fallback to clip_result if the passed matrix is broken */
|
||||
|
||||
x1 = u1;
|
||||
y1 = v1;
|
||||
x2 = u2;
|
||||
y2 = v2;
|
||||
}
|
||||
else
|
||||
{
|
||||
x1 = (gint) floor (MIN4 (dx1, dx2, dx3, dx4));
|
||||
y1 = (gint) floor (MIN4 (dy1, dy2, dy3, dy4));
|
||||
|
||||
x2 = (gint) ceil (MAX4 (dx1, dx2, dx3, dx4));
|
||||
y2 = (gint) ceil (MAX4 (dy1, dy2, dy3, dy4));
|
||||
|
||||
if (x1 == x2)
|
||||
x2++;
|
||||
|
||||
if (y1 == y2)
|
||||
y2++;
|
||||
}
|
||||
}
|
||||
|
||||
gimp_transform_resize_boundary (&inv, clip_result, u1, v1, u2, v2,
|
||||
&x1, &y1, &x2, &y2);
|
||||
|
||||
/* Get the new temporary buffer for the transformed result */
|
||||
new_tiles = tile_manager_new (x2 - x1, y2 - y1,
|
||||
tile_manager_bpp (orig_tiles));
|
||||
|
@ -581,7 +538,7 @@ gimp_drawable_transform_affine (GimpDrawable *drawable,
|
|||
GimpInterpolationType interpolation_type,
|
||||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result,
|
||||
GimpTransformResize clip_result,
|
||||
GimpProgress *progress)
|
||||
{
|
||||
GimpImage *image;
|
||||
|
@ -610,7 +567,7 @@ gimp_drawable_transform_affine (GimpDrawable *drawable,
|
|||
|
||||
/* always clip unfloated tiles so they keep their size */
|
||||
if (GIMP_IS_CHANNEL (drawable) && tile_manager_bpp (orig_tiles) == 1)
|
||||
clip_result = TRUE;
|
||||
clip_result = GIMP_TRANSFORM_RESIZE_CLIP;
|
||||
|
||||
/* transform the buffer */
|
||||
new_tiles = gimp_drawable_transform_tiles_affine (drawable, context,
|
||||
|
|
|
@ -41,7 +41,7 @@ TileManager * gimp_drawable_transform_tiles_affine (GimpDrawable *draw
|
|||
GimpInterpolationType interpolation_type,
|
||||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result,
|
||||
GimpTransformResize clip_result,
|
||||
GimpProgress *progress);
|
||||
TileManager * gimp_drawable_transform_tiles_flip (GimpDrawable *drawable,
|
||||
GimpContext *context,
|
||||
|
@ -65,7 +65,7 @@ gboolean gimp_drawable_transform_affine (GimpDrawable *draw
|
|||
GimpInterpolationType interpolation_type,
|
||||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result,
|
||||
GimpTransformResize clip_result,
|
||||
GimpProgress *progress);
|
||||
|
||||
gboolean gimp_drawable_transform_flip (GimpDrawable *drawable,
|
||||
|
|
|
@ -112,7 +112,7 @@ static void gimp_drawable_transform (GimpItem *item,
|
|||
GimpInterpolationType interpolation_type,
|
||||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result,
|
||||
GimpTransformResize clip_result,
|
||||
GimpProgress *progress);
|
||||
|
||||
static guchar * gimp_drawable_get_color_at (GimpPickable *pickable,
|
||||
|
@ -558,7 +558,7 @@ gimp_drawable_transform (GimpItem *item,
|
|||
GimpInterpolationType interpolation_type,
|
||||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result,
|
||||
GimpTransformResize clip_result,
|
||||
GimpProgress *progress)
|
||||
{
|
||||
GimpDrawable *drawable = GIMP_DRAWABLE (item);
|
||||
|
|
|
@ -123,7 +123,7 @@ gimp_image_item_list_transform (GimpImage *image,
|
|||
GimpInterpolationType interpolation_type,
|
||||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result,
|
||||
GimpTransformResize clip_result,
|
||||
GimpProgress *progress)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_IMAGE (image));
|
||||
|
|
|
@ -46,7 +46,7 @@ void gimp_image_item_list_transform (GimpImage *image,
|
|||
GimpInterpolationType interpolation_type,
|
||||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result,
|
||||
GimpTransformResize clip_result,
|
||||
GimpProgress *progress);
|
||||
|
||||
GList * gimp_image_item_list_get_list (GimpImage *image,
|
||||
|
|
|
@ -122,7 +122,7 @@ gimp_item_linked_transform (GimpItem *item,
|
|||
GimpInterpolationType interpolation_type,
|
||||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result,
|
||||
GimpTransformResize clip_result,
|
||||
GimpProgress *progress)
|
||||
{
|
||||
GList *list;
|
||||
|
|
|
@ -42,7 +42,7 @@ void gimp_item_linked_transform (GimpItem *item,
|
|||
GimpInterpolationType interpolation_type,
|
||||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result,
|
||||
GimpTransformResize clip_result,
|
||||
GimpProgress *progress);
|
||||
|
||||
|
||||
|
|
|
@ -976,7 +976,7 @@ gimp_item_transform (GimpItem *item,
|
|||
GimpInterpolationType interpolation,
|
||||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result,
|
||||
GimpTransformResize clip_result,
|
||||
GimpProgress *progress)
|
||||
{
|
||||
GimpItemClass *item_class;
|
||||
|
|
|
@ -107,7 +107,7 @@ struct _GimpItemClass
|
|||
GimpInterpolationType interpolation_type,
|
||||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result,
|
||||
GimpTransformResize clip_result,
|
||||
GimpProgress *progress);
|
||||
gboolean (* stroke) (GimpItem *item,
|
||||
GimpDrawable *drawable,
|
||||
|
@ -208,7 +208,7 @@ void gimp_item_transform (GimpItem *item,
|
|||
GimpInterpolationType interpolation_type,
|
||||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result,
|
||||
GimpTransformResize clip_result,
|
||||
GimpProgress *progress);
|
||||
|
||||
gboolean gimp_item_stroke (GimpItem *item,
|
||||
|
|
|
@ -135,7 +135,7 @@ static void gimp_layer_transform (GimpItem *item,
|
|||
GimpInterpolationType interpolation_type,
|
||||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result,
|
||||
GimpTransformResize clip_result,
|
||||
GimpProgress *progress);
|
||||
static void gimp_layer_invalidate_boundary (GimpDrawable *drawable);
|
||||
static void gimp_layer_get_active_components (const GimpDrawable *drawable,
|
||||
|
@ -778,7 +778,7 @@ gimp_layer_transform (GimpItem *item,
|
|||
GimpInterpolationType interpolation_type,
|
||||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result,
|
||||
GimpTransformResize clip_result,
|
||||
GimpProgress *progress)
|
||||
{
|
||||
GimpLayer *layer = GIMP_LAYER (item);
|
||||
|
|
|
@ -259,7 +259,7 @@ drawable_transform_perspective_invoker (GimpProcedure *procedure,
|
|||
gint32 interpolation;
|
||||
gboolean supersample;
|
||||
gint32 recursion_level;
|
||||
gboolean clip_result;
|
||||
gint32 clip_result;
|
||||
|
||||
drawable = gimp_value_get_drawable (&args->values[0], gimp);
|
||||
x0 = g_value_get_double (&args->values[1]);
|
||||
|
@ -274,7 +274,7 @@ drawable_transform_perspective_invoker (GimpProcedure *procedure,
|
|||
interpolation = g_value_get_enum (&args->values[10]);
|
||||
supersample = g_value_get_boolean (&args->values[11]);
|
||||
recursion_level = g_value_get_int (&args->values[12]);
|
||||
clip_result = g_value_get_boolean (&args->values[13]);
|
||||
clip_result = g_value_get_enum (&args->values[13]);
|
||||
|
||||
if (success)
|
||||
{
|
||||
|
@ -342,7 +342,7 @@ drawable_transform_perspective_default_invoker (GimpProcedure *procedure,
|
|||
gdouble x3;
|
||||
gdouble y3;
|
||||
gboolean interpolate;
|
||||
gboolean clip_result;
|
||||
gint32 clip_result;
|
||||
|
||||
drawable = gimp_value_get_drawable (&args->values[0], gimp);
|
||||
x0 = g_value_get_double (&args->values[1]);
|
||||
|
@ -354,7 +354,7 @@ drawable_transform_perspective_default_invoker (GimpProcedure *procedure,
|
|||
x3 = g_value_get_double (&args->values[7]);
|
||||
y3 = g_value_get_double (&args->values[8]);
|
||||
interpolate = g_value_get_boolean (&args->values[9]);
|
||||
clip_result = g_value_get_boolean (&args->values[10]);
|
||||
clip_result = g_value_get_enum (&args->values[10]);
|
||||
|
||||
if (success)
|
||||
{
|
||||
|
@ -472,7 +472,7 @@ drawable_transform_rotate_invoker (GimpProcedure *procedure,
|
|||
gint32 interpolation;
|
||||
gboolean supersample;
|
||||
gint32 recursion_level;
|
||||
gboolean clip_result;
|
||||
gint32 clip_result;
|
||||
|
||||
drawable = gimp_value_get_drawable (&args->values[0], gimp);
|
||||
angle = g_value_get_double (&args->values[1]);
|
||||
|
@ -483,7 +483,7 @@ drawable_transform_rotate_invoker (GimpProcedure *procedure,
|
|||
interpolation = g_value_get_enum (&args->values[6]);
|
||||
supersample = g_value_get_boolean (&args->values[7]);
|
||||
recursion_level = g_value_get_int (&args->values[8]);
|
||||
clip_result = g_value_get_boolean (&args->values[9]);
|
||||
clip_result = g_value_get_enum (&args->values[9]);
|
||||
|
||||
if (success)
|
||||
{
|
||||
|
@ -549,7 +549,7 @@ drawable_transform_rotate_default_invoker (GimpProcedure *procedure,
|
|||
gint32 center_x;
|
||||
gint32 center_y;
|
||||
gboolean interpolate;
|
||||
gboolean clip_result;
|
||||
gint32 clip_result;
|
||||
|
||||
drawable = gimp_value_get_drawable (&args->values[0], gimp);
|
||||
angle = g_value_get_double (&args->values[1]);
|
||||
|
@ -557,7 +557,7 @@ drawable_transform_rotate_default_invoker (GimpProcedure *procedure,
|
|||
center_x = g_value_get_int (&args->values[3]);
|
||||
center_y = g_value_get_int (&args->values[4]);
|
||||
interpolate = g_value_get_boolean (&args->values[5]);
|
||||
clip_result = g_value_get_boolean (&args->values[6]);
|
||||
clip_result = g_value_get_enum (&args->values[6]);
|
||||
|
||||
if (success)
|
||||
{
|
||||
|
@ -630,7 +630,7 @@ drawable_transform_scale_invoker (GimpProcedure *procedure,
|
|||
gint32 interpolation;
|
||||
gboolean supersample;
|
||||
gint32 recursion_level;
|
||||
gboolean clip_result;
|
||||
gint32 clip_result;
|
||||
|
||||
drawable = gimp_value_get_drawable (&args->values[0], gimp);
|
||||
x0 = g_value_get_double (&args->values[1]);
|
||||
|
@ -641,7 +641,7 @@ drawable_transform_scale_invoker (GimpProcedure *procedure,
|
|||
interpolation = g_value_get_enum (&args->values[6]);
|
||||
supersample = g_value_get_boolean (&args->values[7]);
|
||||
recursion_level = g_value_get_int (&args->values[8]);
|
||||
clip_result = g_value_get_boolean (&args->values[9]);
|
||||
clip_result = g_value_get_enum (&args->values[9]);
|
||||
|
||||
if (success)
|
||||
{
|
||||
|
@ -704,7 +704,7 @@ drawable_transform_scale_default_invoker (GimpProcedure *procedure,
|
|||
gdouble x1;
|
||||
gdouble y1;
|
||||
gboolean interpolate;
|
||||
gboolean clip_result;
|
||||
gint32 clip_result;
|
||||
|
||||
drawable = gimp_value_get_drawable (&args->values[0], gimp);
|
||||
x0 = g_value_get_double (&args->values[1]);
|
||||
|
@ -712,7 +712,7 @@ drawable_transform_scale_default_invoker (GimpProcedure *procedure,
|
|||
x1 = g_value_get_double (&args->values[3]);
|
||||
y1 = g_value_get_double (&args->values[4]);
|
||||
interpolate = g_value_get_boolean (&args->values[5]);
|
||||
clip_result = g_value_get_boolean (&args->values[6]);
|
||||
clip_result = g_value_get_enum (&args->values[6]);
|
||||
|
||||
if (success)
|
||||
{
|
||||
|
@ -780,7 +780,7 @@ drawable_transform_shear_invoker (GimpProcedure *procedure,
|
|||
gint32 interpolation;
|
||||
gboolean supersample;
|
||||
gint32 recursion_level;
|
||||
gboolean clip_result;
|
||||
gint32 clip_result;
|
||||
|
||||
drawable = gimp_value_get_drawable (&args->values[0], gimp);
|
||||
shear_type = g_value_get_enum (&args->values[1]);
|
||||
|
@ -789,7 +789,7 @@ drawable_transform_shear_invoker (GimpProcedure *procedure,
|
|||
interpolation = g_value_get_enum (&args->values[4]);
|
||||
supersample = g_value_get_boolean (&args->values[5]);
|
||||
recursion_level = g_value_get_int (&args->values[6]);
|
||||
clip_result = g_value_get_boolean (&args->values[7]);
|
||||
clip_result = g_value_get_enum (&args->values[7]);
|
||||
|
||||
if (success)
|
||||
{
|
||||
|
@ -850,13 +850,13 @@ drawable_transform_shear_default_invoker (GimpProcedure *procedure,
|
|||
gint32 shear_type;
|
||||
gdouble magnitude;
|
||||
gboolean interpolate;
|
||||
gboolean clip_result;
|
||||
gint32 clip_result;
|
||||
|
||||
drawable = gimp_value_get_drawable (&args->values[0], gimp);
|
||||
shear_type = g_value_get_enum (&args->values[1]);
|
||||
magnitude = g_value_get_double (&args->values[2]);
|
||||
interpolate = g_value_get_boolean (&args->values[3]);
|
||||
clip_result = g_value_get_boolean (&args->values[4]);
|
||||
clip_result = g_value_get_enum (&args->values[4]);
|
||||
|
||||
if (success)
|
||||
{
|
||||
|
@ -929,7 +929,7 @@ drawable_transform_2d_invoker (GimpProcedure *procedure,
|
|||
gint32 interpolation;
|
||||
gboolean supersample;
|
||||
gint32 recursion_level;
|
||||
gboolean clip_result;
|
||||
gint32 clip_result;
|
||||
|
||||
drawable = gimp_value_get_drawable (&args->values[0], gimp);
|
||||
source_x = g_value_get_double (&args->values[1]);
|
||||
|
@ -943,7 +943,7 @@ drawable_transform_2d_invoker (GimpProcedure *procedure,
|
|||
interpolation = g_value_get_enum (&args->values[9]);
|
||||
supersample = g_value_get_boolean (&args->values[10]);
|
||||
recursion_level = g_value_get_int (&args->values[11]);
|
||||
clip_result = g_value_get_boolean (&args->values[12]);
|
||||
clip_result = g_value_get_enum (&args->values[12]);
|
||||
|
||||
if (success)
|
||||
{
|
||||
|
@ -1010,7 +1010,7 @@ drawable_transform_2d_default_invoker (GimpProcedure *procedure,
|
|||
gdouble dest_x;
|
||||
gdouble dest_y;
|
||||
gboolean interpolate;
|
||||
gboolean clip_result;
|
||||
gint32 clip_result;
|
||||
|
||||
drawable = gimp_value_get_drawable (&args->values[0], gimp);
|
||||
source_x = g_value_get_double (&args->values[1]);
|
||||
|
@ -1021,7 +1021,7 @@ drawable_transform_2d_default_invoker (GimpProcedure *procedure,
|
|||
dest_x = g_value_get_double (&args->values[6]);
|
||||
dest_y = g_value_get_double (&args->values[7]);
|
||||
interpolate = g_value_get_boolean (&args->values[8]);
|
||||
clip_result = g_value_get_boolean (&args->values[9]);
|
||||
clip_result = g_value_get_enum (&args->values[9]);
|
||||
|
||||
if (success)
|
||||
{
|
||||
|
@ -1097,7 +1097,7 @@ drawable_transform_matrix_invoker (GimpProcedure *procedure,
|
|||
gint32 interpolation;
|
||||
gboolean supersample;
|
||||
gint32 recursion_level;
|
||||
gboolean clip_result;
|
||||
gint32 clip_result;
|
||||
|
||||
drawable = gimp_value_get_drawable (&args->values[0], gimp);
|
||||
coeff_0_0 = g_value_get_double (&args->values[1]);
|
||||
|
@ -1113,7 +1113,7 @@ drawable_transform_matrix_invoker (GimpProcedure *procedure,
|
|||
interpolation = g_value_get_enum (&args->values[11]);
|
||||
supersample = g_value_get_boolean (&args->values[12]);
|
||||
recursion_level = g_value_get_int (&args->values[13]);
|
||||
clip_result = g_value_get_boolean (&args->values[14]);
|
||||
clip_result = g_value_get_enum (&args->values[14]);
|
||||
|
||||
if (success)
|
||||
{
|
||||
|
@ -1186,7 +1186,7 @@ drawable_transform_matrix_default_invoker (GimpProcedure *procedure,
|
|||
gdouble coeff_2_1;
|
||||
gdouble coeff_2_2;
|
||||
gboolean interpolate;
|
||||
gboolean clip_result;
|
||||
gint32 clip_result;
|
||||
|
||||
drawable = gimp_value_get_drawable (&args->values[0], gimp);
|
||||
coeff_0_0 = g_value_get_double (&args->values[1]);
|
||||
|
@ -1199,7 +1199,7 @@ drawable_transform_matrix_default_invoker (GimpProcedure *procedure,
|
|||
coeff_2_1 = g_value_get_double (&args->values[8]);
|
||||
coeff_2_2 = g_value_get_double (&args->values[9]);
|
||||
interpolate = g_value_get_boolean (&args->values[10]);
|
||||
clip_result = g_value_get_boolean (&args->values[11]);
|
||||
clip_result = g_value_get_enum (&args->values[11]);
|
||||
|
||||
if (success)
|
||||
{
|
||||
|
@ -1558,11 +1558,12 @@ register_drawable_transform_procs (GimpPDB *pdb)
|
|||
1, G_MAXINT32, 1,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_argument (procedure,
|
||||
g_param_spec_boolean ("clip-result",
|
||||
"clip result",
|
||||
"Whether to clip results",
|
||||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
g_param_spec_enum ("clip-result",
|
||||
"clip result",
|
||||
"How to clip results",
|
||||
GIMP_TYPE_TRANSFORM_RESIZE,
|
||||
GIMP_TRANSFORM_RESIZE_ADJUST,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_return_value (procedure,
|
||||
gimp_param_spec_drawable_id ("drawable",
|
||||
"drawable",
|
||||
|
@ -1646,11 +1647,12 @@ register_drawable_transform_procs (GimpPDB *pdb)
|
|||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_argument (procedure,
|
||||
g_param_spec_boolean ("clip-result",
|
||||
"clip result",
|
||||
"Whether to clip results",
|
||||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
g_param_spec_enum ("clip-result",
|
||||
"clip result",
|
||||
"How to clip results",
|
||||
GIMP_TYPE_TRANSFORM_RESIZE,
|
||||
GIMP_TRANSFORM_RESIZE_ADJUST,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_return_value (procedure,
|
||||
gimp_param_spec_drawable_id ("drawable",
|
||||
"drawable",
|
||||
|
@ -1789,11 +1791,12 @@ register_drawable_transform_procs (GimpPDB *pdb)
|
|||
1, G_MAXINT32, 1,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_argument (procedure,
|
||||
g_param_spec_boolean ("clip-result",
|
||||
"clip result",
|
||||
"Whether to clip results",
|
||||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
g_param_spec_enum ("clip-result",
|
||||
"clip result",
|
||||
"How to clip results",
|
||||
GIMP_TYPE_TRANSFORM_RESIZE,
|
||||
GIMP_TRANSFORM_RESIZE_ADJUST,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_return_value (procedure,
|
||||
gimp_param_spec_drawable_id ("drawable",
|
||||
"drawable",
|
||||
|
@ -1853,11 +1856,12 @@ register_drawable_transform_procs (GimpPDB *pdb)
|
|||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_argument (procedure,
|
||||
g_param_spec_boolean ("clip-result",
|
||||
"clip result",
|
||||
"Whether to clip results",
|
||||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
g_param_spec_enum ("clip-result",
|
||||
"clip result",
|
||||
"How to clip results",
|
||||
GIMP_TYPE_TRANSFORM_RESIZE,
|
||||
GIMP_TRANSFORM_RESIZE_ADJUST,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_return_value (procedure,
|
||||
gimp_param_spec_drawable_id ("drawable",
|
||||
"drawable",
|
||||
|
@ -1937,11 +1941,12 @@ register_drawable_transform_procs (GimpPDB *pdb)
|
|||
1, G_MAXINT32, 1,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_argument (procedure,
|
||||
g_param_spec_boolean ("clip-result",
|
||||
"clip result",
|
||||
"Whether to clip results",
|
||||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
g_param_spec_enum ("clip-result",
|
||||
"clip result",
|
||||
"How to clip results",
|
||||
GIMP_TYPE_TRANSFORM_RESIZE,
|
||||
GIMP_TRANSFORM_RESIZE_ADJUST,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_return_value (procedure,
|
||||
gimp_param_spec_drawable_id ("drawable",
|
||||
"drawable",
|
||||
|
@ -2001,11 +2006,12 @@ register_drawable_transform_procs (GimpPDB *pdb)
|
|||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_argument (procedure,
|
||||
g_param_spec_boolean ("clip-result",
|
||||
"clip result",
|
||||
"Whether to clip results",
|
||||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
g_param_spec_enum ("clip-result",
|
||||
"clip result",
|
||||
"How to clip results",
|
||||
GIMP_TYPE_TRANSFORM_RESIZE,
|
||||
GIMP_TRANSFORM_RESIZE_ADJUST,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_return_value (procedure,
|
||||
gimp_param_spec_drawable_id ("drawable",
|
||||
"drawable",
|
||||
|
@ -2076,11 +2082,12 @@ register_drawable_transform_procs (GimpPDB *pdb)
|
|||
1, G_MAXINT32, 1,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_argument (procedure,
|
||||
g_param_spec_boolean ("clip-result",
|
||||
"clip result",
|
||||
"Whether to clip results",
|
||||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
g_param_spec_enum ("clip-result",
|
||||
"clip result",
|
||||
"How to clip results",
|
||||
GIMP_TYPE_TRANSFORM_RESIZE,
|
||||
GIMP_TRANSFORM_RESIZE_ADJUST,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_return_value (procedure,
|
||||
gimp_param_spec_drawable_id ("drawable",
|
||||
"drawable",
|
||||
|
@ -2131,11 +2138,12 @@ register_drawable_transform_procs (GimpPDB *pdb)
|
|||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_argument (procedure,
|
||||
g_param_spec_boolean ("clip-result",
|
||||
"clip result",
|
||||
"Whether to clip results",
|
||||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
g_param_spec_enum ("clip-result",
|
||||
"clip result",
|
||||
"How to clip results",
|
||||
GIMP_TYPE_TRANSFORM_RESIZE,
|
||||
GIMP_TRANSFORM_RESIZE_ADJUST,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_return_value (procedure,
|
||||
gimp_param_spec_drawable_id ("drawable",
|
||||
"drawable",
|
||||
|
@ -2233,11 +2241,12 @@ register_drawable_transform_procs (GimpPDB *pdb)
|
|||
1, G_MAXINT32, 1,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_argument (procedure,
|
||||
g_param_spec_boolean ("clip-result",
|
||||
"clip result",
|
||||
"Whether to clip results",
|
||||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
g_param_spec_enum ("clip-result",
|
||||
"clip result",
|
||||
"How to clip results",
|
||||
GIMP_TYPE_TRANSFORM_RESIZE,
|
||||
GIMP_TRANSFORM_RESIZE_ADJUST,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_return_value (procedure,
|
||||
gimp_param_spec_drawable_id ("drawable",
|
||||
"drawable",
|
||||
|
@ -2315,11 +2324,12 @@ register_drawable_transform_procs (GimpPDB *pdb)
|
|||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_argument (procedure,
|
||||
g_param_spec_boolean ("clip-result",
|
||||
"clip result",
|
||||
"Whether to clip results",
|
||||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
g_param_spec_enum ("clip-result",
|
||||
"clip result",
|
||||
"How to clip results",
|
||||
GIMP_TYPE_TRANSFORM_RESIZE,
|
||||
GIMP_TRANSFORM_RESIZE_ADJUST,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_return_value (procedure,
|
||||
gimp_param_spec_drawable_id ("drawable",
|
||||
"drawable",
|
||||
|
@ -2429,11 +2439,12 @@ register_drawable_transform_procs (GimpPDB *pdb)
|
|||
1, G_MAXINT32, 1,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_argument (procedure,
|
||||
g_param_spec_boolean ("clip-result",
|
||||
"clip result",
|
||||
"Whether to clip results",
|
||||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
g_param_spec_enum ("clip-result",
|
||||
"clip result",
|
||||
"How to clip results",
|
||||
GIMP_TYPE_TRANSFORM_RESIZE,
|
||||
GIMP_TRANSFORM_RESIZE_ADJUST,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_return_value (procedure,
|
||||
gimp_param_spec_drawable_id ("drawable",
|
||||
"drawable",
|
||||
|
@ -2523,11 +2534,12 @@ register_drawable_transform_procs (GimpPDB *pdb)
|
|||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_argument (procedure,
|
||||
g_param_spec_boolean ("clip-result",
|
||||
"clip result",
|
||||
"Whether to clip results",
|
||||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
g_param_spec_enum ("clip-result",
|
||||
"clip result",
|
||||
"How to clip results",
|
||||
GIMP_TYPE_TRANSFORM_RESIZE,
|
||||
GIMP_TRANSFORM_RESIZE_ADJUST,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_return_value (procedure,
|
||||
gimp_param_spec_drawable_id ("drawable",
|
||||
"drawable",
|
||||
|
|
|
@ -143,7 +143,7 @@ gimp_text_layer_transform (GimpItem *item,
|
|||
GimpInterpolationType interpolation_type,
|
||||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result,
|
||||
GimpTransformResize clip_result,
|
||||
GimpProgress *progress)
|
||||
{
|
||||
/* TODO */
|
||||
|
|
|
@ -48,7 +48,7 @@ void gimp_text_layer_transform (GimpItem *item,
|
|||
GimpInterpolationType interpolation_type,
|
||||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result,
|
||||
GimpTransformResize clip_result,
|
||||
GimpProgress *progress);
|
||||
|
||||
|
||||
|
|
|
@ -124,10 +124,11 @@ gimp_transform_options_class_init (GimpTransformOptionsClass *klass)
|
|||
GIMP_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT));
|
||||
|
||||
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_CLIP,
|
||||
"clip", NULL,
|
||||
FALSE,
|
||||
GIMP_PARAM_STATIC_STRINGS);
|
||||
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_CLIP,
|
||||
"clip", NULL,
|
||||
GIMP_TYPE_TRANSFORM_RESIZE,
|
||||
GIMP_TRANSFORM_RESIZE_ADJUST,
|
||||
GIMP_PARAM_STATIC_STRINGS);
|
||||
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_PREVIEW_TYPE,
|
||||
"preview-type", NULL,
|
||||
GIMP_TYPE_TRANSFORM_PREVIEW_TYPE,
|
||||
|
@ -179,7 +180,7 @@ gimp_transform_options_set_property (GObject *object,
|
|||
options->recursion_level = g_value_get_int (value);
|
||||
break;
|
||||
case PROP_CLIP:
|
||||
options->clip = g_value_get_boolean (value);
|
||||
options->clip = g_value_get_enum (value);
|
||||
break;
|
||||
case PROP_PREVIEW_TYPE:
|
||||
options->preview_type = g_value_get_enum (value);
|
||||
|
@ -225,7 +226,7 @@ gimp_transform_options_get_property (GObject *object,
|
|||
g_value_set_int (value, options->recursion_level);
|
||||
break;
|
||||
case PROP_CLIP:
|
||||
g_value_set_boolean (value, options->clip);
|
||||
g_value_set_enum (value, options->clip);
|
||||
break;
|
||||
case PROP_PREVIEW_TYPE:
|
||||
g_value_set_enum (value, options->preview_type);
|
||||
|
@ -289,7 +290,7 @@ gimp_transform_options_gui (GimpToolOptions *tool_options)
|
|||
gtk_widget_show (frame);
|
||||
|
||||
/* the interpolation menu */
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
hbox = gtk_hbox_new (FALSE, 6);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
|
@ -307,10 +308,18 @@ gimp_transform_options_gui (GimpToolOptions *tool_options)
|
|||
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (button);
|
||||
|
||||
/* the clip resulting image toggle button */
|
||||
button = gimp_prop_check_button_new (config, "clip", _("Clip result"));
|
||||
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (button);
|
||||
/* the clipping menu */
|
||||
hbox = gtk_hbox_new (FALSE, 6);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
label = gtk_label_new (_("Clipping:"));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
combo = gimp_prop_enum_combo_box_new (config, "clip", 0, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), combo, TRUE, TRUE, 0);
|
||||
gtk_widget_show (combo);
|
||||
|
||||
/* the preview frame */
|
||||
frame = gimp_frame_new (NULL);
|
||||
|
@ -318,7 +327,7 @@ gimp_transform_options_gui (GimpToolOptions *tool_options)
|
|||
gtk_widget_show (frame);
|
||||
|
||||
/* the preview type menu */
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
hbox = gtk_hbox_new (FALSE, 6);
|
||||
gtk_frame_set_label_widget (GTK_FRAME (frame), hbox);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
|
@ -331,7 +340,7 @@ gimp_transform_options_gui (GimpToolOptions *tool_options)
|
|||
gtk_widget_show (combo);
|
||||
|
||||
/* the grid type menu */
|
||||
button = gtk_vbox_new (FALSE, 4);
|
||||
button = gtk_vbox_new (FALSE, 6);
|
||||
gtk_container_add (GTK_CONTAINER (frame), button);
|
||||
gtk_widget_show (button);
|
||||
|
||||
|
|
|
@ -1095,7 +1095,7 @@ gimp_transform_tool_real_transform (GimpTransformTool *tr_tool,
|
|||
case GIMP_TRANSFORM_TYPE_LAYER:
|
||||
case GIMP_TRANSFORM_TYPE_SELECTION:
|
||||
{
|
||||
gboolean clip_result = options->clip;
|
||||
GimpTransformResize clip_result = options->clip;
|
||||
|
||||
/* always clip the selction and unfloated channels
|
||||
* so they keep their size
|
||||
|
@ -1104,7 +1104,7 @@ gimp_transform_tool_real_transform (GimpTransformTool *tr_tool,
|
|||
{
|
||||
if (GIMP_IS_CHANNEL (active_item) &&
|
||||
tile_manager_bpp (tr_tool->original) == 1)
|
||||
clip_result = TRUE;
|
||||
clip_result = GIMP_TRANSFORM_RESIZE_CLIP;
|
||||
|
||||
ret =
|
||||
gimp_drawable_transform_tiles_affine (GIMP_DRAWABLE (active_item),
|
||||
|
|
|
@ -104,7 +104,7 @@ static void gimp_vectors_transform (GimpItem *item,
|
|||
GimpInterpolationType interp_type,
|
||||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result,
|
||||
GimpTransformResize clip_result,
|
||||
GimpProgress *progress);
|
||||
static gboolean gimp_vectors_stroke (GimpItem *item,
|
||||
GimpDrawable *drawable,
|
||||
|
@ -461,7 +461,7 @@ gimp_vectors_transform (GimpItem *item,
|
|||
GimpInterpolationType interpolation_type,
|
||||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result,
|
||||
GimpTransformResize clip_result,
|
||||
GimpProgress *progress)
|
||||
{
|
||||
GimpVectors *vectors = GIMP_VECTORS (item);
|
||||
|
|
|
@ -212,7 +212,7 @@ gimp_drawable_transform_flip_default (gint32 drawable_ID,
|
|||
* @interpolation: Type of interpolation.
|
||||
* @supersample: Whether to perform supersample.
|
||||
* @recursion_level: Level of recursion (3 is a nice default).
|
||||
* @clip_result: Whether to clip results.
|
||||
* @clip_result: How to clip results.
|
||||
*
|
||||
* Perform a possibly non-affine transformation on the specified
|
||||
* drawable, with extra parameters.
|
||||
|
@ -251,7 +251,7 @@ gimp_drawable_transform_perspective (gint32 drawable_ID,
|
|||
GimpInterpolationType interpolation,
|
||||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result)
|
||||
GimpTransformResize clip_result)
|
||||
{
|
||||
GimpParam *return_vals;
|
||||
gint nreturn_vals;
|
||||
|
@ -295,7 +295,7 @@ gimp_drawable_transform_perspective (gint32 drawable_ID,
|
|||
* @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: Whether to clip results.
|
||||
* @clip_result: How to clip results.
|
||||
*
|
||||
* Perform a possibly non-affine transformation on the specified
|
||||
* drawable, with extra parameters.
|
||||
|
@ -309,17 +309,17 @@ gimp_drawable_transform_perspective (gint32 drawable_ID,
|
|||
* 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,
|
||||
gboolean clip_result)
|
||||
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;
|
||||
|
@ -413,7 +413,7 @@ gimp_drawable_transform_rotate_simple (gint32 drawable_ID,
|
|||
* @interpolation: Type of interpolation.
|
||||
* @supersample: Whether to perform supersample.
|
||||
* @recursion_level: Level of recursion (3 is a nice default).
|
||||
* @clip_result: Whether to clip results.
|
||||
* @clip_result: How to clip results.
|
||||
*
|
||||
* Rotate the specified drawable about given coordinates through the
|
||||
* specified angle.
|
||||
|
@ -440,7 +440,7 @@ gimp_drawable_transform_rotate (gint32 drawable_ID,
|
|||
GimpInterpolationType interpolation,
|
||||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result)
|
||||
GimpTransformResize clip_result)
|
||||
{
|
||||
GimpParam *return_vals;
|
||||
gint nreturn_vals;
|
||||
|
@ -476,7 +476,7 @@ gimp_drawable_transform_rotate (gint32 drawable_ID,
|
|||
* @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: Whether to clip results.
|
||||
* @clip_result: How to clip results.
|
||||
*
|
||||
* Rotate the specified drawable about given coordinates through the
|
||||
* specified angle.
|
||||
|
@ -490,13 +490,13 @@ gimp_drawable_transform_rotate (gint32 drawable_ID,
|
|||
* 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,
|
||||
gboolean clip_result)
|
||||
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;
|
||||
|
@ -532,7 +532,7 @@ gimp_drawable_transform_rotate_default (gint32 drawable_ID,
|
|||
* @interpolation: Type of interpolation.
|
||||
* @supersample: Whether to perform supersample.
|
||||
* @recursion_level: Level of recursion (3 is a nice default).
|
||||
* @clip_result: Whether to clip results.
|
||||
* @clip_result: How to clip results.
|
||||
*
|
||||
* Scale the specified drawable with extra parameters
|
||||
*
|
||||
|
@ -558,7 +558,7 @@ gimp_drawable_transform_scale (gint32 drawable_ID,
|
|||
GimpInterpolationType interpolation,
|
||||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result)
|
||||
GimpTransformResize clip_result)
|
||||
{
|
||||
GimpParam *return_vals;
|
||||
gint nreturn_vals;
|
||||
|
@ -594,7 +594,7 @@ gimp_drawable_transform_scale (gint32 drawable_ID,
|
|||
* @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: Whether to clip results.
|
||||
* @clip_result: How to clip results.
|
||||
*
|
||||
* Scale the specified drawable with extra parameters
|
||||
*
|
||||
|
@ -607,13 +607,13 @@ gimp_drawable_transform_scale (gint32 drawable_ID,
|
|||
* Since: GIMP 2.2
|
||||
*/
|
||||
gint32
|
||||
gimp_drawable_transform_scale_default (gint32 drawable_ID,
|
||||
gdouble x0,
|
||||
gdouble y0,
|
||||
gdouble x1,
|
||||
gdouble y1,
|
||||
gboolean interpolate,
|
||||
gboolean clip_result)
|
||||
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;
|
||||
|
@ -647,7 +647,7 @@ gimp_drawable_transform_scale_default (gint32 drawable_ID,
|
|||
* @interpolation: Type of interpolation.
|
||||
* @supersample: Whether to perform supersample.
|
||||
* @recursion_level: Level of recursion (3 is a nice default).
|
||||
* @clip_result: Whether to clip results.
|
||||
* @clip_result: How to clip results.
|
||||
*
|
||||
* Shear the specified drawable about its center by the specified
|
||||
* magnitude, with extra parameters.
|
||||
|
@ -675,7 +675,7 @@ gimp_drawable_transform_shear (gint32 drawable_ID,
|
|||
GimpInterpolationType interpolation,
|
||||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result)
|
||||
GimpTransformResize clip_result)
|
||||
{
|
||||
GimpParam *return_vals;
|
||||
gint nreturn_vals;
|
||||
|
@ -707,7 +707,7 @@ gimp_drawable_transform_shear (gint32 drawable_ID,
|
|||
* @shear_type: Type of shear.
|
||||
* @magnitude: The magnitude of the shear.
|
||||
* @interpolate: Whether to use interpolation and supersampling.
|
||||
* @clip_result: Whether to clip results.
|
||||
* @clip_result: How to clip results.
|
||||
*
|
||||
* Shear the specified drawable about its center by the specified
|
||||
* magnitude, with extra parameters.
|
||||
|
@ -725,7 +725,7 @@ gimp_drawable_transform_shear_default (gint32 drawable_ID,
|
|||
GimpOrientationType shear_type,
|
||||
gdouble magnitude,
|
||||
gboolean interpolate,
|
||||
gboolean clip_result)
|
||||
GimpTransformResize clip_result)
|
||||
{
|
||||
GimpParam *return_vals;
|
||||
gint nreturn_vals;
|
||||
|
@ -762,7 +762,7 @@ gimp_drawable_transform_shear_default (gint32 drawable_ID,
|
|||
* @interpolation: Type of interpolation.
|
||||
* @supersample: Whether to perform supersample.
|
||||
* @recursion_level: Level of recursion (3 is a nice default).
|
||||
* @clip_result: Whether to clip results.
|
||||
* @clip_result: How to clip results.
|
||||
*
|
||||
* Transform the specified drawable in 2d, with extra parameters.
|
||||
*
|
||||
|
@ -794,7 +794,7 @@ gimp_drawable_transform_2d (gint32 drawable_ID,
|
|||
GimpInterpolationType interpolation,
|
||||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result)
|
||||
GimpTransformResize clip_result)
|
||||
{
|
||||
GimpParam *return_vals;
|
||||
gint nreturn_vals;
|
||||
|
@ -836,7 +836,7 @@ gimp_drawable_transform_2d (gint32 drawable_ID,
|
|||
* @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: Whether to clip results.
|
||||
* @clip_result: How to clip results.
|
||||
*
|
||||
* Transform the specified drawable in 2d, with extra parameters.
|
||||
*
|
||||
|
@ -849,16 +849,16 @@ gimp_drawable_transform_2d (gint32 drawable_ID,
|
|||
* 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,
|
||||
gboolean clip_result)
|
||||
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;
|
||||
|
@ -902,7 +902,7 @@ gimp_drawable_transform_2d_default (gint32 drawable_ID,
|
|||
* @interpolation: Type of interpolation.
|
||||
* @supersample: Whether to perform supersample.
|
||||
* @recursion_level: Level of recursion (3 is a nice default).
|
||||
* @clip_result: Whether to clip results.
|
||||
* @clip_result: How to clip results.
|
||||
*
|
||||
* Transform the specified drawable in 2d, with extra parameters.
|
||||
*
|
||||
|
@ -934,7 +934,7 @@ gimp_drawable_transform_matrix (gint32 drawable_ID,
|
|||
GimpInterpolationType interpolation,
|
||||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result)
|
||||
GimpTransformResize clip_result)
|
||||
{
|
||||
GimpParam *return_vals;
|
||||
gint nreturn_vals;
|
||||
|
@ -980,7 +980,7 @@ gimp_drawable_transform_matrix (gint32 drawable_ID,
|
|||
* @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: Whether to clip results.
|
||||
* @clip_result: How to clip results.
|
||||
*
|
||||
* Transform the specified drawable in 2d, with extra parameters.
|
||||
*
|
||||
|
@ -993,18 +993,18 @@ gimp_drawable_transform_matrix (gint32 drawable_ID,
|
|||
* 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,
|
||||
gboolean clip_result)
|
||||
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;
|
||||
|
|
|
@ -64,7 +64,7 @@ gint32 gimp_drawable_transform_perspective (gint32 drawa
|
|||
GimpInterpolationType interpolation,
|
||||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result);
|
||||
GimpTransformResize clip_result);
|
||||
gint32 gimp_drawable_transform_perspective_default (gint32 drawable_ID,
|
||||
gdouble x0,
|
||||
gdouble y0,
|
||||
|
@ -75,7 +75,7 @@ gint32 gimp_drawable_transform_perspective_default (gint32 drawa
|
|||
gdouble x3,
|
||||
gdouble y3,
|
||||
gboolean interpolate,
|
||||
gboolean clip_result);
|
||||
GimpTransformResize clip_result);
|
||||
gint32 gimp_drawable_transform_rotate_simple (gint32 drawable_ID,
|
||||
GimpRotationType rotate_type,
|
||||
gboolean auto_center,
|
||||
|
@ -91,14 +91,14 @@ gint32 gimp_drawable_transform_rotate (gint32 drawa
|
|||
GimpInterpolationType interpolation,
|
||||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result);
|
||||
GimpTransformResize clip_result);
|
||||
gint32 gimp_drawable_transform_rotate_default (gint32 drawable_ID,
|
||||
gdouble angle,
|
||||
gboolean auto_center,
|
||||
gint center_x,
|
||||
gint center_y,
|
||||
gboolean interpolate,
|
||||
gboolean clip_result);
|
||||
GimpTransformResize clip_result);
|
||||
gint32 gimp_drawable_transform_scale (gint32 drawable_ID,
|
||||
gdouble x0,
|
||||
gdouble y0,
|
||||
|
@ -108,14 +108,14 @@ gint32 gimp_drawable_transform_scale (gint32 drawa
|
|||
GimpInterpolationType interpolation,
|
||||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result);
|
||||
GimpTransformResize clip_result);
|
||||
gint32 gimp_drawable_transform_scale_default (gint32 drawable_ID,
|
||||
gdouble x0,
|
||||
gdouble y0,
|
||||
gdouble x1,
|
||||
gdouble y1,
|
||||
gboolean interpolate,
|
||||
gboolean clip_result);
|
||||
GimpTransformResize clip_result);
|
||||
gint32 gimp_drawable_transform_shear (gint32 drawable_ID,
|
||||
GimpOrientationType shear_type,
|
||||
gdouble magnitude,
|
||||
|
@ -123,12 +123,12 @@ gint32 gimp_drawable_transform_shear (gint32 drawa
|
|||
GimpInterpolationType interpolation,
|
||||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result);
|
||||
GimpTransformResize clip_result);
|
||||
gint32 gimp_drawable_transform_shear_default (gint32 drawable_ID,
|
||||
GimpOrientationType shear_type,
|
||||
gdouble magnitude,
|
||||
gboolean interpolate,
|
||||
gboolean clip_result);
|
||||
GimpTransformResize clip_result);
|
||||
gint32 gimp_drawable_transform_2d (gint32 drawable_ID,
|
||||
gdouble source_x,
|
||||
gdouble source_y,
|
||||
|
@ -141,7 +141,7 @@ gint32 gimp_drawable_transform_2d (gint32 drawa
|
|||
GimpInterpolationType interpolation,
|
||||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result);
|
||||
GimpTransformResize clip_result);
|
||||
gint32 gimp_drawable_transform_2d_default (gint32 drawable_ID,
|
||||
gdouble source_x,
|
||||
gdouble source_y,
|
||||
|
@ -151,7 +151,7 @@ gint32 gimp_drawable_transform_2d_default (gint32 drawa
|
|||
gdouble dest_x,
|
||||
gdouble dest_y,
|
||||
gboolean interpolate,
|
||||
gboolean clip_result);
|
||||
GimpTransformResize clip_result);
|
||||
gint32 gimp_drawable_transform_matrix (gint32 drawable_ID,
|
||||
gdouble coeff_0_0,
|
||||
gdouble coeff_0_1,
|
||||
|
@ -166,7 +166,7 @@ gint32 gimp_drawable_transform_matrix (gint32 drawa
|
|||
GimpInterpolationType interpolation,
|
||||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result);
|
||||
GimpTransformResize clip_result);
|
||||
gint32 gimp_drawable_transform_matrix_default (gint32 drawable_ID,
|
||||
gdouble coeff_0_0,
|
||||
gdouble coeff_0_1,
|
||||
|
@ -178,7 +178,7 @@ gint32 gimp_drawable_transform_matrix_default (gint32 drawa
|
|||
gdouble coeff_2_1,
|
||||
gdouble coeff_2_2,
|
||||
gboolean interpolate,
|
||||
gboolean clip_result);
|
||||
GimpTransformResize clip_result);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
|
|
@ -48,6 +48,7 @@ static const GimpGetTypeFunc get_type_funcs[] =
|
|||
gimp_stack_trace_mode_get_type,
|
||||
gimp_transfer_mode_get_type,
|
||||
gimp_transform_direction_get_type,
|
||||
gimp_transform_resize_get_type,
|
||||
gimp_vectors_stroke_type_get_type
|
||||
};
|
||||
|
||||
|
@ -98,6 +99,7 @@ static const gchar * const type_names[] =
|
|||
"GimpStackTraceMode",
|
||||
"GimpTransferMode",
|
||||
"GimpTransformDirection",
|
||||
"GimpTransformResize",
|
||||
"GimpVectorsStrokeType"
|
||||
};
|
||||
|
||||
|
|
|
@ -94,6 +94,7 @@ EXPORTS
|
|||
gimp_sysconf_directory
|
||||
gimp_transfer_mode_get_type
|
||||
gimp_transform_direction_get_type
|
||||
gimp_transform_resize_get_type
|
||||
gimp_type_get_translation_domain
|
||||
gimp_type_set_translation_domain
|
||||
gimp_unit_get_abbreviation
|
||||
|
|
|
@ -758,6 +758,39 @@ gimp_transform_direction_get_type (void)
|
|||
return type;
|
||||
}
|
||||
|
||||
GType
|
||||
gimp_transform_resize_get_type (void)
|
||||
{
|
||||
static const GEnumValue values[] =
|
||||
{
|
||||
{ GIMP_TRANSFORM_RESIZE_ADJUST, "GIMP_TRANSFORM_RESIZE_ADJUST", "adjust" },
|
||||
{ GIMP_TRANSFORM_RESIZE_CLIP, "GIMP_TRANSFORM_RESIZE_CLIP", "clip" },
|
||||
{ GIMP_TRANSFORM_RESIZE_CROP, "GIMP_TRANSFORM_RESIZE_CROP", "crop" },
|
||||
{ GIMP_TRANSFORM_RESIZE_CROP_WITH_ASPECT, "GIMP_TRANSFORM_RESIZE_CROP_WITH_ASPECT", "crop-with-aspect" },
|
||||
{ 0, NULL, NULL }
|
||||
};
|
||||
|
||||
static const GimpEnumDesc descs[] =
|
||||
{
|
||||
{ GIMP_TRANSFORM_RESIZE_ADJUST, N_("Adjust"), NULL },
|
||||
{ GIMP_TRANSFORM_RESIZE_CLIP, N_("Clip"), NULL },
|
||||
{ GIMP_TRANSFORM_RESIZE_CROP, N_("Crop to result"), NULL },
|
||||
{ GIMP_TRANSFORM_RESIZE_CROP_WITH_ASPECT, N_("Crop with aspect"), NULL },
|
||||
{ 0, NULL, NULL }
|
||||
};
|
||||
|
||||
static GType type = 0;
|
||||
|
||||
if (! type)
|
||||
{
|
||||
type = g_enum_register_static ("GimpTransformResize", values);
|
||||
gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
|
||||
gimp_enum_set_value_descriptions (type, descs);
|
||||
}
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
GType
|
||||
gimp_pdb_arg_type_get_type (void)
|
||||
{
|
||||
|
|
|
@ -321,6 +321,19 @@ typedef enum
|
|||
} GimpTransformDirection;
|
||||
|
||||
|
||||
#define GIMP_TYPE_TRANSFORM_RESIZE (gimp_transform_resize_get_type ())
|
||||
|
||||
GType gimp_transform_resize_get_type (void) G_GNUC_CONST;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GIMP_TRANSFORM_RESIZE_ADJUST = 0, /*< desc="Adjust" >*/
|
||||
GIMP_TRANSFORM_RESIZE_CLIP = 1, /*< desc="Clip" >*/
|
||||
GIMP_TRANSFORM_RESIZE_CROP, /*< desc="Crop to result" >*/
|
||||
GIMP_TRANSFORM_RESIZE_CROP_WITH_ASPECT, /*< desc="Crop with aspect" >*/
|
||||
} GimpTransformResize;
|
||||
|
||||
|
||||
typedef enum /*< skip >*/
|
||||
{
|
||||
GIMP_UNIT_PIXEL = 0,
|
||||
|
|
|
@ -231,6 +231,18 @@ package Gimp::CodeGen::enums;
|
|||
mapping => { GIMP_TRANSFORM_FORWARD => '0',
|
||||
GIMP_TRANSFORM_BACKWARD => '1' }
|
||||
},
|
||||
GimpTransformResize =>
|
||||
{ contig => 1,
|
||||
header => 'libgimpbase/gimpbaseenums.h',
|
||||
symbols => [ qw(GIMP_TRANSFORM_RESIZE_ADJUST
|
||||
GIMP_TRANSFORM_RESIZE_CLIP
|
||||
GIMP_TRANSFORM_RESIZE_CROP
|
||||
GIMP_TRANSFORM_RESIZE_CROP_WITH_ASPECT) ],
|
||||
mapping => { GIMP_TRANSFORM_RESIZE_ADJUST => '0',
|
||||
GIMP_TRANSFORM_RESIZE_CLIP => '1',
|
||||
GIMP_TRANSFORM_RESIZE_CROP => '2',
|
||||
GIMP_TRANSFORM_RESIZE_CROP_WITH_ASPECT => '3' }
|
||||
},
|
||||
GimpUnit =>
|
||||
{ contig => 1,
|
||||
header => 'libgimpbase/gimpbaseenums.h',
|
||||
|
|
|
@ -343,8 +343,8 @@ HELP
|
|||
desc => 'Whether to perform supersample' },
|
||||
{ name => 'recursion_level', type => '1 <= int32',
|
||||
desc => 'Level of recursion (3 is a nice default)' },
|
||||
{ name => 'clip_result', type => 'boolean',
|
||||
desc => 'Whether to clip results' }
|
||||
{ name => 'clip_result', type => 'enum GimpTransformResize',
|
||||
desc => 'How to clip results' }
|
||||
);
|
||||
|
||||
@outargs = (
|
||||
|
@ -404,8 +404,8 @@ HELP
|
|||
bounding box' },
|
||||
{ name => 'interpolate', type => 'boolean',
|
||||
desc => 'Whether to use interpolation and supersampling' },
|
||||
{ name => 'clip_result', type => 'boolean',
|
||||
desc => 'Whether to clip results' }
|
||||
{ name => 'clip_result', type => 'enum GimpTransformResize',
|
||||
desc => 'How to clip results' }
|
||||
);
|
||||
|
||||
@outargs = (
|
||||
|
@ -517,8 +517,8 @@ HELP
|
|||
desc => 'Whether to perform supersample' },
|
||||
{ name => 'recursion_level', type => '1 <= int32',
|
||||
desc => 'Level of recursion (3 is a nice default)' },
|
||||
{ name => 'clip_result', type => 'boolean',
|
||||
desc => 'Whether to clip results' }
|
||||
{ name => 'clip_result', type => 'enum GimpTransformResize',
|
||||
desc => 'How to clip results' }
|
||||
);
|
||||
|
||||
@outargs = (
|
||||
|
@ -564,8 +564,8 @@ HELP
|
|||
desc => 'The vert. coordinate of the center of rotation' },
|
||||
{ name => 'interpolate', type => 'boolean',
|
||||
desc => 'Whether to use interpolation and supersampling' },
|
||||
{ name => 'clip_result', type => 'boolean',
|
||||
desc => 'Whether to clip results' }
|
||||
{ name => 'clip_result', type => 'enum GimpTransformResize',
|
||||
desc => 'How to clip results' }
|
||||
);
|
||||
|
||||
@outargs = (
|
||||
|
@ -623,8 +623,8 @@ HELP
|
|||
desc => 'Whether to perform supersample' },
|
||||
{ name => 'recursion_level', type => '1 <= int32',
|
||||
desc => 'Level of recursion (3 is a nice default)' },
|
||||
{ name => 'clip_result', type => 'boolean',
|
||||
desc => 'Whether to clip results' }
|
||||
{ name => 'clip_result', type => 'enum GimpTransformResize',
|
||||
desc => 'How to clip results' }
|
||||
);
|
||||
|
||||
@outargs = (
|
||||
|
@ -669,8 +669,8 @@ HELP
|
|||
scaled region' },
|
||||
{ name => 'interpolate', type => 'boolean',
|
||||
desc => 'Whether to use interpolation and supersampling' },
|
||||
{ name => 'clip_result', type => 'boolean',
|
||||
desc => 'Whether to clip results' }
|
||||
{ name => 'clip_result', type => 'enum GimpTransformResize',
|
||||
desc => 'How to clip results' }
|
||||
);
|
||||
|
||||
@outargs = (
|
||||
|
@ -723,8 +723,8 @@ HELP
|
|||
desc => 'Whether to perform supersample' },
|
||||
{ name => 'recursion_level', type => '1 <= int32',
|
||||
desc => 'Level of recursion (3 is a nice default)' },
|
||||
{ name => 'clip_result', type => 'boolean',
|
||||
desc => 'Whether to clip results' }
|
||||
{ name => 'clip_result', type => 'enum GimpTransformResize',
|
||||
desc => 'How to clip results' }
|
||||
);
|
||||
|
||||
@outargs = (
|
||||
|
@ -764,8 +764,8 @@ HELP
|
|||
desc => 'The magnitude of the shear' },
|
||||
{ name => 'interpolate', type => 'boolean',
|
||||
desc => 'Whether to use interpolation and supersampling' },
|
||||
{ name => 'clip_result', type => 'boolean',
|
||||
desc => 'Whether to clip results' }
|
||||
{ name => 'clip_result', type => 'enum GimpTransformResize',
|
||||
desc => 'How to clip results' }
|
||||
);
|
||||
|
||||
@outargs = (
|
||||
|
@ -828,8 +828,8 @@ HELP
|
|||
desc => 'Whether to perform supersample' },
|
||||
{ name => 'recursion_level', type => '1 <= int32',
|
||||
desc => 'Level of recursion (3 is a nice default)' },
|
||||
{ name => 'clip_result', type => 'boolean',
|
||||
desc => 'Whether to clip results' }
|
||||
{ name => 'clip_result', type => 'enum GimpTransformResize',
|
||||
desc => 'How to clip results' }
|
||||
);
|
||||
|
||||
@outargs = (
|
||||
|
@ -879,8 +879,8 @@ HELP
|
|||
desc => 'Y coordinate of where the center goes' },
|
||||
{ name => 'interpolate', type => 'boolean',
|
||||
desc => 'Whether to use interpolation and supersampling' },
|
||||
{ name => 'clip_result', type => 'boolean',
|
||||
desc => 'Whether to clip results' }
|
||||
{ name => 'clip_result', type => 'enum GimpTransformResize',
|
||||
desc => 'How to clip results' }
|
||||
);
|
||||
|
||||
@outargs = (
|
||||
|
@ -945,8 +945,8 @@ HELP
|
|||
desc => 'Whether to perform supersample' },
|
||||
{ name => 'recursion_level', type => '1 <= int32',
|
||||
desc => 'Level of recursion (3 is a nice default)' },
|
||||
{ name => 'clip_result', type => 'boolean',
|
||||
desc => 'Whether to clip results' }
|
||||
{ name => 'clip_result', type => 'enum GimpTransformResize',
|
||||
desc => 'How to clip results' }
|
||||
);
|
||||
|
||||
@outargs = (
|
||||
|
@ -1004,8 +1004,8 @@ HELP
|
|||
desc => 'coefficient (2,2) of the transformation matrix' },
|
||||
{ name => 'interpolate', type => 'boolean',
|
||||
desc => 'Whether to use interpolation and supersampling' },
|
||||
{ name => 'clip_result', type => 'boolean',
|
||||
desc => 'Whether to clip results' }
|
||||
{ name => 'clip_result', type => 'enum GimpTransformResize',
|
||||
desc => 'How to clip results' }
|
||||
);
|
||||
|
||||
@outargs = (
|
||||
|
|
Loading…
Reference in New Issue