diff options
| author | Thomas Holder <speleo3@users.sourceforge.net> | 2008-12-08 21:54:37 +0000 |
|---|---|---|
| committer | speleo3 <speleo3@users.sourceforge.net> | 2008-12-08 21:54:37 +0000 |
| commit | 8e49988bb83bac954fad4e8648acf2e3d65f96ff (patch) | |
| tree | 33d0a04a1de69f23c4228fedaf0734709be8550e /src/desktop-affine.cpp | |
| parent | "make check" now compiles and runs on Linux. (diff) | |
| download | inkscape-8e49988bb83bac954fad4e8648acf2e3d65f96ff.tar.gz inkscape-8e49988bb83bac954fad4e8648acf2e3d65f96ff.zip | |
Make all tools consider full parent transform (up to document, not just up to root)
See http://wiki.inkscape.org/wiki/index.php/ViewBoxToDo
(bzr r6974)
Diffstat (limited to 'src/desktop-affine.cpp')
| -rw-r--r-- | src/desktop-affine.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/desktop-affine.cpp b/src/desktop-affine.cpp index 25c5c99b8..95640c957 100644 --- a/src/desktop-affine.cpp +++ b/src/desktop-affine.cpp @@ -13,10 +13,21 @@ */ #include "desktop.h" -#include "document.h" -#include "sp-root.h" +//#include "document.h" +//#include "sp-root.h" //#include "libnr/nr-matrix-ops.h" +Geom::Matrix const sp_desktop_dt2doc_affine (SPDesktop const *dt) +{ + return dt->doc2dt().inverse(); +} + +Geom::Point sp_desktop_dt2doc_xy_point(SPDesktop const *dt, Geom::Point const p) +{ + return p * sp_desktop_dt2doc_affine(dt); +} + +#if 0 Geom::Matrix const sp_desktop_root2dt_affine (SPDesktop const *dt) { SPRoot const *root = SP_ROOT(SP_DOCUMENT_ROOT(dt->doc())); @@ -37,4 +48,5 @@ Geom::Point sp_desktop_dt2root_xy_point(SPDesktop const *dt, Geom::Point const p { return p * sp_desktop_dt2root_affine(dt); } +#endif |
