[gimp/gimp-2-10] pygimp: replace gimp_drawable_get_tile2() by gimp_drawable_get_tile()



commit 85117940ab72b56f4d7ec1be8b35d1e8d0b5268a
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()
    
    (cherry picked from commit 61fe89ad0251b63d3237bea29a941a5190357a1e)

 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]