summaryrefslogtreecommitdiffstats
path: root/src/desktop.h
diff options
context:
space:
mode:
authorThomas Holder <thomas@thomas-holder.de>2018-09-12 14:43:47 +0000
committerThomas Holder <thomas@thomas-holder.de>2018-09-12 14:43:47 +0000
commit1fa0c72b664afa4803dffd463ed11ce01632ab76 (patch)
treec1f746d4e8f7a5d65541cf6c05d3cdc79b3f9c10 /src/desktop.h
parentFix preferences crash (diff)
downloadinkscape-1fa0c72b664afa4803dffd463ed11ce01632ab76.tar.gz
inkscape-1fa0c72b664afa4803dffd463ed11ce01632ab76.zip
New option to invert y-axis
Replaces all hard coded or implicit desktop coordinate usage with doc2dt multiplication. New global preference: Interface > Origin at upper left https://bugs.launchpad.net/inkscape/+bug/170049
Diffstat (limited to 'src/desktop.h')
-rw-r--r--src/desktop.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/desktop.h b/src/desktop.h
index a1281a5b8..9087f8d31 100644
--- a/src/desktop.h
+++ b/src/desktop.h
@@ -426,6 +426,9 @@ public:
Geom::Point doc2dt(Geom::Point const &p) const;
Geom::Point dt2doc(Geom::Point const &p) const;
+ bool is_yaxisdown() const { return _doc2dt[3] > 0; }
+ double yaxisdir() const { return _doc2dt[3]; }
+
void setDocument (SPDocument* doc) override;
bool shutdown() override;
void mouseover() override {}
@@ -455,18 +458,10 @@ private:
_scale = scale;
_update();
}
- void setScale( double scale ) {
- _scale = Geom::Scale(scale, -scale); // Y flip
- _update();
- }
void addScale( Geom::Scale scale) {
_scale *= scale;
_update();
}
- void addScale( double scale ) {
- _scale *= Geom::Scale(scale, -scale); // Y flip?? Check
- _update();
- }
void setRotate( Geom::Rotate rotate ) {
_rotate = rotate;