X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Fdocument.cpp;h=c41c848d3f289f213473ba3ec92ffd0eb4de2e4c;hp=bcf003b02d47c64c634b1ebbdf544018c9c442f3;hb=326f04a375ce3120f7e8957e3d7cd5f296f513e3;hpb=ef0af5fd0129161a9e079bd3cd1298b53f1fe11a;ds=inline diff --git a/src/document.cpp b/src/document.cpp index bcf003b..c41c848 100644 --- a/src/document.cpp +++ b/src/document.cpp @@ -4,6 +4,7 @@ #include #include "../contrib/pugixml-1.4/src/pugixml.cpp" +#include "transformationtype.h" #include "stb_truetype.h" @@ -1059,8 +1060,8 @@ void Document::TranslateObjects(const Real & dx, const Real & dy, ObjectType typ for (unsigned i = 0; i < m_objects.paths.size(); ++i) { Path & p = m_objects.paths[i]; - p.x += dx; - p.y += dy; + p.m_bounds.x += dx; + p.m_bounds.y += dy; } return; #endif @@ -1081,14 +1082,14 @@ void Document::ScaleObjectsAboutPoint(const Real & x, const Real & y, const Real for (unsigned i = 0; i < m_objects.paths.size(); ++i) { Path & p = m_objects.paths[i]; - p.w /= scale_amount; - p.h /= scale_amount; - p.x -= x; - p.x /= scale_amount; - p.x += x; - p.y -= y; - p.y /= scale_amount; - p.y += y; + p.m_bounds.w /= scale_amount; + p.m_bounds.h /= scale_amount; + p.m_bounds.x -= x; + p.m_bounds.x /= scale_amount; + p.m_bounds.x += x; + p.m_bounds.y -= y; + p.m_bounds.y /= scale_amount; + p.m_bounds.y += y; } return; #endif