Code

Super duper mega (fun!) commit: replaced encoding=utf-8 with fileencoding=utf-8 in...
[inkscape.git] / src / libnr / nr-matrix-translate-ops.h
1 #ifndef SEEN_LIBNR_NR_MATRIX_TRANSLATE_OPS_H
2 #define SEEN_LIBNR_NR_MATRIX_TRANSLATE_OPS_H
4 /** \file 
5  * Declarations (and definition if inline) of operator 
6  * blah (NR::Matrix, NR::translate).
7  */
9 #include "libnr/nr-matrix.h"
10 #include "libnr/nr-translate.h"
12 namespace NR {
14 inline Matrix &operator*=(Matrix &m, translate const &t) {
15     m[4] += t[X];
16     m[5] += t[Y];
17     return m;
18 }
20 inline Matrix operator*(Matrix const &m, translate const &t) { Matrix ret(m); ret *= t; return ret; }
22 inline Matrix operator/(Matrix const &numer, translate const &denom) { return numer * translate(-denom.offset); }
24 }
26 #endif /* !SEEN_LIBNR_NR_MATRIX_TRANSLATE_OPS_H */
28 /*
29   Local Variables:
30   mode:c++
31   c-file-style:"stroustrup"
32   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
33   indent-tabs-mode:nil
34   fill-column:99
35   End:
36 */
37 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :