summaryrefslogtreecommitdiff
path: root/drawinglayer/source/primitive2d/textprimitive2d.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'drawinglayer/source/primitive2d/textprimitive2d.cxx')
-rw-r--r--drawinglayer/source/primitive2d/textprimitive2d.cxx22
1 files changed, 8 insertions, 14 deletions
diff --git a/drawinglayer/source/primitive2d/textprimitive2d.cxx b/drawinglayer/source/primitive2d/textprimitive2d.cxx
index f8e413da0e8c..6caafd1911ce 100644
--- a/drawinglayer/source/primitive2d/textprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/textprimitive2d.cxx
@@ -42,6 +42,7 @@
#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
#include <drawinglayer/primitive2d/texteffectprimitive2d.hxx>
+#include <basegfx/matrix/b2dhommatrixtools.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -199,17 +200,14 @@ namespace drawinglayer
if(nCount)
{
// prepare object transformation for polygons
- rTransformation.identity();
- rTransformation.scale(aScale.getX(), aScale.getY());
- rTransformation.shearX(fShearX);
- rTransformation.rotate(fRotate);
- rTransformation.translate(aTranslate.getX(), aTranslate.getY());
+ rTransformation = basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix(
+ aScale, fShearX, fRotate, aTranslate);
}
}
}
}
- Primitive2DSequence TextSimplePortionPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
+ Primitive2DSequence TextSimplePortionPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
{
Primitive2DSequence aRetval;
@@ -269,7 +267,7 @@ namespace drawinglayer
const FontAttributes& rFontAttributes,
const ::com::sun::star::lang::Locale& rLocale,
const basegfx::BColor& rFontColor)
- : BasePrimitive2D(),
+ : BufferedDecompositionPrimitive2D(),
maTextTransform(rNewTransform),
maText(rText),
maTextPosition(aTextPosition),
@@ -296,7 +294,7 @@ namespace drawinglayer
bool TextSimplePortionPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
{
- if(BasePrimitive2D::operator==(rPrimitive))
+ if(BufferedDecompositionPrimitive2D::operator==(rPrimitive))
{
const TextSimplePortionPrimitive2D& rCompare = (TextSimplePortionPrimitive2D&)rPrimitive;
@@ -345,12 +343,8 @@ namespace drawinglayer
if(!aNewRange.isEmpty())
{
// prepare object transformation for range
- basegfx::B2DHomMatrix aRangeTransformation;
-
- aRangeTransformation.scale(aScale.getX(), aScale.getY());
- aRangeTransformation.shearX(fShearX);
- aRangeTransformation.rotate(fRotate);
- aRangeTransformation.translate(aTranslate.getX(), aTranslate.getY());
+ const basegfx::B2DHomMatrix aRangeTransformation(basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix(
+ aScale, fShearX, fRotate, aTranslate));
// apply range transformation to it
aNewRange.transform(aRangeTransformation);