gimp r26744 - in trunk: . plug-ins/pygimp
- From: larsc svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r26744 - in trunk: . plug-ins/pygimp
- Date: Sun, 24 Aug 2008 16:31:35 +0000 (UTC)
Author: larsc
Date: Sun Aug 24 16:31:35 2008
New Revision: 26744
URL: http://svn.gnome.org/viewvc/gimp?rev=26744&view=rev
Log:
2008-08-24 Lars-Peter Clausen <lars metafoo de>
* plug-ins/pygimp/pygimp-drawable.c (drw_transform_rotate,
drw_transform_flip_simple): Fix method format string, so the
method is actual callable in a script.
Modified:
trunk/ChangeLog
trunk/plug-ins/pygimp/pygimp-drawable.c
Modified: trunk/plug-ins/pygimp/pygimp-drawable.c
==============================================================================
--- trunk/plug-ins/pygimp/pygimp-drawable.c (original)
+++ trunk/plug-ins/pygimp/pygimp-drawable.c Sun Aug 24 16:31:35 2008
@@ -131,6 +131,12 @@
ensure_drawable(self);
+ if(row < 0 || row >= self->drawable->ntile_rows ||
+ col < 0 || col >= self->drawable->ntile_cols) {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+
t = gimp_drawable_get_tile(self->drawable, shadow, row, col);
return pygimp_tile_new(t, self);
}
@@ -148,6 +154,11 @@
return NULL;
ensure_drawable(self);
+ if(x < 0 || x >= self->drawable->width ||
+ y < 0 || y >= self->drawable->height) {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
t = gimp_drawable_get_tile2(self->drawable, shadow, x, y);
return pygimp_tile_new(t, self);
@@ -474,7 +485,7 @@
"clip_result", NULL };
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "iid|:transform_flip_simple", kwlist,
+ "iid|i:transform_flip_simple", kwlist,
&flip_type, &auto_center, &axis,
&clip_result))
return NULL;
@@ -578,7 +589,7 @@
"clip_result", NULL };
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "diiii|iii:transform_rotate", kwlist,
+ "diiiii|iii:transform_rotate", kwlist,
&angle, &auto_center, ¢er_x, ¢er_y,
&transform_direction, &interpolation,
&supersample, &recursion_level,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]