summaryrefslogtreecommitdiff
path: root/vcl/source/filter/wmf/winmtf.hxx
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2013-11-25 16:21:12 +0100
committerAndras Timar <andras.timar@collabora.com>2013-11-26 04:05:31 -0600
commita39079ec9c3a017c912e45126ae980ff56127099 (patch)
treedffe978cbb48d83497a84ff8fff88f7ddad93f09 /vcl/source/filter/wmf/winmtf.hxx
parente6685ba6808a1315ebf0c8f988ef8533be193857 (diff)
fdo#61272: Do the mapping correctly both for WMF and EMF.
Turns out that for the WMF, we already had everything set up correctly, we were just overwriting the right settings with default data again :-) - fix that. Includes the following commits: * Revert "wmf-mm-text-1.diff: Fix WMF rendering, n#417818" * Revert "wmf-mm-text.diff: Fix WMF rendering, n#417818" * fdo#56886 EMF: Fixes some scaling problems of clipped regions, Twips Change-Id: I14b0c12b10f58eb7031f9da712dee76344c75159 Reviewed-on: https://gerrit.libreoffice.org/6802 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'vcl/source/filter/wmf/winmtf.hxx')
-rw-r--r--vcl/source/filter/wmf/winmtf.hxx20
1 files changed, 16 insertions, 4 deletions
diff --git a/vcl/source/filter/wmf/winmtf.hxx b/vcl/source/filter/wmf/winmtf.hxx
index bc368e6e6baa..dd80833c4233 100644
--- a/vcl/source/filter/wmf/winmtf.hxx
+++ b/vcl/source/filter/wmf/winmtf.hxx
@@ -278,6 +278,13 @@ struct WMF_EXTERNALHEADER;
#define PRIVATE_ESCAPE_UNICODE 2
+//Scalar constants
+
+#define UNDOCUMENTED_WIN_RCL_RELATION 32
+#define MS_FIXPOINT_BITCOUNT_28_4 4
+#define HUNDREDTH_MILLIMETERS_PER_MILLIINCH 2.54
+#define MILLIINCH_PER_TWIPS 1.44
+
//============================ WMFReader ==================================
#ifdef WIN_MTF_ASSERT
@@ -617,13 +624,14 @@ class WinMtfOutput
sal_uInt32 mnGfxMode;
sal_uInt32 mnMapMode;
- sal_uInt16 mnUnitsPerInch;
XForm maXForm;
sal_Int32 mnDevOrgX, mnDevOrgY;
sal_Int32 mnDevWidth, mnDevHeight;
sal_Int32 mnWinOrgX, mnWinOrgY; // aktuelles Window-Origin
sal_Int32 mnWinExtX, mnWinExtY; // aktuelles Window-Extent
+ sal_Bool mbIsMapWinSet;
+ sal_Bool mbIsMapDevSet;
sal_Int32 mnPixX, mnPixY; // Reference Device in pixel
sal_Int32 mnMillX, mnMillY; // Reference Device in Mill
@@ -636,11 +644,14 @@ class WinMtfOutput
void UpdateFillStyle();
Point ImplMap( const Point& rPt );
+ Point ImplScale( const Point& rPt );
Size ImplMap( const Size& rSz );
Rectangle ImplMap( const Rectangle& rRectangle );
void ImplMap( Font& rFont );
Polygon& ImplMap( Polygon& rPolygon );
PolyPolygon& ImplMap( PolyPolygon& rPolyPolygon );
+ Polygon& ImplScale( Polygon& rPolygon );
+ PolyPolygon& ImplScale( PolyPolygon& rPolyPolygon );
void ImplResizeObjectArry( sal_uInt32 nNewEntry );
void ImplSetNonPersistentLineColorTransparenz();
void ImplDrawClippedPolyPolygon( const PolyPolygon& rPolyPoly );
@@ -648,14 +659,15 @@ class WinMtfOutput
public:
+ void SetDevByWin(); //Hack to set varying defaults for incompletely defined files.
void SetDevOrg( const Point& rPoint );
void SetDevOrgOffset( sal_Int32 nXAdd, sal_Int32 nYAdd );
- void SetDevExt( const Size& rSize );
+ void SetDevExt( const Size& rSize ,sal_Bool regular = true);
void ScaleDevExt( double fX, double fY );
- void SetWinOrg( const Point& rPoint );
+ void SetWinOrg( const Point& rPoint , sal_Bool bIsEMF = false);
void SetWinOrgOffset( sal_Int32 nX, sal_Int32 nY );
- void SetWinExt( const Size& rSize );
+ void SetWinExt( const Size& rSize , sal_Bool bIsEMF = false);
void ScaleWinExt( double fX, double fY );
void SetrclBounds( const Rectangle& rRect );