Code

Start working toward multiple inheritance
[inkscape.git] / src / libnr / nr-matrix-scale-ops.cpp
1 #include "libnr/nr-matrix-ops.h"
3 NR::Matrix
4 operator/(NR::Matrix const &m, NR::scale const &s)
5 {
6     using NR::X; using NR::Y;
7     NR::Matrix ret(m);
8     ret[0] /= s[X]; ret[1] /= s[Y];
9     ret[2] /= s[X]; ret[3] /= s[Y];
10     ret[4] /= s[X]; ret[5] /= s[Y];
11     return ret;
12 }
14 NR::Matrix
15 operator*(NR::Matrix const &m, NR::scale const &s)
16 {
17     using NR::X; using NR::Y;
18     NR::Matrix ret(m);
19     ret[0] *= s[X]; ret[1] *= s[Y];
20     ret[2] *= s[X]; ret[3] *= s[Y];
21     ret[4] *= s[X]; ret[5] *= s[Y];
22     return ret;
23 }
26 /*
27   Local Variables:
28   mode:c++
29   c-file-style:"stroustrup"
30   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
31   indent-tabs-mode:nil
32   fill-column:99
33   End:
34 */
35 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :