diff options
author | Tavian Barnes <tavianator@gmail.com> | 2011-09-15 15:20:43 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2011-09-16 13:54:26 -0400 |
commit | 2276a3a5708d3721393b4c119162a7908b88cec6 (patch) | |
tree | daf53baf058aa98c92fe3db90fe461434ae407a3 | |
parent | 1374b946398544a28ac989c75570d4b7c6937873 (diff) | |
download | dimension-2276a3a5708d3721393b4c119162a7908b88cec6.tar.xz |
Make Textures transformable.
-rw-r--r-- | libdimension-python/dimension.pyx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libdimension-python/dimension.pyx b/libdimension-python/dimension.pyx index 48e8de1..ac1a80b 100644 --- a/libdimension-python/dimension.pyx +++ b/libdimension-python/dimension.pyx @@ -834,6 +834,11 @@ cdef class Texture: self._texture.finish = finish._finish dmnsn_finish_incref(&self._texture.finish) + def transform(self, Matrix trans not None): + """Transform a texture.""" + self._texture.trans = dmnsn_matrix_mul(trans._m, self._texture.trans) + return self + cdef _Texture(dmnsn_texture *texture): cdef Texture self = Texture.__new__(Texture) self._texture = texture |