Code

c1ea927e027aa9baa45ea2ef87ba6374f8dde1f0
[inkscape.git] / src / libnr / nr-translate.h
1 #ifndef SEEN_NR_TRANSLATE_H
2 #define SEEN_NR_TRANSLATE_H
4 #include <libnr/nr-point.h>
6 namespace NR {
8 class translate {
9 public:
10     Point offset;
11 private:
12     translate();
13 public:
14     explicit translate(Point const &p) : offset(p) {}
15     explicit translate(Coord const x, Coord const y) : offset(x, y) {}
16     Coord operator[](Dim2 const dim) const { return offset[dim]; }
17     Coord operator[](unsigned const dim) const { return offset[dim]; }
18 };
20 } /* namespace NR */
23 #endif /* !SEEN_NR_TRANSLATE_H */
25 /*
26   Local Variables:
27   mode:c++
28   c-file-style:"stroustrup"
29   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
30   indent-tabs-mode:nil
31   fill-column:99
32   End:
33 */
34 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :