summaryrefslogtreecommitdiff
path: root/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx')
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx30
1 files changed, 7 insertions, 23 deletions
diff --git a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
index c5c682222fde..337681e4d391 100644
--- a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
@@ -37,6 +37,7 @@
#include <svx/sdr/primitive2d/sdrattributecreator.hxx>
#include <svx/sdr/attribute/sdrallattribute.hxx>
#include <svx/sdr/primitive2d/sdrcaptionprimitive2d.hxx>
+#include <basegfx/matrix/b2dhommatrixtools.hxx>
//////////////////////////////////////////////////////////////////////////////
// includes for special text box shadow (SC)
@@ -83,30 +84,13 @@ namespace sdr
const Rectangle& rRectangle = rCaptionObj.GetGeoRect();
const ::basegfx::B2DRange aObjectRange(rRectangle.Left(), rRectangle.Top(), rRectangle.Right(), rRectangle.Bottom());
const GeoStat& rGeoStat(rCaptionObj.GetGeoStat());
- ::basegfx::B2DHomMatrix aObjectMatrix;
// fill object matrix
- if(!::basegfx::fTools::equalZero(aObjectRange.getWidth()))
- {
- aObjectMatrix.set(0, 0, aObjectRange.getWidth());
- }
-
- if(!::basegfx::fTools::equalZero(aObjectRange.getHeight()))
- {
- aObjectMatrix.set(1, 1, aObjectRange.getHeight());
- }
-
- if(rGeoStat.nShearWink)
- {
- aObjectMatrix.shearX(tan((36000 - rGeoStat.nShearWink) * F_PI18000));
- }
-
- if(rGeoStat.nDrehWink)
- {
- aObjectMatrix.rotate((36000 - rGeoStat.nDrehWink) * F_PI18000);
- }
-
- aObjectMatrix.translate(aObjectRange.getMinX(), aObjectRange.getMinY());
+ basegfx::B2DHomMatrix aObjectMatrix(basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix(
+ aObjectRange.getWidth(), aObjectRange.getHeight(),
+ rGeoStat.nShearWink ? tan((36000 - rGeoStat.nShearWink) * F_PI18000) : 0.0,
+ rGeoStat.nDrehWink ? (36000 - rGeoStat.nDrehWink) * F_PI18000 : 0.0,
+ aObjectRange.getMinX(), aObjectRange.getMinY()));
// calculate corner radius
double fCornerRadiusX;
@@ -164,7 +148,7 @@ namespace sdr
const sal_uInt32 nYDist(((SdrShadowYDistItem&)(rItemSet.Get(SDRATTR_SHADOWYDIST))).GetValue());
aObjectMatrix.translate(nXDist, nYDist);
- // create unit outline polygon as geometry (see SdrCaptionPrimitive2D::createLocalDecomposition)
+ // create unit outline polygon as geometry (see SdrCaptionPrimitive2D::create2DDecomposition)
basegfx::B2DPolygon aUnitOutline(basegfx::tools::createPolygonFromRect(basegfx::B2DRange(0.0, 0.0, 1.0, 1.0), fCornerRadiusX, fCornerRadiusY));
// create the specialized shadow primitive