Kaydet (Commit) 3bd7f23e authored tarafından Bartosz Kosiorek's avatar Bartosz Kosiorek

tdf#122557 EMF+ Implement Shearing for DrawImage records

Change-Id: If16afb7e56002153c962c32ded2e1dd6edda36fb
Reviewed-on: https://gerrit.libreoffice.org/66509
Tested-by: Jenkins
Reviewed-by: 's avatarBartosz Kosiorek <gang65@poczta.onet.pl>
üst 810e5008
...@@ -1205,6 +1205,8 @@ namespace emfplushelper ...@@ -1205,6 +1205,8 @@ namespace emfplushelper
::basegfx::B2DPoint aDstPoint; ::basegfx::B2DPoint aDstPoint;
::basegfx::B2DSize aDstSize; ::basegfx::B2DSize aDstSize;
double fShearX = 0.0;
double fShearY = 0.0;
if (type == EmfPlusRecordTypeDrawImagePoints) if (type == EmfPlusRecordTypeDrawImagePoints)
{ {
sal_uInt32 aCount; sal_uInt32 aCount;
...@@ -1223,6 +1225,8 @@ namespace emfplushelper ...@@ -1223,6 +1225,8 @@ namespace emfplushelper
aDstPoint = ::basegfx::B2DPoint(x1, y1); aDstPoint = ::basegfx::B2DPoint(x1, y1);
aDstSize = ::basegfx::B2DSize(x2 - x1, y3 - y1); aDstSize = ::basegfx::B2DSize(x2 - x1, y3 - y1);
fShearX = x3 - x1;
fShearY = y2 - y1;
} }
else else
{ {
...@@ -1239,12 +1243,14 @@ namespace emfplushelper ...@@ -1239,12 +1243,14 @@ namespace emfplushelper
aDstSize = ::basegfx::B2DSize(dw, dh); aDstSize = ::basegfx::B2DSize(dw, dh);
} }
// create correct transform matrix const basegfx::B2DHomMatrix aTransformMatrix = maMapTransform *
const basegfx::B2DHomMatrix aTransformMatrix = maMapTransform * basegfx::utils::createScaleTranslateB2DHomMatrix( basegfx::B2DHomMatrix(
aDstSize.getX(), /* Row 0, Column 0 */ aDstSize.getX(),
aDstSize.getY(), /* Row 0, Column 1 */ fShearX,
aDstPoint.getX(), /* Row 0, Column 2 */ aDstPoint.getX(),
aDstPoint.getY()); /* Row 1, Column 0 */ fShearY,
/* Row 1, Column 1 */ aDstSize.getY(),
/* Row 1, Column 2 */ aDstPoint.getY());
if (image.type == ImageDataTypeBitmap) if (image.type == ImageDataTypeBitmap)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment