Code

Super duper mega (fun!) commit: replaced encoding=utf-8 with fileencoding=utf-8 in...
[inkscape.git] / src / libnr / nr-translate-ops.h
1 #ifndef SEEN_NR_TRANSLATE_OPS_H
2 #define SEEN_NR_TRANSLATE_OPS_H
4 #include <libnr/nr-translate.h>
5 #include <libnr/nr-point-ops.h>
7 namespace NR {
9 inline bool operator==(translate const &a, translate const &b)
10 {
11     return a.offset == b.offset;
12 }
14 inline bool operator!=(translate const &a, translate const &b)
15 {
16     return !( a == b );
17 }
19 inline translate operator*(translate const &a, translate const &b)
20 {
21     return translate( a.offset + b.offset );
22 }
24 inline Point operator*(Point const &v, translate const &t)
25 {
26     return t.offset + v;
27 }
29 } /* namespace NR */
32 #endif /* !SEEN_NR_TRANSLATE_OPS_H */
34 /*
35   Local Variables:
36   mode:c++
37   c-file-style:"stroustrup"
38   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
39   indent-tabs-mode:nil
40   fill-column:99
41   End:
42 */
43 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :