diff options
Diffstat (limited to 'src/document.h')
| -rw-r--r-- | src/document.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/document.h b/src/document.h index 609d665bc..fd7e15fc5 100644 --- a/src/document.h +++ b/src/document.h @@ -29,6 +29,7 @@ #include <glibmm/ustring.h> #include <sigc++/sigc++.h> +#include <2geom/affine.h> #include <2geom/forward.h> #include "3rdparty/libcroco/cr-cascade.h" @@ -390,7 +391,22 @@ private: sigc::signal<void> destroySignal; + mutable Geom::Affine _doc2dt; + public: + /// Document to desktop coordinate transformation. + const Geom::Affine &doc2dt() const; + /// Desktop to document coordinate transformation. + const Geom::Affine &dt2doc() const + { + // Note: doc2dt().inverse() happens to be identical to doc2dt() + return doc2dt(); + } + /// True if the desktop Y-axis points down, false if it points up. + bool is_yaxisdown() const { return yaxisdir() > 0; } + /// "1" if the desktop Y-axis points down, "-1" if it points up. + double yaxisdir() const { return _doc2dt[3]; } + void addUndoObserver(Inkscape::UndoStackObserver& observer); void removeUndoObserver(Inkscape::UndoStackObserver& observer); |
