1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 #include <config_options.h>
22 #include <basegfx/utils/b2dclipstate.hxx>
23 #include <tools/poly.hxx>
24 #include <vcl/font.hxx>
25 #include <vcl/bitmapex.hxx>
26 #include <vcl/lineinfo.hxx>
27 #include <vcl/rendercontext/State.hxx>
28 #include <vcl/metaact.hxx>
29 #include <rtl/ref.hxx>
31 #include "emfiodllapi.h"
35 /* [MS-EMF] - v20210625 - pages 43, 107 */
36 enum class RegionMode
: sal_uInt32
45 /* [MS-EMF] - v20210625 - pages 40, 198 */
46 enum class BackgroundMode
: sal_uInt32
53 /* [MS-EMF] - v20210625 - pages 40, 210 */
55 enum class ModifyWorldTransformMode
: sal_uInt32
58 MWT_LEFTMULTIPLY
= 0x02,
59 MWT_RIGHTMULTIPLY
= 0x03,
63 constexpr sal_uInt32 ENHMETA_STOCK_OBJECT
= 0x80000000;
65 /* [MS-EMF] - v20210625 - pages 44, 45, 182 */
66 /* Stock Logical Objects */
67 enum class StockObject
: sal_uInt32
80 SYSTEM_FIXED_FONT
= 16
83 /* Note: This enum is incomplete compared to the specification */
84 /* [MS-WMF] - v20210625 - pages 25-26 */
85 enum class WMFRasterOp
: sal_uInt16
95 /* Note: We have MapMode elsewhere, so we use MappingMode instead */
96 /* [MS-EMF] - v20210625 - pages 38-50, 202 */
98 enum MappingMode
: sal_uInt32
107 MM_ANISOTROPIC
= 0x08
110 /* Note: No type is specified, but 32-bit unsigned is used to provide
111 * to match the number of bits in the binary literal, and also the
112 * previous definition of SetGfxMode() and GetGfxMode() functions */
113 /* [MS-EMF] - v20210625 - pages 35 */
115 enum class GraphicsMode
: sal_uInt32
117 GM_COMPATIBLE
= 0x00000001,
118 GM_ADVANCED
= 0x00000002
121 /* [MS-WMF] - v20210625 - pages 46 */
122 /* StretchBlt() modes */
123 enum class StretchMode
: sal_uInt16
125 BLACKONWHITE
= 0x0001,
126 WHITEONBLACK
= 0x0002,
127 COLORONCOLOR
= 0x0003,
129 STRETCH_ANDSCANS
= BLACKONWHITE
,
130 STRETCH_ORSCANS
= WHITEONBLACK
,
131 STRETCH_DELETESCANS
= COLORONCOLOR
134 constexpr sal_Int32 LF_FACESIZE
= 32;
140 sal_Int32 lfEscapement
;
141 sal_Int32 lfOrientation
;
144 sal_uInt8 lfUnderline
;
145 sal_uInt8 lfStrikeOut
;
147 sal_uInt8 lfOutPrecision
;
148 sal_uInt8 lfClipPrecision
;
150 sal_uInt8 lfPitchAndFamily
;
151 OUString alfFaceName
;
165 , lfPitchAndFamily(0)
170 /* [MS-WMF] - v20210625 - pages 153 */
171 enum TextAlignmentMode
: sal_uInt16
173 TA_NOUPDATECP
= 0x0000,
174 TA_UPDATECP
= 0x0001,
178 TA_RIGHT_CENTER
= (TA_RIGHT
| TA_CENTER
),
181 // In [MS-WMF] 2.1.2.3, TA_BASELINE value is wrong.
182 // It is 0x0018 and it should be 0x0010.
183 TA_BASELINE
= 0x0010,
184 TA_RTLREADING
= 0x0100
187 /* Note: This enum is incomplete compared to the specification */
188 /* [MS-EMF] - v20210625 - pages 47-50, 126 */
189 /* Ternary raster operations */
190 enum TernaryRasterOperation
: sal_uInt32
192 SRCCOPY
= 0x00CC0020L
,
193 SRCPAINT
= 0x00EE0086L
,
194 SRCAND
= 0x008800C6L
,
195 SRCINVERT
= 0x00660046L
,
196 SRCERASE
= 0x00440328L
,
197 PATCOPY
= 0x00F00021L
,
198 PATINVERT
= 0x005A0049L
,
199 BLACKNESS
= 0x00000042L
,
200 WHITENESS
= 0x00FF0062L
203 /* [MS-EMF] - v20210625 - pages 40, 41, 65 */
204 enum PenStyle
: sal_uInt32
206 PS_COSMETIC
= 0x00000000,
207 PS_SOLID
= 0x00000000,
208 PS_DASH
= 0x00000001,
210 PS_DASHDOT
= 0x00000003,
211 PS_DASHDOTDOT
= 0x00000004,
212 PS_NULL
= 0x00000005,
213 PS_INSIDEFRAME
= 0x00000006,
214 PS_USERSTYLE
= 0x00000007,
215 PS_ALTERNATE
= 0x00000008,
216 PS_STYLE_MASK
= 0x0000000F,
218 PS_ENDCAP_ROUND
= 0x00000000,
219 PS_ENDCAP_SQUARE
= 0x00000100,
220 PS_ENDCAP_FLAT
= 0x00000200,
221 PS_ENDCAP_STYLE_MASK
= 0x00000F00,
223 PS_JOIN_ROUND
= 0x00000000,
224 PS_JOIN_BEVEL
= 0x00001000,
225 PS_JOIN_MITER
= 0x00002000,
226 PS_JOIN_STYLE_MASK
= 0x0000F000,
228 PS_GEOMETRIC
= 0x00010000
231 /* [MS-WMF] - v20210625 - pages 30, 82 */
233 enum CharacterSet
: sal_uInt8
235 ANSI_CHARSET
= 0x00000000,
236 DEFAULT_CHARSET
= 0x00000001,
237 SYMBOL_CHARSET
= 0x00000002,
238 SHIFTJIS_CHARSET
= 0x00000080,
239 HANGUL_CHARSET
= 0x00000081,
240 GB2312_CHARSET
= 0x00000086,
241 CHINESEBIG5_CHARSET
= 0x00000088,
242 OEM_CHARSET
= 0x000000FF,
243 /* WINVER >= 0x0400 */
244 MAC_CHARSET
= 0x0000004D,
245 JOHAB_CHARSET
= 0x00000082,
246 GREEK_CHARSET
= 0x000000A1,
247 TURKISH_CHARSET
= 0x000000A2,
248 VIETNAMESE_CHARSET
= 0x000000A3,
249 HEBREW_CHARSET
= 0x000000B1,
250 ARABIC_CHARSET
= 0x000000B2,
251 BALTIC_CHARSET
= 0x000000BA,
252 RUSSIAN_CHARSET
= 0x000000CC,
253 THAI_CHARSET
= 0x000000DE,
254 EASTEUROPE_CHARSET
= 0x000000EE
257 /* Note: This enum is incomplete compared to the specification */
258 /* [MS-EMF] - v20210625 - pages 32, 283 */
259 enum ExtTextOutOptions
: sal_uInt32
262 ETO_CLIPPED
= 0x0004,
263 /* WINVER >= 0x0400 */
264 ETO_GLYPH_INDEX
= 0x0010,
265 ETO_RTLREADING
= 0x0080,
266 /* _WIN32_WINNT >= 0x0500 */
267 ETO_NO_RECT
= 0x0100,
271 /* [MS-WMF] - v20210625 - pages 44, 96 */
272 /* This is packed into a byte as 2 bits */
273 enum PitchFont
: sal_uInt8
280 /* [MS-WMF] - v20210625 - pages 33, */
281 enum FamilyFont
: sal_uInt8
306 /* [MS-WMF] - v20210625 - pages 29, 30, 182 */
307 enum class BrushStyle
: sal_uInt16
318 BS_DIBPATTERN8X8
= 8,
322 constexpr sal_Int32 RDH_RECTANGLES
= 1;
323 constexpr sal_Int32 W_MFCOMMENT
= 15;
324 constexpr sal_Int32 PRIVATE_ESCAPE_UNICODE
= 2;
327 constexpr sal_Int32 UNDOCUMENTED_WIN_RCL_RELATION
= 32;
328 constexpr sal_Int32 MS_FIXPOINT_BITCOUNT_28_4
= 4;
331 //============================ WmfReader ==================================
337 basegfx::utils::B2DClipState maClip
;
340 WinMtfClipPath() : maClip() {};
342 void setClipPath(const basegfx::B2DPolyPolygon
&, RegionMode nClippingMode
);
343 void intersectClip(const basegfx::B2DPolyPolygon
& rPolyPolygon
);
344 void excludeClip(const basegfx::B2DPolyPolygon
& rPolyPolygon
);
345 void moveClipRegion(const Size
& rSize
);
346 void setDefaultClipPath();
348 bool isEmpty() const { return maClip
.isCleared(); }
350 basegfx::utils::B2DClipState
const & getClip() const { return maClip
; }
351 basegfx::B2DPolyPolygon
const & getClipPath() const;
353 bool operator==(const WinMtfClipPath
& rPath
) const
355 return maClip
== rPath
.maClip
;
359 class WinMtfPathObj
: public tools::PolyPolygon
376 void AddPoint(const Point
& rPoint
);
377 void AddPolygon(const tools::Polygon
& rPoly
);
378 void AddPolyLine(const tools::Polygon
& rPoly
);
379 void AddPolyPolygon(const tools::PolyPolygon
& rPolyPolygon
);
382 struct EMFIO_DLLPUBLIC GDIObj
385 GDIObj(GDIObj
const &) = default;
386 virtual ~GDIObj() = default; // Polymorphic base class
387 GDIObj
& operator =(GDIObj
const &) = default;
390 struct EMFIO_DLLPUBLIC WinMtfFontStyle final
: GDIObj
394 explicit WinMtfFontStyle(LOGFONTW
const & rLogFont
);
397 enum class WinMtfFillStyleType
402 struct WinMtfFillStyle final
: GDIObj
406 WinMtfFillStyleType aType
;
410 : aFillColor(COL_BLACK
)
411 , bTransparent(false)
412 , aType(WinMtfFillStyleType::Solid
)
415 WinMtfFillStyle(const Color
& rColor
, bool bTrans
= false)
417 , bTransparent(bTrans
)
418 , aType(WinMtfFillStyleType::Solid
)
421 explicit WinMtfFillStyle(Bitmap
const & rBmp
)
422 : bTransparent(false)
423 , aType(WinMtfFillStyleType::Pattern
)
427 bool operator==(const WinMtfFillStyle
& rStyle
) const
429 return aFillColor
== rStyle
.aFillColor
430 && bTransparent
== rStyle
.bTransparent
431 && aType
== rStyle
.aType
;
436 struct WinMtfPalette final
: GDIObj
438 std::vector
< Color
> aPaletteColors
;
441 : aPaletteColors(std::vector
< Color
>{})
444 WinMtfPalette(const std::vector
< Color
> rPaletteColors
)
445 : aPaletteColors(rPaletteColors
)
451 struct WinMtfLineStyle final
: GDIObj
458 : aLineColor(COL_BLACK
)
459 , bTransparent(false)
462 WinMtfLineStyle(const Color
& rColor
, bool bTrans
= false)
464 , bTransparent(bTrans
)
467 WinMtfLineStyle(const Color
& rColor
, const sal_uInt32 nStyle
, const sal_Int32 nPenWidth
)
470 // According to documentation: nStyle = PS_COSMETIC = 0x0 - line with a width of one logical unit and a style that is a solid color
471 // tdf#140271 Based on observed behaviour the line width is not constant with PS_COSMETIC
473 // Width 0 means default width for LineInfo (HairLine) with 1 pixel wide
474 aLineInfo
.SetWidth(nPenWidth
);
475 switch (nStyle
& PS_STYLE_MASK
)
478 aLineInfo
.SetStyle(LineStyle::Dash
);
479 aLineInfo
.SetDashCount(1);
480 aLineInfo
.SetDotCount(2);
483 aLineInfo
.SetStyle(LineStyle::Dash
);
484 aLineInfo
.SetDashCount(1);
485 aLineInfo
.SetDotCount(1);
488 aLineInfo
.SetStyle(LineStyle::Dash
);
489 aLineInfo
.SetDashCount(0);
490 aLineInfo
.SetDotCount(1);
493 aLineInfo
.SetStyle(LineStyle::Dash
);
494 aLineInfo
.SetDashCount(1);
495 aLineInfo
.SetDotCount(0);
498 aLineInfo
.SetStyle(LineStyle::NONE
);
500 case PS_INSIDEFRAME
: // TODO Implement PS_INSIDEFRAME
503 aLineInfo
.SetStyle(LineStyle::Solid
);
506 switch (nStyle
& PS_ENDCAP_STYLE_MASK
)
508 case PS_ENDCAP_ROUND
:
509 aLineInfo
.SetLineCap(css::drawing::LineCap_ROUND
);
511 case PS_ENDCAP_SQUARE
:
512 aLineInfo
.SetLineCap(css::drawing::LineCap_SQUARE
);
516 aLineInfo
.SetLineCap(css::drawing::LineCap_BUTT
);
519 aLineInfo
.SetLineCap(css::drawing::LineCap_BUTT
);
520 switch (nStyle
& PS_JOIN_STYLE_MASK
)
523 aLineInfo
.SetLineJoin(basegfx::B2DLineJoin::Round
);
526 aLineInfo
.SetLineJoin(basegfx::B2DLineJoin::Bevel
);
528 // Undocumented but based on experiments with MS Paint and MS Word,
529 // the default Join Style is PS_JOIN_MITER
532 aLineInfo
.SetLineJoin(basegfx::B2DLineJoin::Miter
);
534 bTransparent
= aLineInfo
.GetStyle() == LineStyle::NONE
;
537 bool operator==(const WinMtfLineStyle
& rStyle
) const
539 return aLineColor
== rStyle
.aLineColor
540 && bTransparent
== rStyle
.bTransparent
541 && aLineInfo
== rStyle
.aLineInfo
;
564 SvStream
& operator >> (SvStream
& rInStream
, XForm
& rXForm
);
568 BackgroundMode nBkMode
;
569 MappingMode eMapMode
;
570 GraphicsMode eGfxMode
;
571 vcl::text::ComplexTextLayoutFlags nTextLayoutMode
;
572 sal_Int32 nWinOrgX
, nWinOrgY
, nWinExtX
, nWinExtY
;
573 sal_Int32 nDevOrgX
, nDevOrgY
, nDevWidth
, nDevHeight
;
575 WinMtfLineStyle aLineStyle
;
576 WinMtfFillStyle aFillStyle
;
581 sal_uInt32 nTextAlign
;
585 WinMtfPathObj maPathObj
;
586 WinMtfClipPath maClipPath
;
589 bool bClockWiseArcDirection
;
590 bool bFillStyleSelected
;
596 tools::Rectangle aOutRect
;
598 bool m_bForceAlpha
= false;
600 BSaveStruct(const Bitmap
& rBmp
, const tools::Rectangle
& rOutRect
, sal_uInt32 nRop
)
606 BSaveStruct(const BitmapEx
& rBmpEx
, const tools::Rectangle
& rOutRect
, sal_uInt32 nRop
,
607 bool bForceAlpha
= false)
611 , m_bForceAlpha(bForceAlpha
)
615 // tdf#127471 implement detection and correction of wrongly scaled
616 // fonts in own-written, old (before this fix) EMF/WMF files
617 class ScaledFontDetectCorrectHelper
620 rtl::Reference
<MetaFontAction
> maCurrentMetaFontAction
;
621 std::vector
<double> maAlternativeFontScales
;
622 std::vector
<std::pair
<rtl::Reference
<MetaFontAction
>, double>> maPositiveIdentifiedCases
;
623 std::vector
<std::pair
<rtl::Reference
<MetaFontAction
>, double>> maNegativeIdentifiedCases
;
626 ScaledFontDetectCorrectHelper();
627 void endCurrentMetaFontAction();
628 void newCurrentMetaFontAction(const rtl::Reference
<MetaFontAction
>& rNewMetaFontAction
);
629 void evaluateAlternativeFontScale(OUString
const & rText
, tools::Long nImportedTextLength
);
630 void applyAlternativeFontScale();
635 MtfTools(MtfTools
const &) = delete;
636 MtfTools
& operator =(MtfTools
const &) = delete;
639 WinMtfPathObj maPathObj
;
640 WinMtfClipPath maClipPath
;
642 WinMtfLineStyle maLatestLineStyle
;
643 WinMtfLineStyle maLineStyle
;
644 WinMtfLineStyle maNopLineStyle
;
645 WinMtfFillStyle maLatestFillStyle
;
646 WinMtfFillStyle maFillStyle
;
647 WinMtfFillStyle maNopFillStyle
;
648 WinMtfPalette maPalette
;
650 vcl::Font maLatestFont
;
652 sal_uInt32 mnLatestTextAlign
;
653 sal_uInt32 mnTextAlign
;
654 Color maLatestTextColor
;
656 Color maLatestBkColor
;
658 vcl::text::ComplexTextLayoutFlags mnLatestTextLayoutMode
;
659 vcl::text::ComplexTextLayoutFlags mnTextLayoutMode
;
660 BackgroundMode mnLatestBkMode
;
661 BackgroundMode mnBkMode
;
662 RasterOp meLatestRasterOp
;
665 std::vector
< std::unique_ptr
<GDIObj
> > mvGDIObj
;
668 std::vector
< std::shared_ptr
<SaveStruct
> > mvSaveStack
;
670 GraphicsMode meGfxMode
;
671 MappingMode meMapMode
;
676 sal_Int32 mnDevWidth
;
677 sal_Int32 mnDevHeight
;
683 sal_Int32 mnPixX
; // Reference Device in pixel
684 sal_Int32 mnPixY
; // Reference Device in pixel
685 sal_Int32 mnMillX
; // Reference Device in Mill
686 sal_Int32 mnMillY
; // Reference Device in Mill
687 tools::Rectangle mrclFrame
;
688 tools::Rectangle mrclBounds
;
690 GDIMetaFile
* mpGDIMetaFile
;
692 SvStream
* mpInputStream
; // the WMF/EMF file to be read
693 sal_uInt32 mnStartPos
;
695 std::vector
<BSaveStruct
> maBmpSaveList
;
697 // tdf#127471 always try to detect - only used with ScaledText
698 ScaledFontDetectCorrectHelper maScaledFontHelper
;
701 bool mbClockWiseArcDirection
: 1;
702 bool mbFillStyleSelected
: 1;
703 bool mbClipNeedsUpdate
: 1;
704 bool mbComplexClip
: 1;
705 bool mbIsMapWinSet
: 1;
706 bool mbIsMapDevSet
: 1;
708 void UpdateLineStyle();
709 void UpdateFillStyle();
711 Point
ImplMap(const Point
& rPt
);
712 Point
ImplScale(const Point
& rPt
);
713 Size
ImplMap(const Size
& rSize
, bool bDoWorldTransform
= true);
714 tools::Rectangle
ImplMap(const tools::Rectangle
& rRectangle
);
715 void ImplMap(vcl::Font
& rFont
);
716 tools::Polygon
& ImplMap(tools::Polygon
& rPolygon
);
717 tools::PolyPolygon
& ImplMap(tools::PolyPolygon
& rPolyPolygon
);
718 void ImplScale(tools::Polygon
& rPolygon
);
719 tools::PolyPolygon
& ImplScale(tools::PolyPolygon
& rPolyPolygon
);
720 void ImplResizeObjectArry(sal_uInt32 nNewEntry
);
721 void ImplSetNonPersistentLineColorTransparenz();
722 void ImplDrawClippedPolyPolygon(const tools::PolyPolygon
& rPolyPoly
);
723 void ImplDrawBitmap(const Point
& rPos
, const Size
& rSize
, const BitmapEx
& rBitmap
);
727 void SetDevByWin(); //Hack to set varying defaults for incompletely defined files.
728 void SetDevOrg(const Point
& rPoint
);
729 void SetDevOrgOffset(sal_Int32 nXAdd
, sal_Int32 nYAdd
);
730 void SetDevExt(const Size
& rSize
, bool regular
= true);
731 void ScaleDevExt(double fX
, double fY
);
733 void SetWinOrg(const Point
& rPoint
, bool bIsEMF
= false);
734 Point
GetWinOrg() { return Point(mnWinOrgX
, mnWinOrgY
); }
735 void SetWinOrgOffset(sal_Int32 nX
, sal_Int32 nY
);
736 void SetWinExt(const Size
& rSize
, bool bIsEMF
= false);
737 void ScaleWinExt(double fX
, double fY
);
739 void SetrclBounds(const tools::Rectangle
& rRect
);
740 void SetrclFrame(const tools::Rectangle
& rRect
);
741 void SetRefPix(const Size
& rSize
);
742 void SetRefMill(const Size
& rSize
);
744 void SetMapMode(MappingMode mnMapMode
);
745 void SetWorldTransform(const XForm
& rXForm
);
746 void ModifyWorldTransform(const XForm
& rXForm
, ModifyWorldTransformMode nMode
);
749 void Pop( const sal_Int32 nSavedDC
= -1 );
751 WMFRasterOp
SetRasterOp(WMFRasterOp nRasterOp
);
752 void StrokeAndFillPath(bool bStroke
, bool bFill
);
754 void SetArcDirection(bool bCounterClockWise
);
755 bool IsArcDirectionClockWise() { return mbClockWiseArcDirection
; };
756 void SetGfxMode(GraphicsMode nGfxMode
) { meGfxMode
= nGfxMode
; };
757 GraphicsMode
GetGfxMode() const { return meGfxMode
; };
758 void SetBkMode(BackgroundMode nMode
);
759 void SetBkColor(const Color
& rColor
);
760 void SetTextColor(const Color
& rColor
);
761 void SetTextAlign(sal_uInt32 nAlign
);
763 void CreateObject(std::unique_ptr
<GDIObj
> pObject
);
764 void CreateObjectIndexed(sal_uInt32 nIndex
, std::unique_ptr
<GDIObj
> pObject
);
767 void DeleteObject(sal_uInt32 nIndex
);
768 void SelectObject(sal_uInt32 nIndex
);
769 rtl_TextEncoding
GetCharSet() const { return maFont
.GetCharSet(); };
770 const vcl::Font
& GetFont() const { return maFont
; }
771 void SetTextLayoutMode(vcl::text::ComplexTextLayoutFlags nLayoutMode
);
773 void ClearPath() { maPathObj
.Init(); };
774 void ClosePath() { maPathObj
.ClosePath(); };
775 const tools::PolyPolygon
& GetPathObj() const { return maPathObj
; };
777 void MoveTo(const Point
& rPoint
, bool bRecordPath
= false);
778 void LineTo(const Point
& rPoint
, bool bRecordPath
= false);
779 void DrawPixel(const Point
& rSource
, const Color
& rColor
);
780 void DrawRect(const tools::Rectangle
& rRect
, bool bEdge
= true);
781 void DrawRectWithBGColor(const tools::Rectangle
& rRect
);
782 void DrawRoundRect(const tools::Rectangle
& rRect
, const Size
& rSize
);
783 void DrawEllipse(const tools::Rectangle
& rRect
);
785 const tools::Rectangle
& rRect
,
786 const Point
& rStartAngle
,
787 const Point
& rEndAngle
,
791 const tools::Rectangle
& rRect
,
792 const Point
& rStartAngle
,
793 const Point
& rEndAngle
796 const tools::Rectangle
& rRect
,
797 const Point
& rStartAngle
,
798 const Point
& rEndAngle
800 void DrawPolygon(tools::Polygon rPolygon
, bool bRecordPath
);
801 void DrawPolyPolygon(tools::PolyPolygon
& rPolyPolygon
, bool bRecordPath
= false);
802 void DrawPolyLine(tools::Polygon rPolygon
,
803 bool bDrawTo
= false,
804 bool bRecordPath
= false
806 void DrawPolyBezier(tools::Polygon rPolygon
,
810 void DrawText(Point
& rPosition
,
811 OUString
const & rString
,
812 KernArray
* pDXArry
= nullptr,
813 tools::Long
* pDYArry
= nullptr,
814 bool bRecordPath
= false,
815 GraphicsMode nGraphicsMode
= GraphicsMode::GM_COMPATIBLE
);
817 void ResolveBitmapActions(std::vector
<BSaveStruct
>& rSaveList
);
819 void IntersectClipRect(const tools::Rectangle
& rRect
);
820 void ExcludeClipRect(const tools::Rectangle
& rRect
);
821 void MoveClipRegion(const Size
& rSize
);
823 const tools::PolyPolygon
& rPolyPoly
,
824 RegionMode nClippingMode
,
827 void SetDefaultClipPath();
828 void UpdateClipRegion();
829 void AddFromGDIMetaFile(GDIMetaFile
& rGDIMetaFile
);
831 void PassEMFPlus(void const * pBuffer
, sal_uInt32 nLength
);
832 void PassEMFPlusHeaderInfo();
836 explicit MtfTools(GDIMetaFile
& rGDIMetaFile
, SvStream
& rStreamWMF
);
837 ~MtfTools() COVERITY_NOEXCEPT_FALSE
;
841 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */