diff options
Diffstat (limited to 'drawinglayer/source/tools/emfphelperdata.hxx')
-rw-r--r-- | drawinglayer/source/tools/emfphelperdata.hxx | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/drawinglayer/source/tools/emfphelperdata.hxx b/drawinglayer/source/tools/emfphelperdata.hxx index cf3474b5b1a7..d2ed1008b67b 100644 --- a/drawinglayer/source/tools/emfphelperdata.hxx +++ b/drawinglayer/source/tools/emfphelperdata.hxx @@ -21,6 +21,7 @@ #include <wmfemfhelper.hxx> #include <basegfx/matrix/b2dhommatrix.hxx> +#include <drawinglayer/attribute/linestartendattribute.hxx> #include <tools/stream.hxx> #include <basegfx/point/b2dpoint.hxx> #include <map> @@ -53,9 +54,9 @@ namespace emfplushelper #define EmfPlusRecordTypeFillRegion 0x4013 #define EmfPlusRecordTypeFillPath 0x4014 #define EmfPlusRecordTypeDrawPath 0x4015 - //TODO EmfPlusRecordTypeFillClosedCurve 0x4016 - //TODO EmfPlusRecordTypeDrawClosedCurve 0x4017 - //TODO EmfPlusRecordTypeDrawCurve 0x4018 + #define EmfPlusRecordTypeFillClosedCurve 0x4016 + #define EmfPlusRecordTypeDrawClosedCurve 0x4017 + #define EmfPlusRecordTypeDrawCurve 0x4018 #define EmfPlusRecordTypeDrawBeziers 0x4019 #define EmfPlusRecordTypeDrawImage 0x401A #define EmfPlusRecordTypeDrawImagePoints 0x401B @@ -210,9 +211,15 @@ namespace emfplushelper GraphicStateMap mGSStack; GraphicStateMap mGSContainerStack; + /* Performance optimizators */ + /* Extracted Scale values from Transformation Matrix */ + double mdExtractedXScale; + double mdExtractedYScale; + /// data holders wmfemfhelper::TargetHolders& mrTargetHolders; wmfemfhelper::PropertyHolders& mrPropertyHolders; + wmfemfhelper::PropertyHolder aGetDCState; bool bIsGetDCProcessing; // readers @@ -224,7 +231,10 @@ namespace emfplushelper // stack actions void GraphicStatePush(GraphicStateMap& map, sal_Int32 index); - void GraphicStatePop (GraphicStateMap& map, sal_Int32 index, wmfemfhelper::PropertyHolder& rState); + void GraphicStatePop(GraphicStateMap& map, sal_Int32 index); + + drawinglayer::attribute::LineStartEndAttribute CreateLineEnd(const sal_Int32 aCap, + const float aPenWidth) const; // primitive creators void EMFPPlusDrawPolygon(const ::basegfx::B2DPolyPolygon& polygon, sal_uInt32 penIndex); @@ -234,6 +244,14 @@ namespace emfplushelper // helper functions Color EMFPGetBrushColorOrARGBColor(const sal_uInt16 flags, const sal_uInt32 brushIndexOrColor) const; + enum class Direction + { + horizontal, + vertical + }; + sal_uInt32 DPI(Direction d) { return d == Direction::horizontal ? mnHDPI : mnVDPI; } + double unitToPixel(double n, sal_uInt32 aUnitType, Direction d); + public: EmfPlusHelperData( SvMemoryStream& rMS, @@ -252,8 +270,6 @@ namespace emfplushelper static void ReadRectangle(SvStream& s, float& x, float& y, float &width, float& height, bool bCompressed = false); static bool readXForm(SvStream& rIn, basegfx::B2DHomMatrix& rTarget); static ::basegfx::B2DPolyPolygon combineClip(::basegfx::B2DPolyPolygon const & leftPolygon, int combineMode, ::basegfx::B2DPolyPolygon const & rightPolygon); - - static float getUnitToPixelMultiplier(const UnitType aUnitType, const sal_uInt32 aDPI); }; } |