[gimp] pygimp: replace gimp_drawable_get_tile2() by gimp_drawable_get_tile()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] pygimp: replace gimp_drawable_get_tile2() by gimp_drawable_get_tile()
- Date: Thu, 27 Jun 2019 11:45:28 +0000 (UTC)
commit 61fe89ad0251b63d3237bea29a941a5190357a1e
Author: Michael Natterer <mitch gimp org>
Date: Thu Jun 27 13:44:12 2019 +0200
pygimp: replace gimp_drawable_get_tile2() by gimp_drawable_get_tile()
plug-ins/pygimp/pygimp-drawable.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/plug-ins/pygimp/pygimp-drawable.c b/plug-ins/pygimp/pygimp-drawable.c
index cfc1ad98f6..29ff71672f 100644
--- a/plug-ins/pygimp/pygimp-drawable.c
+++ b/plug-ins/pygimp/pygimp-drawable.c
@@ -159,7 +159,7 @@ static PyObject *
drw_get_tile2(PyGimpDrawable *self, PyObject *args, PyObject *kwargs)
{
GimpTile *t;
- int shadow, x, y;
+ int shadow, x, y, row, col;
static char *kwlist[] = { "shadow", "x", "y", NULL };
@@ -174,7 +174,10 @@ drw_get_tile2(PyGimpDrawable *self, PyObject *args, PyObject *kwargs)
return Py_None;
}
- t = gimp_drawable_get_tile2(self->drawable, shadow, x, y);
+ col = x / TILE_WIDTH;
+ row = y / TILE_HEIGHT;
+
+ t = gimp_drawable_get_tile(self->drawable, shadow, col, row);
return pygimp_tile_new(t, self);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]