25 #ifndef __SYNFIG_STUDIO_DUCK_TRANSFORM_MATRIX_H
26 #define __SYNFIG_STUDIO_DUCK_TRANSFORM_MATRIX_H
31 #include <synfig/matrix.h>
44 synfig::Matrix transform;
45 synfig::Matrix inverse_transform;
52 if (transform.is_invertible())
53 (inverse_transform = transform).invert();
55 synfig::warning(
"%s:%d passed a non-invertible matrix", __FILE__, __LINE__);
58 synfig::Vector
perform(
const synfig::Vector& x)
const
60 return transform.get_transformed(x);
62 synfig::Vector
unperform(
const synfig::Vector& x)
const
64 return inverse_transform.get_transformed(x);