From 678a055115cd6f05495a69986a046947b2dd1a12 Mon Sep 17 00:00:00 2001 From: matham Date: Thu, 25 Oct 2018 14:20:00 -0400 Subject: [PATCH] Update transformation.pyx --- kivy/graphics/transformation.pyx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/kivy/graphics/transformation.pyx b/kivy/graphics/transformation.pyx index e1f5b023a..2a5d9d919 100644 --- a/kivy/graphics/transformation.pyx +++ b/kivy/graphics/transformation.pyx @@ -440,6 +440,13 @@ cdef class Matrix: cpdef tuple transform_point(Matrix self, double x, double y, double z, t=None): + '''Transforms the point by the matrix and returns the transformed point + as a ``(x, y, z)`` tuple. If the point is a vector ``v``, the returned + values is ``v2 = matrix * v``. + + If ``t`` is provided, it multiplies it with the last column of the matrix + and returns the transformed ``(x, y, z, t)``. + ''' cdef double tx, ty, tz, tt tx = x * self.mat[0] + y * self.mat[4] + z * self.mat[ 8] + self.mat[12]; ty = x * self.mat[1] + y * self.mat[5] + z * self.mat[ 9] + self.mat[13];