diff options
author | Armin Le Grand <Armin.Le.Grand@cib.de> | 2017-06-22 13:03:50 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2017-07-15 11:01:30 +0200 |
commit | 34a0cb059c2bcfa62afe1dbd775cb69f637e130d (patch) | |
tree | e091b370e6f186f128a74d7b871fa88b5f09f964 /drawinglayer/source/tools/emfphelperdata.hxx | |
parent | emfplus: more corrections and rough geometry (diff) | |
download | core-34a0cb059c2bcfa62afe1dbd775cb69f637e130d.tar.gz core-34a0cb059c2bcfa62afe1dbd775cb69f637e130d.zip |
emfplus: unified transformations, added test code
More unifications, changed all Map*() methods to use a single
B2DHomMatrix which is created based on former stuff, XForm now
completely replaced. To check, added debug-only code and switches
to the VclPixelProcessor so that visual checks get easy when
using these modes (overlay of both methods with modded colors).
Also resynched to master.
Change-Id: I7b749f90bfde2ec1c2e49ee90ca2ef368da0547e
Diffstat (limited to 'drawinglayer/source/tools/emfphelperdata.hxx')
-rw-r--r-- | drawinglayer/source/tools/emfphelperdata.hxx | 52 |
1 files changed, 31 insertions, 21 deletions
diff --git a/drawinglayer/source/tools/emfphelperdata.hxx b/drawinglayer/source/tools/emfphelperdata.hxx index c2d799cfd5f5..a700df8dac6c 100644 --- a/drawinglayer/source/tools/emfphelperdata.hxx +++ b/drawinglayer/source/tools/emfphelperdata.hxx @@ -21,9 +21,17 @@ #define INCLUDED_DRAWINGLAYER_SOURCE_TOOLS_EMFPHELPERDATA_HXX #include <emfplushelper.hxx> +#include <basegfx/matrix/b2dhommatrix.hxx> +#include <tools/stream.hxx> +#include <basegfx/point/b2dpoint.hxx> +#include <basegfx/vector/b2dsize.hxx> //#include <com/sun/star/rendering/XCanvasFont.hpp> //#include <com/sun/star/rendering/TextDirection.hpp> +// predefines +class SvStream; +namespace basegfx { class B2DPolyPolygon; } + namespace emfplushelper { // EMF+ commands @@ -171,7 +179,7 @@ namespace emfplushelper // typedef struct // { -// basegfx::B2DHomMatrix aWorldTransform; +// basegfx::B2DHomMatrix maWorldTransform; // OutDevState aDevState; // } EmfPlusGraphicState; // @@ -181,29 +189,31 @@ namespace emfplushelper { private: /* EMF+ */ - basegfx::B2DHomMatrix aBaseTransform; - basegfx::B2DHomMatrix aWorldTransform; - std::unique_ptr<EMFPObject> aObjects[256]; - float fPageScale; - sal_Int32 nOriginX; - sal_Int32 nOriginY; - sal_Int32 nHDPI; - sal_Int32 nVDPI; + basegfx::B2DHomMatrix maBaseTransform; + basegfx::B2DHomMatrix maWorldTransform; + basegfx::B2DHomMatrix maMapTransform; + + std::unique_ptr<EMFPObject> maEMFPObjects[256]; + float mfPageScale; + sal_Int32 mnOriginX; + sal_Int32 mnOriginY; + sal_Int32 mnHDPI; + sal_Int32 mnVDPI; /* EMF+ emf header info */ - sal_Int32 mnFrameLeft; - sal_Int32 mnFrameTop; - sal_Int32 mnFrameRight; - sal_Int32 mnFrameBottom; - sal_Int32 mnPixX; - sal_Int32 mnPixY; - sal_Int32 mnMmX; - sal_Int32 mnMmY; + sal_Int32 mnFrameLeft; + sal_Int32 mnFrameTop; + sal_Int32 mnFrameRight; + sal_Int32 mnFrameBottom; + sal_Int32 mnPixX; + sal_Int32 mnPixY; + sal_Int32 mnMmX; + sal_Int32 mnMmY; /* multipart object data */ - bool mbMultipart; - sal_uInt16 mMFlags; - SvMemoryStream mMStream; + bool mbMultipart; + sal_uInt16 mMFlags; + SvMemoryStream mMStream; /* emf+ graphic state stack */ // GraphicStateMap mGSStack; @@ -218,7 +228,7 @@ namespace emfplushelper void ReadPoint(SvStream& s, float& x, float& y, sal_uInt32 flags); // internal mapper - void MapToDevice(double& x, double& y); + void mappingChanged(); // primitive creators void EMFPPlusDrawPolygon(const ::basegfx::B2DPolyPolygon& polygon, sal_uInt32 penIndex); |