Code

Applied patch #1505715
[inkscape.git] / src / libnr / nr-translate-matrix-ops.cpp
1 #include "libnr/nr-matrix-ops.h"
3 namespace NR {
5 Matrix
6 operator*(translate const &t, Matrix const &m)
7 {
8     Matrix ret(m);
9     ret[4] += m[0] * t[X] + m[2] * t[Y];
10     ret[5] += m[1] * t[X] + m[3] * t[Y];
11     assert_close( ret, Matrix(t) * m );
12     return ret;
13 }
15 }  /* namespace NR */
18 /*
19   Local Variables:
20   mode:c++
21   c-file-style:"stroustrup"
22   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
23   indent-tabs-mode:nil
24   fill-column:99
25   End:
26 */
27 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :