[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/plugins/vectorshape
From: Inge Wallin <inge () lysator ! liu ! se>
Date: 2010-09-22 7:36:24
Message-ID: 20100922073624.75603AC888 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1178050 by ingwa:
Fix handling of SetWindowOrg when there are more than one of them in a
WMF file.
I expect this one to fix a lot of strange renderings.
NOTE: There is still something wrong with the calculation of the
boundingbox when there are many SetWindowOrg's.
M +18 -0 WmfPainter.cpp
--- trunk/koffice/plugins/vectorshape/WmfPainter.cpp #1178049:1178050
@@ -87,7 +87,25 @@
{
mOrgX = left;
mOrgY = top;
+
+ if (mRelativeCoord) {
+ // Translate back from last translation to the origin.
+ qreal dx = mInternalWorldMatrix.dx();
+ qreal dy = mInternalWorldMatrix.dy();
+ //kDebug(31000) << "old translation: " << dx << dy;
+ //kDebug(31000) << mInternalWorldMatrix;
+ //kDebug(31000) << "new translation: " << -orgX << -orgY;
+ mInternalWorldMatrix.translate(-dx, -dy);
+ mPainter->translate(-dx, -dy);
+
+ // Translate to the new origin.
+ mInternalWorldMatrix.translate(-left, -top);
+ mPainter->translate(-left, -top);
+ } else {
+ QRect rec = mPainter->window();
+ mPainter->setWindow(left, top, rec.width(), rec.height());
}
+}
void WmfPainter::setWindowExt(int width, int height)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic