summaryrefslogtreecommitdiff
path: root/drawinglayer/source/tools/emfphelperdata.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'drawinglayer/source/tools/emfphelperdata.hxx')
-rw-r--r--drawinglayer/source/tools/emfphelperdata.hxx34
1 files changed, 23 insertions, 11 deletions
diff --git a/drawinglayer/source/tools/emfphelperdata.hxx b/drawinglayer/source/tools/emfphelperdata.hxx
index 500ceb323b02..51561e3161fa 100644
--- a/drawinglayer/source/tools/emfphelperdata.hxx
+++ b/drawinglayer/source/tools/emfphelperdata.hxx
@@ -17,17 +17,16 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_DRAWINGLAYER_SOURCE_TOOLS_EMFPHELPERDATA_HXX
-#define INCLUDED_DRAWINGLAYER_SOURCE_TOOLS_EMFPHELPERDATA_HXX
+#pragma once
#include <wmfemfhelper.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <drawinglayer/attribute/linestartendattribute.hxx>
#include <tools/stream.hxx>
#include <basegfx/point/b2dpoint.hxx>
#include <map>
// predefines
-class SvStream;
namespace basegfx { class B2DPolyPolygon; }
namespace emfplushelper
@@ -54,9 +53,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
@@ -211,9 +210,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
@@ -225,7 +230,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);
@@ -235,6 +243,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,
@@ -253,11 +269,7 @@ 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);
};
}
-#endif // INCLUDED_DRAWINGLAYER_SOURCE_TOOLS_EMFPHELPERDATA_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */