LibreOffice Module vcl (master)  1
outdev.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #ifndef INCLUDED_VCL_OUTDEV_HXX
21 #define INCLUDED_VCL_OUTDEV_HXX
22 
23 #include <tools/gen.hxx>
24 #include <tools/ref.hxx>
25 #include <tools/solar.h>
26 #include <tools/color.hxx>
27 #include <tools/poly.hxx>
28 #include <o3tl/typed_flags_set.hxx>
29 #include <vcl/bitmap.hxx>
30 #include <vcl/cairo.hxx>
31 #include <vcl/devicecoordinate.hxx>
32 #include <vcl/dllapi.h>
33 #include <vcl/font.hxx>
34 #include <vcl/region.hxx>
35 #include <vcl/mapmod.hxx>
36 #include <vcl/wall.hxx>
37 #include <vcl/metaactiontypes.hxx>
38 #include <vcl/salnativewidgets.hxx>
39 #include <vcl/outdevstate.hxx>
40 #include <vcl/outdevmap.hxx>
41 #include <vcl/vclreferencebase.hxx>
42 
46 
47 #include <unotools/fontdefs.hxx>
48 
49 #include <com/sun/star/drawing/LineCap.hpp>
50 #include <com/sun/star/uno/Reference.h>
51 
52 #include <memory>
53 #include <vector>
54 
55 struct ImplOutDevData;
57 struct SystemGraphicsData;
58 struct SystemFontData;
60 class ImplFontCache;
62 class ImplDeviceFontList;
65 class SalGraphics;
66 class Gradient;
67 class Hatch;
68 class AllSettings;
69 class BitmapReadAccess;
70 class BitmapEx;
71 class Image;
72 class TextRectInfo;
73 class FontMetric;
74 class GDIMetaFile;
75 class GfxLink;
76 namespace tools {
77  class Line;
78 }
79 class LineInfo;
80 class AlphaMask;
81 class FontCharMap;
82 class SalLayout;
83 class ImplLayoutArgs;
84 class VirtualDevice;
85 struct SalTwoRect;
86 class Printer;
87 class VCLXGraphics;
88 class OutDevStateStack;
89 class SalLayoutGlyphs;
90 
91 namespace vcl
92 {
93  class ExtOutDevData;
94  class ITextLayout;
95  struct FontCapabilities;
96  class TextLayoutCache;
97  class Window;
98  namespace font {
99  struct Feature;
100  }
101 }
102 
103 namespace basegfx {
104  class B2DHomMatrix;
105  class B2DPolygon;
106  class B2IVector;
107  typedef B2IVector B2ISize;
108 }
109 
110 namespace com { namespace sun { namespace star { namespace awt {
111  class XGraphics;
112 } } } }
113 
114 #if defined UNX
115 #define GLYPH_FONT_HEIGHT 128
116 #else
117 #define GLYPH_FONT_HEIGHT 256
118 #endif
119 
120 // Text Layout options
121 enum class SalLayoutFlags
122 {
123  NONE = 0x0000,
124  BiDiRtl = 0x0001,
125  BiDiStrong = 0x0002,
126  RightAlign = 0x0004,
127  DisableKerning = 0x0010,
128  KerningAsian = 0x0020,
129  Vertical = 0x0040,
130  KashidaJustification = 0x0800,
131  ForFallback = 0x2000,
132  GlyphItemsOnly = 0x4000,
133 };
134 namespace o3tl
135 {
136  template<> struct typed_flags<SalLayoutFlags> : is_typed_flags<SalLayoutFlags, 0x6877> {};
137 }
138 
139 typedef std::vector< tools::Rectangle > MetricVector;
140 
141 // OutputDevice-Types
142 
143 // Flags for DrawText()
144 enum class DrawTextFlags
145 {
146  NONE = 0x00000000,
147  Disable = 0x00000001,
148  Mnemonic = 0x00000002,
149  Mono = 0x00000004,
150  Clip = 0x00000008,
151  Left = 0x00000010,
152  Center = 0x00000020,
153  Right = 0x00000040,
154  Top = 0x00000080,
155  VCenter = 0x00000100,
156  Bottom = 0x00000200,
157  EndEllipsis = 0x00000400,
158  PathEllipsis = 0x00000800,
159  MultiLine = 0x00001000,
160  WordBreak = 0x00002000,
161  NewsEllipsis = 0x00004000,
162  WordBreakHyphenation = 0x00008000 | WordBreak,
163  CenterEllipsis = 0x00010000,
164  HideMnemonic = 0x00020000,
165 };
166 namespace o3tl
167 {
168  template<> struct typed_flags<DrawTextFlags> : is_typed_flags<DrawTextFlags, 0x3ffff> {};
169 }
170 
171 // Flags for DrawImage(), these must match the definitions in css::awt::ImageDrawMode
172 enum class DrawImageFlags
173 {
174  NONE = 0x0000,
175  Disable = 0x0001,
176  Highlight = 0x0002,
177  Deactive = 0x0004,
178  ColorTransform = 0x0008,
179  SemiTransparent = 0x0010,
180 };
181 namespace o3tl
182 {
183  template<> struct typed_flags<DrawImageFlags> : is_typed_flags<DrawImageFlags, 0x001f> {};
184 }
185 
186 // Flags for DrawGrid()
187 enum class DrawGridFlags
188 {
189  NONE = 0x0000,
190  Dots = 0x0001,
191  HorzLines = 0x0002,
192  VertLines = 0x0004
193 };
194 namespace o3tl
195 {
196  template<> struct typed_flags<DrawGridFlags> : is_typed_flags<DrawGridFlags, 0x0007> {};
197 }
198 
199 // DrawModes
200 enum class DrawModeFlags : sal_uInt32
201 {
202  Default = 0x00000000,
203  BlackLine = 0x00000001,
204  BlackFill = 0x00000002,
205  BlackText = 0x00000004,
206  BlackBitmap = 0x00000008,
207  BlackGradient = 0x00000010,
208  GrayLine = 0x00000020,
209  GrayFill = 0x00000040,
210  GrayText = 0x00000080,
211  GrayBitmap = 0x00000100,
212  GrayGradient = 0x00000200,
213  NoFill = 0x00000400,
214  WhiteLine = 0x00000800,
215  WhiteFill = 0x00001000,
216  WhiteText = 0x00002000,
217  WhiteBitmap = 0x00004000,
218  WhiteGradient = 0x00008000,
219  SettingsLine = 0x00010000,
220  SettingsFill = 0x00020000,
221  SettingsText = 0x00040000,
222  SettingsGradient = 0x00080000,
223  NoTransparency = 0x00100000,
224 };
225 namespace o3tl
226 {
227  template<> struct typed_flags<DrawModeFlags> : is_typed_flags<DrawModeFlags, 0x1fffff> {};
228 }
229 
230 // Antialiasing
232 {
233  NONE = 0x0000,
234  DisableText = 0x0001,
235  EnableB2dDraw = 0x0002,
236  PixelSnapHairline = 0x0004,
237 };
238 namespace o3tl
239 {
240  template<> struct typed_flags<AntialiasingFlags> : is_typed_flags<AntialiasingFlags, 0x07> {};
241 }
242 
243 // AddFontSubstitute() flags
245 {
246  NONE = 0x00,
247  ALWAYS = 0x01,
248  ScreenOnly = 0x02,
249 };
250 namespace o3tl
251 {
252  template<> struct typed_flags<AddFontSubstituteFlags> : is_typed_flags<AddFontSubstituteFlags, 0x03> {};
253 }
254 
255 // GetDefaultFont() flags
257 {
258  NONE = 0x0000,
259  OnlyOne = 0x0001,
260 };
261 namespace o3tl
262 {
263  template<> struct typed_flags<GetDefaultFontFlags> : is_typed_flags<GetDefaultFontFlags, 0x01> {};
264 }
265 
266 // Flags for Invert()
267 enum class InvertFlags
268 {
269  NONE = 0x0000,
270  N50 = 0x0001,
271  TrackFrame = 0x0002
272 };
273 namespace o3tl
274 {
275  template<> struct typed_flags<InvertFlags> : is_typed_flags<InvertFlags, 0x0003> {};
276 }
277 
279 
281 
282 // OutputDevice
283 
285 
286 BmpMirrorFlags AdjustTwoRect( SalTwoRect& rTwoRect, const Size& rSizePix );
287 void AdjustTwoRect( SalTwoRect& rTwoRect, const tools::Rectangle& rValidSrcRect );
288 
289 class OutputDevice;
290 
291 namespace vcl {
293 }
294 
295 VCL_DLLPUBLIC void DrawFocusRect(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect);
296 
297 typedef struct _cairo_surface cairo_surface_t;
298 
305 {
306  friend class Printer;
307  friend class VirtualDevice;
308  friend class vcl::Window;
309  friend class WorkWindow;
310  friend void ImplHandleResize( vcl::Window* pWindow, long nNewWidth, long nNewHeight );
311 
312 private:
313  OutputDevice(const OutputDevice&) = delete;
314  OutputDevice& operator=(const OutputDevice&) = delete;
315 
321  mutable std::shared_ptr<ImplFontCache> mxFontCache;
322  mutable std::shared_ptr<PhysicalFontCollection> mxFontCollection;
323  mutable std::unique_ptr<ImplDeviceFontList> mpDeviceFontList;
324  mutable std::unique_ptr<ImplDeviceFontSizeList> mpDeviceFontSizeList;
325  std::vector<OutDevState> maOutDevStateStack;
326  std::unique_ptr<ImplOutDevData> mpOutDevData;
327  std::vector< VCLXGraphics* >* mpUnoGraphicsList;
329 
330  // TEMP TEMP TEMP
332 
342  long mnOutOffX;
344  long mnOutOffY;
347  sal_Int32 mnDPIX;
348  sal_Int32 mnDPIY;
350  mutable long mnTextOffX;
352  mutable long mnTextOffY;
353  mutable long mnEmphasisAscent;
354  mutable long mnEmphasisDescent;
361  vcl::Region maRegion; // contains the clip region, see SetClipRegion(...)
370  std::unique_ptr<AllSettings> mxSettings;
375 
376  mutable bool mbMap : 1;
377  mutable bool mbClipRegion : 1;
378  mutable bool mbBackground : 1;
379  mutable bool mbOutput : 1;
380  mutable bool mbDevOutput : 1;
381  mutable bool mbOutputClipped : 1;
382  mutable bool mbLineColor : 1;
383  mutable bool mbFillColor : 1;
384  mutable bool mbInitLineColor : 1;
385  mutable bool mbInitFillColor : 1;
386  mutable bool mbInitFont : 1;
387  mutable bool mbInitTextColor : 1;
388  mutable bool mbInitClipRegion : 1;
389  mutable bool mbClipRegionSet : 1;
390  mutable bool mbNewFont : 1;
391  mutable bool mbTextLines : 1;
392  mutable bool mbTextSpecial : 1;
393  mutable bool mbRefPoint : 1;
394  mutable bool mbEnableRTL : 1;
395 
398 
400 protected:
401  OutputDevice(OutDevType eOutDevType);
402  virtual ~OutputDevice() override;
403  virtual void dispose() override;
404 
405 public:
406 
413  SalGraphics const *GetGraphics() const;
415 
416  void SetConnectMetaFile( GDIMetaFile* pMtf );
418 
419  virtual void SetSettings( const AllSettings& rSettings );
420  const AllSettings& GetSettings() const { return *mxSettings; }
421 
423  bool SupportsCairo() const;
427  cairo::SurfaceSharedPtr CreateSurface(int x, int y, int width, int height) const;
429  cairo::SurfaceSharedPtr CreateBitmapSurface(const BitmapSystemData& rData, const Size& rSize) const;
431  css::uno::Any GetNativeSurfaceHandle(cairo::SurfaceSharedPtr& rSurface, const basegfx::B2ISize& rSize) const;
432  css::uno::Any GetSystemGfxDataAny() const;
433 
434  void SetRefPoint();
435  void SetRefPoint( const Point& rRefPoint );
436  const Point& GetRefPoint() const { return maRefPoint; }
437  bool IsRefPoint() const { return mbRefPoint; }
438 
439  virtual sal_uInt16 GetBitCount() const;
440 
442  { return Size( mnOutWidth, mnOutHeight ); }
443  long GetOutputWidthPixel() const { return mnOutWidth; }
444  long GetOutputHeightPixel() const { return mnOutHeight; }
445  long GetOutOffXPixel() const { return mnOutOffX; }
446  long GetOutOffYPixel() const { return mnOutOffY; }
447  void SetOutOffXPixel(long nOutOffX);
448  void SetOutOffYPixel(long nOutOffY);
449 
451  { return PixelToLogic( GetOutputSizePixel() ); }
452 
453  css::uno::Reference< css::awt::XGraphics >
455  std::vector< VCLXGraphics* > *GetUnoGraphicsList() const { return mpUnoGraphicsList; }
456  std::vector< VCLXGraphics* > *CreateUnoGraphicsList();
457 
458 protected:
459 
479  virtual bool AcquireGraphics() const = 0;
480 
487  virtual void ReleaseGraphics( bool bRelease = true ) = 0;
489 
490 
493 
495 public:
496 
501  SAL_DLLPRIVATE sal_Int32 GetDPIX() const { return mnDPIX; }
502 
507  SAL_DLLPRIVATE sal_Int32 GetDPIY() const { return mnDPIY; }
508 
509  SAL_DLLPRIVATE void SetDPIX( sal_Int32 nDPIX ) { mnDPIX = nDPIX; }
510  SAL_DLLPRIVATE void SetDPIY( sal_Int32 nDPIY ) { mnDPIY = nDPIY; }
511 
512  float GetDPIScaleFactor() const
513  {
514  return mnDPIScalePercentage / 100.0f;
515  }
516 
517  sal_Int32 GetDPIScalePercentage() const
518  {
519  return mnDPIScalePercentage;
520  }
521 
523  virtual bool IsVirtual() const;
524 
529  bool SupportsOperation( OutDevSupportType ) const;
530 
531  void SetExtOutDevData( vcl::ExtOutDevData* pExtOutDevData ) { mpExtOutDevData = pExtOutDevData; }
533 
535 
536 
539 
541 public:
542  virtual void Flush() {}
543 
544  virtual void DrawOutDev(
545  const Point& rDestPt, const Size& rDestSize,
546  const Point& rSrcPt, const Size& rSrcSize );
547 
548  virtual void DrawOutDev(
549  const Point& rDestPt, const Size& rDestSize,
550  const Point& rSrcPt, const Size& rSrcSize,
551  const OutputDevice& rOutDev );
552 
553  virtual void CopyArea(
554  const Point& rDestPt,
555  const Point& rSrcPt, const Size& rSrcSize,
556  bool bWindowInvalidate = false );
557 
558 protected:
559 
560  virtual void CopyDeviceArea( SalTwoRect& aPosAry, bool bWindowInvalidate);
561 
562  SAL_DLLPRIVATE void drawOutDevDirect ( const OutputDevice* pSrcDev, SalTwoRect& rPosAry );
563 
564  SAL_DLLPRIVATE bool is_double_buffered_window() const;
565 
566 private:
567 
568  // not implemented; to detect misuses of DrawOutDev(...OutputDevice&);
569  SAL_DLLPRIVATE void DrawOutDev( const Point&, const Size&, const Point&, const Size&, const Printer&) = delete;
571 
572 
575 
577 public:
578 
579  void Push( PushFlags nFlags = PushFlags::ALL );
580  void Pop();
581 
582  // returns the current stack depth; that is the number of Push() calls minus the number of Pop() calls
583  // this should not normally be used since Push and Pop must always be used symmetrically
584  // however this may be e.g. a help when debugging code in which this somehow is not the case
585  sal_uInt32 GetGCStackDepth() const;
586 
587  void EnableOutput( bool bEnable = true );
588  bool IsOutputEnabled() const { return mbOutput; }
589  bool IsDeviceOutputNecessary() const { return (mbOutput && mbDevOutput); }
590 
591  void SetAntialiasing( AntialiasingFlags nMode );
593 
594  void SetDrawMode( DrawModeFlags nDrawMode );
596 
597  void SetLayoutMode( ComplexTextLayoutFlags nTextLayoutMode );
599 
602 
603  void SetRasterOp( RasterOp eRasterOp );
604  RasterOp GetRasterOp() const { return meRasterOp; }
605 
613  void SetOutDevViewType( OutDevViewType eOutDevViewType ) { meOutDevViewType=eOutDevViewType; }
615 
616  void SetLineColor();
617  void SetLineColor( const Color& rColor );
618  const Color& GetLineColor() const { return maLineColor; }
619  bool IsLineColor() const { return mbLineColor; }
620 
621  void SetFillColor();
622  void SetFillColor( const Color& rColor );
623  const Color& GetFillColor() const { return maFillColor; }
624  bool IsFillColor() const { return mbFillColor; }
625 
626  void SetBackground();
627  void SetBackground( const Wallpaper& rBackground );
628  virtual void SaveBackground(VirtualDevice& rSaveDevice,
629  const Point& rPos, const Size& rSize, const Size& rBackgroundSize) const;
630 
631  const Wallpaper& GetBackground() const { return maBackground; }
632  virtual Color GetBackgroundColor() const;
633  bool IsBackground() const { return mbBackground; }
634 
635  void SetFont( const vcl::Font& rNewFont );
636  const vcl::Font& GetFont() const { return maFont; }
637 
638 protected:
639 
640  virtual void ImplReleaseFonts();
641 
642 private:
643 
644  SAL_DLLPRIVATE void InitLineColor();
645 
646  SAL_DLLPRIVATE void InitFillColor();
647 
649 
650 
653 
655 public:
656 
657  vcl::Region GetClipRegion() const;
658  void SetClipRegion();
659  void SetClipRegion( const vcl::Region& rRegion );
660  bool SelectClipRegion( const vcl::Region&, SalGraphics* pGraphics = nullptr );
661 
662  bool IsClipRegion() const { return mbClipRegion; }
663 
664  void MoveClipRegion( long nHorzMove, long nVertMove );
665  void IntersectClipRegion( const tools::Rectangle& rRect );
666  void IntersectClipRegion( const vcl::Region& rRegion );
667 
668  virtual vcl::Region GetActiveClipRegion() const;
669 
670 protected:
671 
672  virtual void InitClipRegion();
673 
680  virtual vcl::Region ClipToDeviceBounds(vcl::Region aRegion) const;
681  virtual void ClipToPaintRegion ( tools::Rectangle& rDstRect );
682 
683 private:
684 
685  SAL_DLLPRIVATE void SetDeviceClipRegion( const vcl::Region* pRegion );
687 
688 
691 
693 public:
694 
695  void DrawPixel( const Point& rPt );
696  void DrawPixel( const Point& rPt, const Color& rColor );
697 
698  Color GetPixel( const Point& rPt ) const;
700 
701 
704 
706 public:
707 
708  void DrawRect( const tools::Rectangle& rRect );
709  void DrawRect( const tools::Rectangle& rRect,
710  sal_uLong nHorzRount, sal_uLong nVertRound );
711 
713  void DrawCheckered(
714  const Point& rPos,
715  const Size& rSize,
716  sal_uInt32 nLen = 8,
717  Color aStart = COL_WHITE,
718  Color aEnd = COL_BLACK);
719 
720  void DrawGrid( const tools::Rectangle& rRect, const Size& rDist, DrawGridFlags nFlags );
721 
723 
726 public:
728  void Invert( const tools::Rectangle& rRect, InvertFlags nFlags = InvertFlags::NONE );
729  void Invert( const tools::Polygon& rPoly, InvertFlags nFlags = InvertFlags::NONE );
731 
734 
736 public:
737 
738  void DrawLine( const Point& rStartPt, const Point& rEndPt );
739 
740  void DrawLine( const Point& rStartPt, const Point& rEndPt,
741  const LineInfo& rLineInfo );
742 
743 protected:
744  virtual void DrawHatchLine_DrawLine(const Point& rStartPoint, const Point& rEndPoint);
745 
746 private:
747 
750  SAL_DLLPRIVATE void drawLine( basegfx::B2DPolyPolygon aLinePolyPolygon, const LineInfo& rInfo );
752 
753 
756 
758 public:
759 
768  void DrawPolyLine( const tools::Polygon& rPoly );
769 
770  void DrawPolyLine(
771  const basegfx::B2DPolygon&,
772  double fLineWidth = 0.0,
774  css::drawing::LineCap eLineCap = css::drawing::LineCap_BUTT,
775  double fMiterMinimumAngle = basegfx::deg2rad(15.0));
776 
787  void DrawPolyLine( const tools::Polygon& rPoly,
788  const LineInfo& rLineInfo );
789 
790  // #i101491#
791  // Helper who tries to use SalGDI's DrawPolyLine direct and returns it's bool.
792  bool DrawPolyLineDirect(
793  const basegfx::B2DHomMatrix& rObjectTransform,
794  const basegfx::B2DPolygon& rB2DPolygon,
795  double fLineWidth = 0.0,
796  double fTransparency = 0.0,
798  css::drawing::LineCap eLineCap = css::drawing::LineCap_BUTT,
799  double fMiterMinimumAngle = basegfx::deg2rad(15.0),
800  bool bBypassAACheck = false);
801 
802 private:
803 
804  // #i101491#
805  // Helper which holds the old line geometry creation and is extended to use AA when
806  // switched on. Advantage is that line geometry is only temporarily used for paint
807  SAL_DLLPRIVATE void drawPolyLine(const tools::Polygon& rPoly, const LineInfo& rLineInfo);
808 
810 
811 
814 
816 public:
817 
828  void DrawPolygon( const tools::Polygon& rPoly );
829  void DrawPolygon( const basegfx::B2DPolygon& );
830 
841  void DrawPolyPolygon( const tools::PolyPolygon& rPolyPoly );
843 
844 private:
845 
846  SAL_DLLPRIVATE void ImplDrawPolygon( const tools::Polygon& rPoly, const tools::PolyPolygon* pClipPolyPoly = nullptr );
847  SAL_DLLPRIVATE void ImplDrawPolyPolygon( const tools::PolyPolygon& rPolyPoly, const tools::PolyPolygon* pClipPolyPoly );
848  SAL_DLLPRIVATE void ImplDrawPolyPolygon( sal_uInt16 nPoly, const tools::PolyPolygon& rPolyPoly );
849  // #i101491#
850  // Helper who implements the DrawPolyPolygon functionality for basegfx::B2DPolyPolygon
851  // without MetaFile processing
852  SAL_DLLPRIVATE void ImplDrawPolyPolygonWithB2DPolyPolygon(const basegfx::B2DPolyPolygon& rB2DPolyPoly);
854 
855 
858 
860 public:
861 
862  void DrawEllipse( const tools::Rectangle& rRect );
863 
864  void DrawArc(
865  const tools::Rectangle& rRect,
866  const Point& rStartPt, const Point& rEndPt );
867 
868  void DrawPie(
869  const tools::Rectangle& rRect,
870  const Point& rStartPt, const Point& rEndPt );
871 
872  void DrawChord(
873  const tools::Rectangle& rRect,
874  const Point& rStartPt, const Point& rEndPt );
875 
877 
878 
881 
883 public:
884  void DrawGradient( const tools::Rectangle& rRect, const Gradient& rGradient );
885  void DrawGradient( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient );
886 
887  void AddGradientActions(
888  const tools::Rectangle& rRect,
889  const Gradient& rGradient,
890  GDIMetaFile& rMtf );
891 
892 protected:
893 
894  virtual bool UsePolyPolygonForComplexGradient() = 0;
895 
896  virtual long GetGradientStepCount( long nMinRect );
897 
898 private:
899 
900  SAL_DLLPRIVATE void DrawLinearGradient( const tools::Rectangle& rRect, const Gradient& rGradient, const tools::PolyPolygon* pClipPolyPoly );
901  SAL_DLLPRIVATE void DrawComplexGradient( const tools::Rectangle& rRect, const Gradient& rGradient, const tools::PolyPolygon* pClipPolyPoly );
902 
903  SAL_DLLPRIVATE void DrawGradientToMetafile( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient );
904  SAL_DLLPRIVATE void DrawLinearGradientToMetafile( const tools::Rectangle& rRect, const Gradient& rGradient );
905  SAL_DLLPRIVATE void DrawComplexGradientToMetafile( const tools::Rectangle& rRect, const Gradient& rGradient );
906 
907  SAL_DLLPRIVATE long GetGradientSteps( const Gradient& rGradient, const tools::Rectangle& rRect, bool bMtf, bool bComplex=false );
908 
909  SAL_DLLPRIVATE Color GetSingleColorGradientFill();
910  SAL_DLLPRIVATE void SetGrayscaleColors( Gradient &rGradient );
912 
913 
916 
918 public:
919 
920 #ifdef _MSC_VER
921  void DrawHatch( const tools::PolyPolygon& rPolyPoly, const ::Hatch& rHatch );
922  void AddHatchActions( const tools::PolyPolygon& rPolyPoly,
923  const ::Hatch& rHatch,
924  GDIMetaFile& rMtf );
925 #else
926  void DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch& rHatch );
927  void AddHatchActions( const tools::PolyPolygon& rPolyPoly,
928  const Hatch& rHatch,
929  GDIMetaFile& rMtf );
930 #endif
931 
932  void DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch& rHatch, bool bMtf );
933 
934 private:
935 
936  SAL_DLLPRIVATE void CalcHatchValues( const tools::Rectangle& rRect, long nDist, sal_uInt16 nAngle10, Point& rPt1, Point& rPt2, Size& rInc, Point& rEndPt1 );
937  SAL_DLLPRIVATE void DrawHatchLine( const tools::Line& rLine, const tools::PolyPolygon& rPolyPoly, Point* pPtBuffer, bool bMtf );
939 
940 
943 
945 public:
946  void DrawWallpaper( const tools::Rectangle& rRect, const Wallpaper& rWallpaper );
947 
948  void Erase();
949  void Erase( const tools::Rectangle& rRect ) { DrawWallpaper( rRect, GetBackground() ); }
950 
951 protected:
952  void DrawGradientWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper );
953 
954 private:
955  SAL_DLLPRIVATE void DrawWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper );
956  SAL_DLLPRIVATE void DrawColorWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper );
957  SAL_DLLPRIVATE void DrawBitmapWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper );
959 
960 
963 
965 public:
966 
967  void DrawText( const Point& rStartPt, const OUString& rStr,
968  sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
969  MetricVector* pVector = nullptr, OUString* pDisplayText = nullptr,
970  const SalLayoutGlyphs* pLayoutCache = nullptr );
971 
972  void DrawText( const tools::Rectangle& rRect,
973  const OUString& rStr, DrawTextFlags nStyle = DrawTextFlags::NONE,
974  MetricVector* pVector = nullptr, OUString* pDisplayText = nullptr,
975  vcl::ITextLayout* _pTextLayout = nullptr );
976 
977  static void ImplDrawText( OutputDevice& rTargetDevice, const tools::Rectangle& rRect,
978  const OUString& rOrigStr, DrawTextFlags nStyle,
979  MetricVector* pVector, OUString* pDisplayText, vcl::ITextLayout& _rLayout );
980 
981  void ImplDrawText( SalLayout& );
982 
983  void ImplDrawTextBackground( const SalLayout& );
984 
985  void DrawCtrlText( const Point& rPos, const OUString& rStr,
986  sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
987  DrawTextFlags nStyle = DrawTextFlags::Mnemonic, MetricVector* pVector = nullptr, OUString* pDisplayText = nullptr,
988  const SalLayoutGlyphs* pGlyphs = nullptr);
989 
990  void DrawTextLine( const Point& rPos, long nWidth,
991  FontStrikeout eStrikeout,
992  FontLineStyle eUnderline,
993  FontLineStyle eOverline,
994  bool bUnderlineAbove = false );
995 
996  void ImplDrawTextLine( long nBaseX, long nX, long nY, DeviceCoordinate nWidth,
997  FontStrikeout eStrikeout, FontLineStyle eUnderline,
998  FontLineStyle eOverline, bool bUnderlineAbove );
999 
1000  void ImplDrawTextLines( SalLayout&, FontStrikeout eStrikeout, FontLineStyle eUnderline,
1001  FontLineStyle eOverline, bool bWordLine, bool bUnderlineAbove );
1002 
1003  void DrawWaveLine( const Point& rStartPos, const Point& rEndPos, long nLineWidth = 1 );
1004 
1005  bool ImplDrawRotateText( SalLayout& );
1006 
1008  const OUString& rStr, DrawTextFlags nStyle = DrawTextFlags::WordBreak,
1009  TextRectInfo* pInfo = nullptr,
1010  const vcl::ITextLayout* _pTextLayout = nullptr ) const;
1011 
1061  bool GetTextBoundRect( tools::Rectangle& rRect,
1062  const OUString& rStr, sal_Int32 nBase = 0, sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
1063  sal_uLong nLayoutWidth = 0, const long* pDXArray = nullptr,
1064  const SalLayoutGlyphs* pGlyphs = nullptr ) const;
1065 
1067 
1069  const OUString& rStr,
1070  sal_Int32 nLen = -1,
1071  sal_uLong nLayoutWidth = 0, const long* pDXArray = nullptr ) const;
1072 
1074  const OUString& rStr, sal_Int32 nBase = 0, sal_Int32 nIndex = 0,
1075  sal_Int32 nLen = -1,
1076  sal_uLong nLayoutWidth = 0, const long* pDXArray = nullptr ) const;
1077 
1079  const OUString& rStr, sal_Int32 nBase, sal_Int32 nIndex = 0,
1080  sal_Int32 nLen = -1,
1081  sal_uLong nLayoutWidth = 0, const long* pDXArray = nullptr ) const;
1082 
1083 
1084  OUString GetEllipsisString( const OUString& rStr, long nMaxWidth,
1085  DrawTextFlags nStyle = DrawTextFlags::EndEllipsis ) const;
1086 
1087  long GetCtrlTextWidth( const OUString& rStr,
1088  const SalLayoutGlyphs* pLayoutCache = nullptr ) const;
1089 
1090  static OUString GetNonMnemonicString( const OUString& rStr, sal_Int32& rMnemonicPos );
1091 
1092  static OUString GetNonMnemonicString( const OUString& rStr )
1093  { sal_Int32 nDummy; return GetNonMnemonicString( rStr, nDummy ); }
1094 
1103  void AddTextRectActions( const tools::Rectangle& rRect,
1104  const OUString& rOrigStr,
1105  DrawTextFlags nStyle,
1106  GDIMetaFile& rMtf );
1107 
1108  void SetTextColor( const Color& rColor );
1109  const Color& GetTextColor() const { return maTextColor; }
1110 
1111  void SetTextFillColor();
1112  void SetTextFillColor( const Color& rColor );
1113  Color GetTextFillColor() const;
1114  bool IsTextFillColor() const { return !maFont.IsTransparent(); }
1115 
1116  void SetTextLineColor();
1117  void SetTextLineColor( const Color& rColor );
1118  const Color& GetTextLineColor() const { return maTextLineColor; }
1119  bool IsTextLineColor() const { return (maTextLineColor.GetTransparency() == 0); }
1120 
1121  void SetOverlineColor();
1122  void SetOverlineColor( const Color& rColor );
1123  const Color& GetOverlineColor() const { return maOverlineColor; }
1124  bool IsOverlineColor() const { return (maOverlineColor.GetTransparency() == 0); }
1125 
1126  void SetTextAlign( TextAlign eAlign );
1127  TextAlign GetTextAlign() const { return maFont.GetAlignment(); }
1128 
1133  long GetTextWidth( const OUString& rStr, sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
1134  vcl::TextLayoutCache const* = nullptr,
1135  SalLayoutGlyphs const*const pLayoutCache = nullptr) const;
1136 
1141  long GetTextHeight() const;
1142  float approximate_char_width() const;
1143  float approximate_digit_width() const;
1144 
1145  void DrawTextArray( const Point& rStartPt, const OUString& rStr,
1146  const long* pDXAry,
1147  sal_Int32 nIndex = 0,
1148  sal_Int32 nLen = -1,
1150  const SalLayoutGlyphs* pLayoutCache = nullptr);
1151  long GetTextArray( const OUString& rStr, long* pDXAry,
1152  sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
1153  vcl::TextLayoutCache const* = nullptr,
1154  SalLayoutGlyphs const*const pLayoutCache = nullptr) const;
1155 
1156  void GetCaretPositions( const OUString&, long* pCaretXArray,
1157  sal_Int32 nIndex, sal_Int32 nLen,
1158  const SalLayoutGlyphs* pGlyphs = nullptr ) const;
1159  void DrawStretchText( const Point& rStartPt, sal_uLong nWidth,
1160  const OUString& rStr,
1161  sal_Int32 nIndex = 0, sal_Int32 nLen = -1);
1162  sal_Int32 GetTextBreak( const OUString& rStr, long nTextWidth,
1163  sal_Int32 nIndex, sal_Int32 nLen = -1,
1164  long nCharExtra = 0,
1165  vcl::TextLayoutCache const* = nullptr,
1166  const SalLayoutGlyphs* pGlyphs = nullptr) const;
1167  sal_Int32 GetTextBreak( const OUString& rStr, long nTextWidth,
1168  sal_Unicode nExtraChar, sal_Int32& rExtraCharPos,
1169  sal_Int32 nIndex, sal_Int32 nLen,
1170  long nCharExtra,
1171  vcl::TextLayoutCache const* = nullptr) const;
1172  static std::shared_ptr<vcl::TextLayoutCache> CreateTextLayoutCache(OUString const&);
1173 
1174 protected:
1175  SAL_DLLPRIVATE void ImplInitTextLineSize();
1176  SAL_DLLPRIVATE void ImplInitAboveTextLineSize();
1177  static
1178  SAL_DLLPRIVATE long ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo, long nWidth, const OUString& rStr, DrawTextFlags nStyle, const vcl::ITextLayout& _rLayout );
1179 private:
1180  SAL_DLLPRIVATE void ImplInitTextColor();
1181 
1182  SAL_DLLPRIVATE void ImplDrawTextDirect( SalLayout&, bool bTextLines);
1183  SAL_DLLPRIVATE void ImplDrawSpecialText( SalLayout& );
1184  SAL_DLLPRIVATE void ImplDrawTextRect( long nBaseX, long nBaseY, long nX, long nY, long nWidth, long nHeight );
1185 
1186  SAL_DLLPRIVATE static void ImplDrawWavePixel( long nOriginX, long nOriginY, long nCurX, long nCurY, short nOrientation, SalGraphics* pGraphics, OutputDevice const * pOutDev,
1187  bool bDrawPixAsRect, long nPixWidth, long nPixHeight );
1188  SAL_DLLPRIVATE void ImplDrawWaveLine( long nBaseX, long nBaseY, long nStartX, long nStartY, long nWidth, long nHeight, long nLineWidth, short nOrientation, const Color& rColor );
1189  SAL_DLLPRIVATE void ImplDrawWaveTextLine( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontLineStyle eTextLine, Color aColor, bool bIsAbove );
1190  SAL_DLLPRIVATE void ImplDrawStraightTextLine( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontLineStyle eTextLine, Color aColor, bool bIsAbove );
1191  SAL_DLLPRIVATE void ImplDrawStrikeoutLine( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontStrikeout eStrikeout, Color aColor );
1192  SAL_DLLPRIVATE void ImplDrawStrikeoutChar( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontStrikeout eStrikeout, Color aColor );
1193  SAL_DLLPRIVATE void ImplDrawMnemonicLine( long nX, long nY, long nWidth );
1194 
1195 
1197 
1198 
1201 
1203 public:
1204 
1205  FontMetric GetDevFont( int nDevFontIndex ) const;
1206  int GetDevFontCount() const;
1207 
1208  bool IsFontAvailable( const OUString& rFontName ) const;
1209 
1210  Size GetDevFontSize( const vcl::Font& rFont, int nSizeIndex ) const;
1211  int GetDevFontSizeCount( const vcl::Font& ) const;
1212 
1213  bool AddTempDevFont( const OUString& rFileURL, const OUString& rFontName );
1214  void RefreshFontData( const bool bNewFontLists );
1215 
1216  FontMetric GetFontMetric() const;
1217  FontMetric GetFontMetric( const vcl::Font& rFont ) const;
1218 
1219  bool GetFontCharMap( FontCharMapRef& rxFontCharMap ) const;
1220  bool GetFontCapabilities( vcl::FontCapabilities& rFontCapabilities ) const;
1221 
1222  bool GetFontFeatures(std::vector<vcl::font::Feature>& rFontFeatures) const;
1223 
1224 
1231  SystemFontData GetSysFontData( int nFallbacklevel ) const;
1232 
1233  SAL_DLLPRIVATE void ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPolyLine, tools::Rectangle& rRect1, tools::Rectangle& rRect2,
1234  long& rYOff, long& rWidth, FontEmphasisMark eEmphasis, long nHeight );
1235  SAL_DLLPRIVATE static FontEmphasisMark
1236  ImplGetEmphasisMarkStyle( const vcl::Font& rFont );
1237 
1238  bool GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, int nIndex,
1239  int nLen, MetricVector& rVector );
1240 
1241  sal_Int32 HasGlyphs( const vcl::Font& rFont, const OUString& rStr,
1242  sal_Int32 nIndex = 0, sal_Int32 nLen = -1 ) const;
1243 
1244  long GetMinKashida() const;
1245 
1246  // i60594
1247  // validate kashida positions against the current font
1248  // returns count of invalid kashida positions
1249  sal_Int32 ValidateKashidas( const OUString& rTxt, sal_Int32 nIdx, sal_Int32 nLen,
1250  sal_Int32 nKashCount, // number of suggested kashida positions (in)
1251  const sal_Int32* pKashidaPos, // suggested kashida positions (in)
1252  sal_Int32* pKashidaPosDropped // invalid kashida positions (out)
1253  ) const;
1254 
1255  static void BeginFontSubstitution();
1256  static void EndFontSubstitution();
1257  static void AddFontSubstitute( const OUString& rFontName,
1258  const OUString& rReplaceFontName,
1259  AddFontSubstituteFlags nFlags );
1260  static void RemoveFontsSubstitute();
1261 
1263  LanguageType eLang,
1264  GetDefaultFontFlags nFlags,
1265  const OutputDevice* pOutDev = nullptr );
1266 
1267  SAL_DLLPRIVATE void ImplInitFontList() const;
1268  SAL_DLLPRIVATE void ImplUpdateFontData();
1269 
1270  //drop font data for all outputdevices.
1271  //If bNewFontLists is true then empty lists of system fonts
1272  SAL_DLLPRIVATE static void ImplClearAllFontData( bool bNewFontLists );
1273  //fetch font data for all outputdevices
1274  //If bNewFontLists is true then fetch lists of system fonts
1275  SAL_DLLPRIVATE static void ImplRefreshAllFontData( bool bNewFontLists );
1276  //drop and fetch font data for all outputdevices
1277  //If bNewFontLists is true then drop and refetch lists of system fonts
1278  SAL_DLLPRIVATE static void ImplUpdateAllFontData( bool bNewFontLists );
1279 
1280  // Lock font updates for all output devices
1281  static void LockFontUpdates(bool bLock);
1282 
1283 protected:
1284  SAL_DLLPRIVATE const LogicalFontInstance* GetFontInstance() const;
1285  SAL_DLLPRIVATE long GetEmphasisAscent() const { return mnEmphasisAscent; }
1286  SAL_DLLPRIVATE long GetEmphasisDescent() const { return mnEmphasisDescent; }
1287 
1288  SAL_DLLPRIVATE bool InitFont() const;
1289  virtual void SetFontOrientation( LogicalFontInstance* const pFontInstance ) const;
1290  virtual long GetFontExtLeading() const;
1291 
1292  virtual void ImplClearFontData(bool bNewFontLists);
1293  virtual void ImplRefreshFontData(bool bNewFontLists);
1294  void ReleaseFontCache();
1295  void ReleaseFontCollection();
1297  void ResetNewFontCache();
1298 
1299 private:
1300 
1301  typedef void ( OutputDevice::* FontUpdateHandler_t )( bool );
1302 
1303  SAL_DLLPRIVATE bool ImplNewFont() const;
1304 
1305  SAL_DLLPRIVATE static void ImplUpdateFontDataForAllFrames( FontUpdateHandler_t pHdl, bool bNewFontLists );
1306 
1307  static
1308  SAL_DLLPRIVATE OUString ImplGetEllipsisString( const OutputDevice& rTargetDevice, const OUString& rStr,
1309  long nMaxWidth, DrawTextFlags nStyle, const vcl::ITextLayout& _rLayout );
1310 
1311  SAL_DLLPRIVATE void ImplDrawEmphasisMark( long nBaseX, long nX, long nY, const tools::PolyPolygon& rPolyPoly, bool bPolyLine, const tools::Rectangle& rRect1, const tools::Rectangle& rRect2 );
1312  SAL_DLLPRIVATE void ImplDrawEmphasisMarks( SalLayout& );
1314 
1315 
1318 
1320 public:
1321 
1322  SystemTextLayoutData GetSysTextLayoutData( const Point& rStartPt, const OUString& rStr,
1323  sal_Int32 nIndex, sal_Int32 nLen,
1324  const long* pDXAry ) const;
1325 
1326  // tells whether this output device is RTL in an LTR UI or LTR in a RTL UI
1327  SAL_DLLPRIVATE bool ImplIsAntiparallel() const ;
1328  SAL_DLLPRIVATE void ReMirror( Point &rPoint ) const;
1329  SAL_DLLPRIVATE void ReMirror( tools::Rectangle &rRect ) const;
1330  SAL_DLLPRIVATE void ReMirror( vcl::Region &rRegion ) const;
1331  SAL_DLLPRIVATE bool ImplIsRecordLayout() const;
1332  virtual bool HasMirroredGraphics() const;
1333  std::unique_ptr<SalLayout>
1334  ImplLayout( const OUString&, sal_Int32 nIndex, sal_Int32 nLen,
1335  const Point& rLogicPos = Point(0,0), long nLogicWidth=0,
1336  const long* pLogicDXArray=nullptr, SalLayoutFlags flags = SalLayoutFlags::NONE,
1337  vcl::TextLayoutCache const* = nullptr,
1338  const SalLayoutGlyphs* pGlyphs = nullptr) const;
1339  SAL_DLLPRIVATE ImplLayoutArgs ImplPrepareLayoutArgs( OUString&, const sal_Int32 nIndex, const sal_Int32 nLen,
1340  DeviceCoordinate nPixelWidth, const DeviceCoordinate* pPixelDXArray,
1342  vcl::TextLayoutCache const* = nullptr) const;
1343  SAL_DLLPRIVATE std::unique_ptr<SalLayout>
1344  ImplGlyphFallbackLayout( std::unique_ptr<SalLayout>, ImplLayoutArgs& ) const;
1345  SAL_DLLPRIVATE std::unique_ptr<SalLayout>
1347  LogicalFontInstance* pLogicalFont, int nFallbackLevel,
1348  ImplLayoutArgs& rLayoutArgs) const;
1349 
1350 
1351  // Enabling/disabling RTL only makes sense for OutputDevices that use a mirroring SalGraphisLayout
1352  virtual void EnableRTL( bool bEnable = true);
1353  bool IsRTLEnabled() const { return mbEnableRTL; }
1354 
1355  bool GetTextIsRTL( const OUString&, sal_Int32 nIndex, sal_Int32 nLen ) const;
1356 
1358 
1359 
1362 
1364 public:
1365 
1375  void DrawBitmap(
1376  const Point& rDestPt,
1377  const Bitmap& rBitmap );
1378 
1388  void DrawBitmap(
1389  const Point& rDestPt,
1390  const Size& rDestSize,
1391  const Bitmap& rBitmap );
1392 
1393  void DrawBitmap(
1394  const Point& rDestPt,
1395  const Size& rDestSize,
1396  const Point& rSrcPtPixel,
1397  const Size& rSrcSizePixel,
1398  const Bitmap& rBitmap,
1400 
1410  void DrawBitmapEx(
1411  const Point& rDestPt,
1412  const BitmapEx& rBitmapEx );
1413 
1414 
1424  void DrawBitmapEx(
1425  const Point& rDestPt,
1426  const Size& rDestSize,
1427  const BitmapEx& rBitmapEx );
1428 
1429  void DrawBitmapEx(
1430  const Point& rDestPt,
1431  const Size& rDestSize,
1432  const Point& rSrcPtPixel,
1433  const Size& rSrcSizePixel,
1434  const BitmapEx& rBitmapEx,
1436 
1444  void DrawImage(
1445  const Point& rPos,
1446  const Image& rImage,
1448 
1449  void DrawImage(
1450  const Point& rPos,
1451  const Size& rSize,
1452  const Image& rImage,
1454 
1455 
1456  virtual Bitmap GetBitmap( const Point& rSrcPt, const Size& rSize ) const;
1457 
1460  BitmapEx GetBitmapEx( const Point& rSrcPt, const Size& rSize ) const;
1461 
1462 
1474  const basegfx::B2DHomMatrix& rTransformation,
1475  const BitmapEx& rBitmapEx);
1476 
1477  void DrawShadowBitmapEx(
1478  const BitmapEx& rBitmapEx,
1479  ::Color aShadowColor);
1480 protected:
1481 
1482  virtual void DrawDeviceBitmap(
1483  const Point& rDestPt, const Size& rDestSize,
1484  const Point& rSrcPtPixel, const Size& rSrcSizePixel,
1485  BitmapEx& rBitmapEx );
1486 
1487  virtual void ScaleBitmap ( Bitmap &rBmp, SalTwoRect &rPosAry );
1488 
1496  virtual bool DrawTransformBitmapExDirect(
1497  const basegfx::B2DHomMatrix& aFullTransform,
1498  const BitmapEx& rBitmapEx);
1499 
1512  const basegfx::B2DHomMatrix& aFullTransform,
1513  basegfx::B2DRange &aVisibleRange,
1514  double &fMaximumArea);
1515 
1516 private:
1517 
1518  SAL_DLLPRIVATE void DrawDeviceAlphaBitmap(
1519  const Bitmap& rBmp,
1520  const AlphaMask& rAlpha,
1521  const Point& rDestPt,
1522  const Size& rDestSize,
1523  const Point& rSrcPtPixel,
1524  const Size& rSrcSizePixel );
1525 
1526  SAL_DLLPRIVATE void DrawDeviceAlphaBitmapSlowPath(
1527  const Bitmap& rBitmap, const AlphaMask& rAlpha,
1528  tools::Rectangle aDstRect, tools::Rectangle aBmpRect,
1529  Size const & aOutSz, Point const & aOutPt);
1530 
1531 
1532  SAL_DLLPRIVATE void BlendBitmap(
1533  const SalTwoRect& rPosAry,
1534  const Bitmap& rBmp );
1535 
1536  SAL_DLLPRIVATE Bitmap BlendBitmap(
1537  Bitmap& aBmp,
1538  BitmapReadAccess const * pP,
1539  BitmapReadAccess const * pA,
1540  const sal_Int32 nOffY,
1541  const sal_Int32 nDstHeight,
1542  const sal_Int32 nOffX,
1543  const sal_Int32 nDstWidth,
1544  const tools::Rectangle& aBmpRect,
1545  const Size& aOutSz,
1546  const bool bHMirr,
1547  const bool bVMirr,
1548  const long* pMapX,
1549  const long* pMapY );
1550 
1551  SAL_DLLPRIVATE Bitmap BlendBitmapWithAlpha(
1552  Bitmap& aBmp,
1553  BitmapReadAccess const * pP,
1554  BitmapReadAccess const * pA,
1555  const tools::Rectangle& aDstRect,
1556  const sal_Int32 nOffY,
1557  const sal_Int32 nDstHeight,
1558  const sal_Int32 nOffX,
1559  const sal_Int32 nDstWidth,
1560  const long* pMapX,
1561  const long* pMapY );
1562 
1568  SAL_DLLPRIVATE Bitmap GetDownsampledBitmap(
1569  const Size& rDstSz,
1570  const Point& rSrcPt,
1571  const Size& rSrcSz,
1572  const Bitmap& rBmp,
1573  long nMaxBmpDPIX,
1574  long nMaxBmpDPIY );
1575 
1577 
1578 
1581 
1583 public:
1584 
1596  const GDIMetaFile& rInMtf, GDIMetaFile& rOutMtf,
1597  long nMaxBmpDPIX, long nMaxBmpDPIY,
1598  bool bReduceTransparency,
1599  bool bTransparencyAutoMode,
1600  bool bDownsampleBitmaps,
1601  const Color& rBackground = COL_TRANSPARENT );
1602 
1603  SAL_DLLPRIVATE void ImplPrintTransparent (
1604  const Bitmap& rBmp, const Bitmap& rMask,
1605  const Point& rDestPt, const Size& rDestSize,
1606  const Point& rSrcPtPixel, const Size& rSrcSizePixel );
1607 
1608  SAL_DLLPRIVATE Color ImplDrawModeToColor ( const Color& rColor ) const;
1609 
1610 
1611  void DrawTransparent( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent );
1612 
1613  void DrawTransparent(
1614  const basegfx::B2DHomMatrix& rObjectTransform,
1615  const basegfx::B2DPolyPolygon& rB2DPolyPoly,
1616  double fTransparency);
1617 
1618  void DrawTransparent(
1619  const GDIMetaFile& rMtf, const Point& rPos, const Size& rSize,
1620  const Gradient& rTransparenceGradient );
1621 
1622 protected:
1623 
1624  virtual void EmulateDrawTransparent( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent );
1625  void DrawInvisiblePolygon( const tools::PolyPolygon& rPolyPoly );
1626 
1627  virtual void ClipAndDrawGradientMetafile ( const Gradient &rGradient, const tools::PolyPolygon &rPolyPoly );
1628 
1629 private:
1630 
1631  SAL_DLLPRIVATE bool DrawTransparentNatively( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent );
1633 
1634 
1637 
1639 public:
1640 
1641  void DrawMask( const Point& rDestPt,
1642  const Bitmap& rBitmap, const Color& rMaskColor );
1643 
1644  void DrawMask( const Point& rDestPt, const Size& rDestSize,
1645  const Bitmap& rBitmap, const Color& rMaskColor );
1646 
1647  void DrawMask( const Point& rDestPt, const Size& rDestSize,
1648  const Point& rSrcPtPixel, const Size& rSrcSizePixel,
1649  const Bitmap& rBitmap, const Color& rMaskColor,
1650  MetaActionType nAction );
1651 
1652 protected:
1653 
1654  virtual void DrawDeviceMask (
1655  const Bitmap& rMask, const Color& rMaskColor,
1656  const Point& rDestPt, const Size& rDestSize,
1657  const Point& rSrcPtPixel, const Size& rSrcSizePixel );
1659 
1660 
1663 
1665 public:
1666 
1667  void EnableMapMode( bool bEnable = true );
1668  bool IsMapModeEnabled() const { return mbMap; }
1669 
1670  void SetMapMode();
1671  virtual void SetMapMode( const MapMode& rNewMapMode );
1672  void SetRelativeMapMode( const MapMode& rNewMapMode );
1673  const MapMode& GetMapMode() const { return maMapMode; }
1674 
1675  // #i75163#
1678 
1679  basegfx::B2DHomMatrix GetViewTransformation( const MapMode& rMapMode ) const;
1681 
1682 
1705  void SetPixelOffset( const Size& rOffset );
1706 
1713  Size GetPixelOffset() const { return Size(mnOutOffOrigX, mnOutOffOrigY);}
1714 
1715  Point LogicToPixel( const Point& rLogicPt ) const;
1716  Size LogicToPixel( const Size& rLogicSize ) const;
1717  tools::Rectangle LogicToPixel( const tools::Rectangle& rLogicRect ) const;
1718  tools::Polygon LogicToPixel( const tools::Polygon& rLogicPoly ) const;
1719  tools::PolyPolygon LogicToPixel( const tools::PolyPolygon& rLogicPolyPoly ) const;
1720  basegfx::B2DPolyPolygon LogicToPixel( const basegfx::B2DPolyPolygon& rLogicPolyPoly ) const;
1721  vcl::Region LogicToPixel( const vcl::Region& rLogicRegion )const;
1722  Point LogicToPixel( const Point& rLogicPt,
1723  const MapMode& rMapMode ) const;
1724  Size LogicToPixel( const Size& rLogicSize,
1725  const MapMode& rMapMode ) const;
1726  tools::Rectangle LogicToPixel( const tools::Rectangle& rLogicRect,
1727  const MapMode& rMapMode ) const;
1728  tools::Polygon LogicToPixel( const tools::Polygon& rLogicPoly,
1729  const MapMode& rMapMode ) const;
1731  const MapMode& rMapMode ) const;
1732 
1733  Point PixelToLogic( const Point& rDevicePt ) const;
1734  Size PixelToLogic( const Size& rDeviceSize ) const;
1735  tools::Rectangle PixelToLogic( const tools::Rectangle& rDeviceRect ) const;
1736  tools::Polygon PixelToLogic( const tools::Polygon& rDevicePoly ) const;
1737  tools::PolyPolygon PixelToLogic( const tools::PolyPolygon& rDevicePolyPoly ) const;
1738  basegfx::B2DPolyPolygon PixelToLogic( const basegfx::B2DPolyPolygon& rDevicePolyPoly ) const;
1739  vcl::Region PixelToLogic( const vcl::Region& rDeviceRegion ) const;
1740  Point PixelToLogic( const Point& rDevicePt,
1741  const MapMode& rMapMode ) const;
1742  Size PixelToLogic( const Size& rDeviceSize,
1743  const MapMode& rMapMode ) const;
1744  tools::Rectangle PixelToLogic( const tools::Rectangle& rDeviceRect,
1745  const MapMode& rMapMode ) const;
1746  tools::Polygon PixelToLogic( const tools::Polygon& rDevicePoly,
1747  const MapMode& rMapMode ) const;
1749  const MapMode& rMapMode ) const;
1751  const MapMode& rMapMode ) const;
1752 
1753  Point LogicToLogic( const Point& rPtSource,
1754  const MapMode* pMapModeSource,
1755  const MapMode* pMapModeDest ) const;
1756  Size LogicToLogic( const Size& rSzSource,
1757  const MapMode* pMapModeSource,
1758  const MapMode* pMapModeDest ) const;
1759  tools::Rectangle LogicToLogic( const tools::Rectangle& rRectSource,
1760  const MapMode* pMapModeSource,
1761  const MapMode* pMapModeDest ) const;
1762  static Point LogicToLogic( const Point& rPtSource,
1763  const MapMode& rMapModeSource,
1764  const MapMode& rMapModeDest );
1765  static Size LogicToLogic( const Size& rSzSource,
1766  const MapMode& rMapModeSource,
1767  const MapMode& rMapModeDest );
1768  static tools::Rectangle LogicToLogic( const tools::Rectangle& rRectSource,
1769  const MapMode& rMapModeSource,
1770  const MapMode& rMapModeDest );
1771  static long LogicToLogic( long nLongSource,
1772  MapUnit eUnitSource,
1773  MapUnit eUnitDest );
1774 
1776  const MapMode& rMapModeSource,
1777  const MapMode& rMapModeDest );
1778 
1779  // create a mapping transformation from rMapModeSource to rMapModeDest (the above methods
1780  // for B2DPoly/Polygons use this internally anyway to transform the B2DPolygon)
1781  static basegfx::B2DHomMatrix LogicToLogic(const MapMode& rMapModeSource, const MapMode& rMapModeDest);
1782 
1789  SAL_DLLPRIVATE tools::Rectangle ImplLogicToDevicePixel( const tools::Rectangle& rLogicRect ) const;
1790 
1797  SAL_DLLPRIVATE Point ImplLogicToDevicePixel( const Point& rLogicPt ) const;
1798 
1809  SAL_DLLPRIVATE long ImplLogicWidthToDevicePixel( long nWidth ) const;
1810 
1811  SAL_DLLPRIVATE DeviceCoordinate LogicWidthToDeviceCoordinate( long nWidth ) const;
1812 
1824  SAL_DLLPRIVATE long ImplLogicXToDevicePixel( long nX ) const;
1825 
1837  SAL_DLLPRIVATE long ImplLogicYToDevicePixel( long nY ) const;
1838 
1849  SAL_DLLPRIVATE long ImplLogicHeightToDevicePixel( long nHeight ) const;
1850 
1860  SAL_DLLPRIVATE long ImplDevicePixelToLogicWidth( long nWidth ) const;
1861 
1871  SAL_DLLPRIVATE long ImplDevicePixelToLogicHeight( long nHeight ) const;
1872 
1882  SAL_DLLPRIVATE float ImplFloatLogicHeightToDevicePixel( float fLogicHeight ) const;
1883 
1890  SAL_DLLPRIVATE Size ImplLogicToDevicePixel( const Size& rLogicSize ) const;
1891 
1898  SAL_DLLPRIVATE tools::Rectangle ImplDevicePixelToLogic( const tools::Rectangle& rPixelRect ) const;
1899 
1906  SAL_DLLPRIVATE tools::Polygon ImplLogicToDevicePixel( const tools::Polygon& rLogicPoly ) const;
1907 
1914  SAL_DLLPRIVATE tools::PolyPolygon ImplLogicToDevicePixel( const tools::PolyPolygon& rLogicPolyPoly ) const;
1915 
1922  SAL_DLLPRIVATE LineInfo ImplLogicToDevicePixel( const LineInfo& rLineInfo ) const;
1923 
1930  SAL_DLLPRIVATE vcl::Region ImplPixelToDevicePixel( const vcl::Region& rRegion ) const;
1931 
1936  SAL_DLLPRIVATE void ImplInvalidateViewTransform();
1937 
1942  SAL_DLLPRIVATE basegfx::B2DHomMatrix ImplGetDeviceTransformation() const;
1944 
1945 
1950 
1952 public:
1953 
1956  bool IsNativeControlSupported( ControlType nType, ControlPart nPart ) const;
1957 
1961  ControlPart nPart,
1962  const tools::Rectangle& rControlRegion,
1963  const Point& aPos,
1964  bool& rIsInside ) const;
1965 
1968  bool DrawNativeControl(
1969  ControlType nType,
1970  ControlPart nPart,
1971  const tools::Rectangle& rControlRegion,
1972  ControlState nState,
1973  const ImplControlValue& aValue,
1974  const OUString& aCaption );
1975 
1979  ControlType nType,
1980  ControlPart nPart,
1981  const tools::Rectangle& rControlRegion,
1982  ControlState nState,
1983  const ImplControlValue& aValue,
1984  tools::Rectangle &rNativeBoundingRegion,
1985  tools::Rectangle &rNativeContentRegion ) const;
1987 
1990 
1992 public:
1993 
1999  bool DrawEPS(
2000  const Point& rPt, const Size& rSz,
2001  const GfxLink& rGfxLink, GDIMetaFile* pSubst = nullptr );
2003 };
2004 
2005 #endif // INCLUDED_VCL_OUTDEV_HXX
2006 
2007 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SAL_DLLPRIVATE std::unique_ptr< SalLayout > ImplGlyphFallbackLayout(std::unique_ptr< SalLayout >, ImplLayoutArgs &) const
void EnableOutput(bool bEnable=true)
basegfx::B2DHomMatrix GetInverseViewTransformation() const
Definition: map.cxx:881
VclReferenceBase & operator=(const VclReferenceBase &)=delete
SAL_DLLPRIVATE void ImplDrawStrikeoutChar(long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontStrikeout eStrikeout, Color aColor)
Definition: textline.cxx:568
vcl::Region GetClipRegion() const
const Color & GetTextColor() const
Definition: outdev.hxx:1109
void DrawText(const Point &rStartPt, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, MetricVector *pVector=nullptr, OUString *pDisplayText=nullptr, const SalLayoutGlyphs *pLayoutCache=nullptr)
Definition: text.cxx:779
OutDevType GetOutDevType() const
Definition: outdev.hxx:522
long mnOutOffX
Output offset for device output in pixel (pseudo window offset within window system's frames) ...
Definition: outdev.hxx:342
sal_Int32 mnDPIScalePercentage
For HiDPI displays, we want to draw elements for a percentage larger.
Definition: outdev.hxx:349
OUString GetEllipsisString(const OUString &rStr, long nMaxWidth, DrawTextFlags nStyle=DrawTextFlags::EndEllipsis) const
Definition: text.cxx:1918
virtual void Flush()
Definition: outdev.hxx:542
void SetDigitLanguage(LanguageType)
float approximate_char_width() const
Definition: text.cxx:901
VclPtr< OutputDevice > mpNextGraphics
Next output device in list.
Definition: outdev.hxx:318
tools::SvRef< FontCharMap > FontCharMapRef
Definition: outdev.hxx:284
void SetPixelOffset(const Size &rOffset)
Set an offset in pixel.
Definition: map.cxx:1914
static vcl::Font GetDefaultFont(DefaultFontType nType, LanguageType eLang, GetDefaultFontFlags nFlags, const OutputDevice *pOutDev=nullptr)
const Wallpaper & GetBackground() const
Definition: outdev.hxx:631
bool GetFontCharMap(FontCharMapRef &rxFontCharMap) const
Definition: hatch.hxx:44
void SetRelativeMapMode(const MapMode &rNewMapMode)
Definition: map.cxx:781
B2IVector B2ISize
static void AddFontSubstitute(const OUString &rFontName, const OUString &rReplaceFontName, AddFontSubstituteFlags nFlags)
SAL_DLLPRIVATE bool ImplIsRecordLayout() const
Definition: outdev.cxx:657
void SetAntialiasing(AntialiasingFlags nMode)
void DrawImage(const Point &rPos, const Image &rImage, DrawImageFlags nStyle=DrawImageFlags::NONE)
This is an overloaded member function, provided for convenience. It differs from the above function o...
std::vector< tools::Rectangle > MetricVector
Definition: outdev.hxx:139
virtual bool UsePolyPolygonForComplexGradient() override
Definition: window.cxx:3665
bool DrawNativeControl(ControlType nType, ControlPart nPart, const tools::Rectangle &rControlRegion, ControlState nState, const ImplControlValue &aValue, const OUString &aCaption)
Request rendering of a particular control and/or part.
sal_uInt32 GetGCStackDepth() const
OutputDevice(const OutputDevice &)=delete
bool mbOutput
Definition: outdev.hxx:379
SAL_DLLPRIVATE void DrawComplexGradient(const tools::Rectangle &rRect, const Gradient &rGradient, const tools::PolyPolygon *pClipPolyPoly)
virtual bool IsVirtual() const
Definition: outdev.cxx:183
Color maTextColor
Definition: outdev.hxx:365
DrawModeFlags
Definition: outdev.hxx:200
const Point & GetRefPoint() const
Definition: outdev.hxx:436
bool GetNativeControlRegion(ControlType nType, ControlPart nPart, const tools::Rectangle &rControlRegion, ControlState nState, const ImplControlValue &aValue, tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion) const
Query the native control's actual drawing region (including adornment)
void DrawWaveLine(const Point &rStartPos, const Point &rEndPos, long nLineWidth=1)
Definition: textline.cxx:939
bool SupportsCairo() const
SAL_DLLPRIVATE void SetDeviceClipRegion(const vcl::Region *pRegion)
void ImplClearFontData(bool bNewFontLists) override
Definition: window3.cxx:62
Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
Definition: map.cxx:1678
long mnEmphasisAscent
Definition: outdev.hxx:353
virtual void CopyDeviceArea(SalTwoRect &aPosAry, bool bWindowInvalidate) override
Definition: window.cxx:1219
ImplThresholdRes maThresRes
Definition: outdev.hxx:358
virtual ~OutputDevice() override
Definition: outdev.cxx:136
long mnOutOffY
Output offset for device output in pixel (pseudo window offset within window system's frames) ...
Definition: outdev.hxx:344
const Color & GetTextLineColor() const
Definition: outdev.hxx:1118
void DrawBitmapEx(const Point &rDestPt, const BitmapEx &rBitmapEx)
This is an overloaded member function, provided for convenience. It differs from the above function o...
sal_Int32 HasGlyphs(const vcl::Font &rFont, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1) const
bool mbTextSpecial
Definition: outdev.hxx:392
void DrawCtrlText(const Point &rPos, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, DrawTextFlags nStyle=DrawTextFlags::Mnemonic, MetricVector *pVector=nullptr, OUString *pDisplayText=nullptr, const SalLayoutGlyphs *pGlyphs=nullptr)
Definition: text.cxx:2052
static SAL_DLLPRIVATE void ImplUpdateFontDataForAllFrames(FontUpdateHandler_t pHdl, bool bNewFontLists)
bool IsBackground() const
Definition: outdev.hxx:633
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
DrawModeFlags mnDrawMode
Definition: outdev.hxx:355
Color maLineColor
Definition: outdev.hxx:362
long GetOutOffXPixel() const
Definition: outdev.hxx:445
sal_uInt8 GetTransparency() const
sal_uIntPtr sal_uLong
static void EndFontSubstitution()
TextAlign GetTextAlign() const
Definition: outdev.hxx:1127
bool IsOutputEnabled() const
Definition: outdev.hxx:588
FontEmphasisMark
SAL_DLLPRIVATE void SetDPIX(sal_Int32 nDPIX)
Definition: outdev.hxx:509
bool IsMapModeEnabled() const
Definition: outdev.hxx:1668
bool IsTextLineColor() const
Definition: outdev.hxx:1119
vcl::Region maRegion
Definition: outdev.hxx:361
SAL_DLLPRIVATE Bitmap GetDownsampledBitmap(const Size &rDstSz, const Point &rSrcPt, const Size &rSrcSz, const Bitmap &rBmp, long nMaxBmpDPIX, long nMaxBmpDPIY)
Retrieve downsampled and cropped bitmap.
SAL_DLLPRIVATE std::unique_ptr< SalLayout > getFallbackLayout(LogicalFontInstance *pLogicalFont, int nFallbackLevel, ImplLayoutArgs &rLayoutArgs) const
bool mbOutputClipped
Definition: outdev.hxx:381
static SAL_DLLPRIVATE void ImplDrawWavePixel(long nOriginX, long nOriginY, long nCurX, long nCurY, short nOrientation, SalGraphics *pGraphics, OutputDevice const *pOutDev, bool bDrawPixAsRect, long nPixWidth, long nPixHeight)
Definition: textline.cxx:50
void DrawChord(const tools::Rectangle &rRect, const Point &rStartPt, const Point &rEndPt)
void ImplDrawTextLine(long nBaseX, long nX, long nY, DeviceCoordinate nWidth, FontStrikeout eStrikeout, FontLineStyle eUnderline, FontLineStyle eOverline, bool bUnderlineAbove)
Definition: textline.cxx:660
SAL_DLLPRIVATE void ImplInitTextColor()
Definition: text.cxx:72
void DrawPolyLine(const tools::Polygon &rPoly)
Render the given polygon as a line stroke.
Definition: polyline.cxx:33
cairo::SurfaceSharedPtr CreateSurface(const cairo::CairoSurfaceSharedPtr &rSurface) const
Create Surface from given cairo surface.
std::shared_ptr< PhysicalFontCollection > mxFontCollection
Definition: outdev.hxx:322
ComplexTextLayoutFlags GetLayoutMode() const
Definition: outdev.hxx:598
SAL_DLLPRIVATE bool is_double_buffered_window() const
const MapMode & GetMapMode() const
Definition: outdev.hxx:1673
void SetTextFillColor()
Definition: text.cxx:697
sal_Int32 mnDPIY
Definition: outdev.hxx:348
SAL_DLLPRIVATE Color ImplDrawModeToColor(const Color &rColor) const
Definition: transparent.cxx:78
std::vector< VCLXGraphics * > * mpUnoGraphicsList
Definition: outdev.hxx:327
SAL_DLLPRIVATE void DrawLinearGradientToMetafile(const tools::Rectangle &rRect, const Gradient &rGradient)
void SetLayoutMode(ComplexTextLayoutFlags nTextLayoutMode)
bool RemoveTransparenciesFromMetaFile(const GDIMetaFile &rInMtf, GDIMetaFile &rOutMtf, long nMaxBmpDPIX, long nMaxBmpDPIY, bool bReduceTransparency, bool bTransparencyAutoMode, bool bDownsampleBitmaps, const Color &rBackground=COL_TRANSPARENT)
helper method removing transparencies from a metafile (e.g.
Definition: print2.cxx:646
std::unique_ptr< ImplDeviceFontSizeList > mpDeviceFontSizeList
Definition: outdev.hxx:324
void IntersectClipRegion(const tools::Rectangle &rRect)
GDIMetaFile * GetConnectMetaFile() const
Definition: outdev.hxx:417
static void LockFontUpdates(bool bLock)
cairo::SurfaceSharedPtr CreateBitmapSurface(const BitmapSystemData &rData, const Size &rSize) const
Create Surface for given bitmap data.
sal_Int32 mnDPIX
Definition: outdev.hxx:347
void ReleaseFontCollection()
SAL_DLLPRIVATE void ImplDrawSpecialText(SalLayout &)
Definition: text.cxx:315
virtual void SetSettings(const AllSettings &rSettings) override
void EnableMapMode(bool bEnable=true)
Definition: map.cxx:647
void DrawMask(const Point &rDestPt, const Bitmap &rBitmap, const Color &rMaskColor)
Definition: mask.cxx:30
bool SupportsOperation(OutDevSupportType) const
Query an OutputDevice to see whether it supports a specific operation.
Definition: outdev.cxx:338
bool mbMap
Definition: outdev.hxx:376
SAL_DLLPRIVATE const LogicalFontInstance * GetFontInstance() const
std::vector< VCLXGraphics * > * CreateUnoGraphicsList()
Definition: outdev.cxx:330
static SAL_DLLPRIVATE OUString ImplGetEllipsisString(const OutputDevice &rTargetDevice, const OUString &rStr, long nMaxWidth, DrawTextFlags nStyle, const vcl::ITextLayout &_rLayout)
Definition: text.cxx:1925
SAL_DLLPRIVATE Color GetSingleColorGradientFill()
bool mbEnableRTL
Definition: outdev.hxx:394
long mnOutOffOrigX
Additional output pixel offset, applied in LogicToPixel (used by SetPixelOffset/GetPixelOffset) ...
Definition: outdev.hxx:334
virtual void DrawDeviceMask(const Bitmap &rMask, const Color &rMaskColor, const Point &rDestPt, const Size &rDestSize, const Point &rSrcPtPixel, const Size &rSrcSizePixel)
Definition: mask.cxx:102
SAL_DLLPRIVATE void DrawGradientToMetafile(const tools::PolyPolygon &rPolyPoly, const Gradient &rGradient)
bool IsNativeControlSupported(ControlType nType, ControlPart nPart) const
Query the platform layer for control support.
void SetMapMode()
Definition: map.cxx:655
AntialiasingFlags GetAntialiasing() const
Definition: outdev.hxx:592
tools::Rectangle ImplGetTextBoundRect(const SalLayout &)
Definition: text.cxx:162
OutDevSupportType
Definition: vclenum.hxx:195
Color GetBackgroundColor() const override
Definition: window.cxx:580
bool GetTextBoundRect(tools::Rectangle &rRect, const OUString &rStr, sal_Int32 nBase=0, sal_Int32 nIndex=0, sal_Int32 nLen=-1, sal_uLong nLayoutWidth=0, const long *pDXArray=nullptr, const SalLayoutGlyphs *pGlyphs=nullptr) const
Return the exact bounding rectangle of rStr.
Definition: text.cxx:2309
FontAlign GetAlignment() const
Definition: font/font.cxx:664
bool SelectClipRegion(const vcl::Region &, SalGraphics *pGraphics=nullptr)
MapMode maMapMode
Definition: outdev.hxx:371
void SetDrawMode(DrawModeFlags nDrawMode)
void DrawWallpaper(const tools::Rectangle &rRect, const Wallpaper &rWallpaper)
Definition: wallpaper.cxx:32
const Color & GetOverlineColor() const
Definition: outdev.hxx:1123
SAL_DLLPRIVATE void ImplInitFontList() const
void ImplDrawTextBackground(const SalLayout &)
Definition: text.cxx:142
tools::Rectangle GetTextRect(const tools::Rectangle &rRect, const OUString &rStr, DrawTextFlags nStyle=DrawTextFlags::WordBreak, TextRectInfo *pInfo=nullptr, const vcl::ITextLayout *_pTextLayout=nullptr) const
Definition: text.cxx:1789
Color GetTextFillColor() const
Definition: text.cxx:755
SAL_DLLPRIVATE void InitLineColor()
sal_uInt16 sal_Unicode
static OUString GetNonMnemonicString(const OUString &rStr)
Definition: outdev.hxx:1092
Color maOverlineColor
Definition: outdev.hxx:367
void SetBackground()
void DrawStretchText(const Point &rStartPt, sal_uLong nWidth, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1)
Definition: text.cxx:1111
SAL_DLLPRIVATE void DrawDeviceAlphaBitmapSlowPath(const Bitmap &rBitmap, const AlphaMask &rAlpha, tools::Rectangle aDstRect, tools::Rectangle aBmpRect, Size const &aOutSz, Point const &aOutPt)
void Invert(const tools::Rectangle &rRect, InvertFlags nFlags=InvertFlags::NONE)
Definition: rect.cxx:128
AddFontSubstituteFlags
Definition: outdev.hxx:244
SAL_DLLPRIVATE void ReMirror(Point &rPoint) const
Definition: outdev.cxx:620
SAL_DLLPRIVATE void DrawLinearGradient(const tools::Rectangle &rRect, const Gradient &rGradient, const tools::PolyPolygon *pClipPolyPoly)
const vcl::Font & GetFont() const
Definition: outdev.hxx:636
RasterOp
Definition: vclenum.hxx:191
void ImplRefreshFontData(bool bNewFontLists) override
Definition: window3.cxx:69
OutDevViewType meOutDevViewType
Definition: outdev.hxx:360
void RefreshFontData(const bool bNewFontLists)
SAL_DLLPRIVATE void BlendBitmap(const SalTwoRect &rPosAry, const Bitmap &rBmp)
AntialiasingFlags mnAntialiasing
Definition: outdev.hxx:373
long DeviceCoordinate
bool mbBackground
Definition: outdev.hxx:378
virtual Bitmap GetBitmap(const Point &rSrcPt, const Size &rSize) const
PushFlags
Definition: outdevstate.hxx:38
FontMetric GetFontMetric() const
MetaActionType
void DrawInvisiblePolygon(const tools::PolyPolygon &rPolyPoly)
SAL_DLLPRIVATE void CalcHatchValues(const tools::Rectangle &rRect, long nDist, sal_uInt16 nAngle10, Point &rPt1, Point &rPt2, Size &rInc, Point &rEndPt1)
SAL_DLLPRIVATE bool ImplNewFont() const
bool mbClipRegionSet
Definition: outdev.hxx:389
SystemGraphicsData GetSystemGfxData() const
Definition: outdev.cxx:221
void SetFontCollectionFromSVData()
Color maFillColor
Definition: outdev.hxx:363
bool GetFontFeatures(std::vector< vcl::font::Feature > &rFontFeatures) const
SAL_DLLPRIVATE void ImplPrintTransparent(const Bitmap &rBmp, const Bitmap &rMask, const Point &rDestPt, const Size &rDestSize, const Point &rSrcPtPixel, const Size &rSrcSizePixel)
void ReleaseFontCache()
static void BeginFontSubstitution()
SAL_DLLPRIVATE long ImplLogicXToDevicePixel(long nX) const
Convert a logical X coordinate to a device pixel's X coordinate.
Definition: map.cxx:410
virtual long GetGradientStepCount(long nMinRect)
GetDefaultFontFlags
Definition: outdev.hxx:256
bool AddTempDevFont(const OUString &rFileURL, const OUString &rFontName)
void SetTextLineColor()
Definition: textline.cxx:800
std::unique_ptr< AllSettings > mxSettings
Definition: outdev.hxx:370
SalGraphics * mpGraphics
Graphics context to draw on.
Definition: outdev.hxx:316
void DrawShadowBitmapEx(const BitmapEx &rBitmapEx,::Color aShadowColor)
static SAL_DLLPRIVATE long ImplGetTextLines(ImplMultiTextLineInfo &rLineInfo, long nWidth, const OUString &rStr, DrawTextFlags nStyle, const vcl::ITextLayout &_rLayout)
Definition: text.cxx:455
bool GetTextOutline(tools::PolyPolygon &, const OUString &rStr, sal_Int32 nLen=-1, sal_uLong nLayoutWidth=0, const long *pDXArray=nullptr) const
Definition: text.cxx:2481
SAL_DLLPRIVATE long GetGradientSteps(const Gradient &rGradient, const tools::Rectangle &rRect, bool bMtf, bool bComplex=false)
SAL_DLLPRIVATE bool DrawTransparentNatively(const tools::PolyPolygon &rPolyPoly, sal_uInt16 nTransparencePercent)
SAL_DLLPRIVATE basegfx::B2DHomMatrix ImplGetDeviceTransformation() const
Get device transformation.
Definition: map.cxx:931
std::shared_ptr< Surface > SurfaceSharedPtr
Definition: cairo.hxx:36
std::vector< OutDevState > maOutDevStateStack
Definition: outdev.hxx:325
virtual void CopyArea(const Point &rDestPt, const Point &rSrcPt, const Size &rSrcSize, bool bWindowInvalidate=false)
Definition: outdev.cxx:473
FontMetric GetDevFont(int nDevFontIndex) const
Definition: outdev/font.cxx:46
bool IsTextFillColor() const
Definition: outdev.hxx:1114
SAL_DLLPRIVATE void ImplInvalidateViewTransform()
Invalidate the view transformation.
Definition: map.cxx:329
void DrawTextArray(const Point &rStartPt, const OUString &rStr, const long *pDXAry, sal_Int32 nIndex=0, sal_Int32 nLen=-1, SalLayoutFlags flags=SalLayoutFlags::NONE, const SalLayoutGlyphs *pLayoutCache=nullptr)
Definition: text.cxx:914
SAL_DLLPRIVATE void ImplDrawWaveTextLine(long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontLineStyle eTextLine, Color aColor, bool bIsAbove)
Definition: textline.cxx:195
SAL_DLLPRIVATE void ImplDrawWaveLine(long nBaseX, long nBaseY, long nStartX, long nStartY, long nWidth, long nHeight, long nLineWidth, short nOrientation, const Color &rColor)
Definition: textline.cxx:75
static SAL_DLLPRIVATE void ImplRefreshAllFontData(bool bNewFontLists)
virtual void EmulateDrawTransparent(const tools::PolyPolygon &rPolyPoly, sal_uInt16 nTransparencePercent)
void SetLineColor()
SAL_DLLPRIVATE void InitFillColor()
void SetRefPoint()
Definition: outdev.cxx:278
void SetConnectMetaFile(GDIMetaFile *pMtf)
Definition: outdev.cxx:208
SAL_DLLPRIVATE long ImplLogicYToDevicePixel(long nY) const
Convert a logical Y coordinate to a device pixel's Y coordinate.
Definition: map.cxx:420
virtual long GetFontExtLeading() const
bool IsRTLEnabled() const
Definition: outdev.hxx:1353
static std::shared_ptr< vcl::TextLayoutCache > CreateTextLayoutCache(OUString const &)
Definition: text.cxx:1349
Wallpaper maBackground
Definition: outdev.hxx:369
SAL_DLLPRIVATE float ImplFloatLogicHeightToDevicePixel(float fLogicHeight) const
Convert logical height to device pixels, with exact sub-pixel value.
Definition: map.cxx:450
bool IsClipRegion() const
Definition: outdev.hxx:662
css::uno::Any GetNativeSurfaceHandle(cairo::SurfaceSharedPtr &rSurface, const basegfx::B2ISize &rSize) const
Return native handle for underlying surface.
bool DrawPolyLineDirect(const basegfx::B2DHomMatrix &rObjectTransform, const basegfx::B2DPolygon &rB2DPolygon, double fLineWidth=0.0, double fTransparency=0.0, basegfx::B2DLineJoin eLineJoin=basegfx::B2DLineJoin::NONE, css::drawing::LineCap eLineCap=css::drawing::LineCap_BUTT, double fMiterMinimumAngle=basegfx::deg2rad(15.0), bool bBypassAACheck=false)
Definition: polyline.cxx:301
long mnOutOffOrigY
Additional output pixel offset, applied in LogicToPixel (used by SetPixelOffset/GetPixelOffset) ...
Definition: outdev.hxx:338
OutDevType
Definition: outdev.hxx:278
bool IsLineColor() const
Definition: outdev.hxx:619
void DrawGradientWallpaper(long nX, long nY, long nWidth, long nHeight, const Wallpaper &rWallpaper)
Definition: wallpaper.cxx:349
void GetCaretPositions(const OUString &, long *pCaretXArray, sal_Int32 nIndex, sal_Int32 nLen, const SalLayoutGlyphs *pGlyphs=nullptr) const
Definition: text.cxx:1056
SAL_DLLPRIVATE void DrawColorWallpaper(long nX, long nY, long nWidth, long nHeight, const Wallpaper &rWallpaper)
Definition: wallpaper.cxx:73
SAL_DLLPRIVATE void DrawHatchLine(const tools::Line &rLine, const tools::PolyPolygon &rPolyPoly, Point *pPtBuffer, bool bMtf)
float approximate_digit_width() const
Definition: text.cxx:909
ComplexTextLayoutFlags
Definition: outdevstate.hxx:66
long mnOutOffLogicX
Additional output offset in logical coordinates, applied in PixelToLogic (used by SetPixelOffset/GetP...
Definition: outdev.hxx:336
SystemTextLayoutData GetSysTextLayoutData(const Point &rStartPt, const OUString &rStr, sal_Int32 nIndex, sal_Int32 nLen, const long *pDXAry) const
OutputDevice::GetSysTextLayoutData.
Definition: text.cxx:2264
std::unique_ptr< ImplDeviceFontList > mpDeviceFontList
Definition: outdev.hxx:323
void DrawTransparent(const tools::PolyPolygon &rPolyPoly, sal_uInt16 nTransparencePercent)
SAL_DLLPRIVATE void ImplDrawTextDirect(SalLayout &, bool bTextLines)
Definition: text.cxx:272
SAL_DLLPRIVATE bool ImplIsAntiparallel() const
Definition: outdev.cxx:604
SAL_DLLPRIVATE void ImplInitAboveTextLineSize()
Definition: textline.cxx:45
Size GetOutputSize() const
Definition: outdev.hxx:450
virtual void SetFontOrientation(LogicalFontInstance *const pFontInstance) const
bool mbInitLineColor
Definition: outdev.hxx:384
SAL_DLLPRIVATE void ImplDrawStrikeoutLine(long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontStrikeout eStrikeout, Color aColor)
Definition: textline.cxx:506
const OutDevType meOutDevType
Definition: outdev.hxx:359
void SetFillColor()
bool mbNewFont
Definition: outdev.hxx:390
AntialiasingFlags
Definition: outdev.hxx:231
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:304
const Color & GetLineColor() const
Definition: outdev.hxx:618
virtual void InitClipRegion() override
virtual void ClipToPaintRegion(tools::Rectangle &rDstRect) override
bool mbTextLines
Definition: outdev.hxx:391
bool IsFontAvailable(const OUString &rFontName) const
Definition: outdev/font.cxx:91
void SetTextColor(const Color &rColor)
Definition: text.cxx:662
static SAL_DLLPRIVATE FontEmphasisMark ImplGetEmphasisMarkStyle(const vcl::Font &rFont)
void SetOutOffYPixel(long nOutOffY)
Definition: outdev.cxx:319
BmpMirrorFlags
Definition: bitmap.hxx:36
void DrawTextLine(const Point &rPos, long nWidth, FontStrikeout eStrikeout, FontLineStyle eUnderline, FontLineStyle eOverline, bool bUnderlineAbove=false)
Definition: textline.cxx:898
void(OutputDevice::* FontUpdateHandler_t)(bool)
Definition: outdev.hxx:1301
std::vector< tools::PolyPolygon > PolyPolyVector
VCL_DLLPUBLIC void DrawFocusRect(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect)
Definition: window2.cxx:1984
vcl::Font maFont
Definition: outdev.hxx:364
void AddGradientActions(const tools::Rectangle &rRect, const Gradient &rGradient, GDIMetaFile &rMtf)
bool ImplDrawRotateText(SalLayout &)
Definition: text.cxx:200
bool mbLineColor
Definition: outdev.hxx:382
constexpr double deg2rad(double v)
void SetOverlineColor()
Definition: textline.cxx:849
void MoveClipRegion(long nHorzMove, long nVertMove)
std::shared_ptr< cairo_surface_t > CairoSurfaceSharedPtr
Definition: cairo.hxx:34
RasterOp meRasterOp
Definition: outdev.hxx:368
SystemFontData GetSysFontData(int nFallbacklevel) const
Retrieve detailed font information in platform independent structure.
const AllSettings & GetSettings() const
Definition: outdev.hxx:420
Size GetOutputSizePixel() const
Definition: outdev.hxx:441
DrawTextFlags
Definition: outdev.hxx:144
bool mbInitTextColor
Definition: outdev.hxx:387
css::uno::Any GetSystemGfxDataAny() const
Definition: outdev.cxx:269
Color maTextLineColor
Definition: outdev.hxx:366
bool HitTestNativeScrollbar(ControlPart nPart, const tools::Rectangle &rControlRegion, const Point &aPos, bool &rIsInside) const
Query the native control to determine if it was acted upon.
virtual sal_uInt16 GetBitCount() const
Definition: outdev.cxx:305
DrawModeFlags GetDrawMode() const
Definition: outdev.hxx:595
void DrawBitmap(const Point &rDestPt, const Bitmap &rBitmap)
This is an overloaded member function, provided for convenience. It differs from the above function o...
std::unique_ptr< SalLayout > ImplLayout(const OUString &, sal_Int32 nIndex, sal_Int32 nLen, const Point &rLogicPos=Point(0, 0), long nLogicWidth=0, const long *pLogicDXArray=nullptr, SalLayoutFlags flags=SalLayoutFlags::NONE, vcl::TextLayoutCache const *=nullptr, const SalLayoutGlyphs *pGlyphs=nullptr) const
Definition: text.cxx:1233
DrawGridFlags
Definition: outdev.hxx:187
long GetTextHeight() const
Height where any character of the current font fits; in logic coordinates.
Definition: text.cxx:888
SAL_DLLPRIVATE void DrawDeviceAlphaBitmap(const Bitmap &rBmp, const AlphaMask &rAlpha, const Point &rDestPt, const Size &rDestSize, const Point &rSrcPtPixel, const Size &rSrcSizePixel)
void DrawPixel(const Point &rPt)
Definition: pixel.cxx:54
SAL_DLLPRIVATE void ImplDrawTextRect(long nBaseX, long nBaseY, long nX, long nY, long nWidth, long nHeight)
Definition: text.cxx:83
void DrawHatch(const tools::PolyPolygon &rPolyPoly, const Hatch &rHatch)
virtual void DrawHatchLine_DrawLine(const Point &rStartPoint, const Point &rEndPoint)
bool mbRefPoint
Definition: outdev.hxx:393
SAL_DLLPRIVATE void drawLine(basegfx::B2DPolyPolygon aLinePolyPolygon, const LineInfo &rInfo)
Helper for line geometry paint with support for graphic expansion (pattern and fat_to_area) ...
Definition: line.cxx:152
float GetDPIScaleFactor() const
Definition: outdev.hxx:512
long GetOutputWidthPixel() const
Definition: outdev.hxx:443
virtual void dispose()
void DrawTransformedBitmapEx(const basegfx::B2DHomMatrix &rTransformation, const BitmapEx &rBitmapEx)
Draw BitmapEx transformed.
bool GetGlyphBoundRects(const Point &rOrigin, const OUString &rStr, int nIndex, int nLen, MetricVector &rVector)
std::vector< VCLXGraphics * > * GetUnoGraphicsList() const
Definition: outdev.hxx:455
SAL_DLLPRIVATE void SetGrayscaleColors(Gradient &rGradient)
Point PixelToLogic(const Point &rDevicePt) const
Definition: map.cxx:1185
Point LogicToPixel(const Point &rLogicPt) const
Definition: map.cxx:940
void SaveBackground(VirtualDevice &rSaveDevice, const Point &rPos, const Size &rSize, const Size &) const override
ControlType
These types are all based on the supported variants vcl/salnativewidgets.hxx and must be kept in-sync...
SAL_DLLPRIVATE void ImplDrawPolyPolygonWithB2DPolyPolygon(const basegfx::B2DPolyPolygon &rB2DPolyPoly)
Definition: polygon.cxx:271
bool GetTextOutlines(PolyPolyVector &, const OUString &rStr, sal_Int32 nBase=0, sal_Int32 nIndex=0, sal_Int32 nLen=-1, sal_uLong nLayoutWidth=0, const long *pDXArray=nullptr) const
Definition: text.cxx:2460
VclPtr< OutputDevice > mpPrevGraphics
Previous output device in list.
Definition: outdev.hxx:317
long GetCtrlTextWidth(const OUString &rStr, const SalLayoutGlyphs *pLayoutCache=nullptr) const
Definition: text.cxx:2196
SAL_DLLPRIVATE ImplLayoutArgs ImplPrepareLayoutArgs(OUString &, const sal_Int32 nIndex, const sal_Int32 nLen, DeviceCoordinate nPixelWidth, const DeviceCoordinate *pPixelDXArray, SalLayoutFlags flags=SalLayoutFlags::NONE, vcl::TextLayoutCache const *=nullptr) const
Definition: text.cxx:1138
SalLayoutFlags
Definition: outdev.hxx:121
bool mbFillColor
Definition: outdev.hxx:383
SAL_DLLPRIVATE void ImplDrawEmphasisMark(long nBaseX, long nX, long nY, const tools::PolyPolygon &rPolyPoly, bool bPolyLine, const tools::Rectangle &rRect1, const tools::Rectangle &rRect2)
VclPtr< VirtualDevice > mpAlphaVDev
Definition: outdev.hxx:331
SAL_DLLPRIVATE vcl::Region ImplPixelToDevicePixel(const vcl::Region &rRegion) const
Convert a region in pixel units to a region in device pixel units and coords.
Definition: map.cxx:637
SAL_DLLPRIVATE void ImplDrawStraightTextLine(long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontLineStyle eTextLine, Color aColor, bool bIsAbove)
Definition: textline.cxx:263
bool IsRefPoint() const
Definition: outdev.hxx:437
ImplMapRes maMapRes
Definition: outdev.hxx:357
bool mbClipRegion
Definition: outdev.hxx:377
long GetOutputHeightPixel() const
Definition: outdev.hxx:444
long mnOutOffLogicY
Additional output offset in logical coordinates, applied in PixelToLogic (used by SetPixelOffset/GetP...
Definition: outdev.hxx:340
bool GetFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const
SAL_DLLPRIVATE void DrawComplexGradientToMetafile(const tools::Rectangle &rRect, const Gradient &rGradient)
SAL_DLLPRIVATE void ImplDrawPolyPolygon(const tools::PolyPolygon &rPolyPoly, const tools::PolyPolygon *pClipPolyPoly)
Definition: polygon.cxx:460
void SetExtOutDevData(vcl::ExtOutDevData *pExtOutDevData)
Definition: outdev.hxx:531
void ResetNewFontCache()
OutputDevice RenderContext
Definition: outdev.hxx:292
void SetFont(const vcl::Font &rNewFont)
LanguageType GetDigitLanguage() const
Definition: outdev.hxx:601
virtual void EnableRTL(bool bEnable=true) override
OutDevViewType GetOutDevViewType() const
Definition: outdev.hxx:614
bool mbInitClipRegion
Definition: outdev.hxx:388
static void ImplDrawText(OutputDevice &rTargetDevice, const tools::Rectangle &rRect, const OUString &rOrigStr, DrawTextFlags nStyle, MetricVector *pVector, OUString *pDisplayText, vcl::ITextLayout &_rLayout)
Definition: text.cxx:1452
SAL_DLLPRIVATE void ImplDrawEmphasisMarks(SalLayout &)
SAL_DLLPRIVATE void ImplUpdateFontData()
SAL_DLLPRIVATE long ImplDevicePixelToLogicHeight(long nHeight) const
Convert device pixels to a height in logical units.
Definition: map.cxx:468
bool IsTransparent() const
Definition: font/font.cxx:662
void SetRasterOp(RasterOp eRasterOp)
Definition: image.hxx:51
void DrawGrid(const tools::Rectangle &rRect, const Size &rDist, DrawGridFlags nFlags)
Definition: rect.cxx:216
SAL_DLLPRIVATE long GetEmphasisDescent() const
Definition: outdev.hxx:1286
bool DrawEPS(const Point &rPt, const Size &rSz, const GfxLink &rGfxLink, GDIMetaFile *pSubst=nullptr)
Definition: outdev.cxx:667
SalGraphics const * GetGraphics() const
Get the graphic context that the output device uses to draw on.
Definition: outdev.cxx:198
virtual void ScaleBitmap(Bitmap &rBmp, SalTwoRect &rPosAry)
SAL_DLLPRIVATE void DrawBitmapWallpaper(long nX, long nY, long nWidth, long nHeight, const Wallpaper &rWallpaper)
Definition: wallpaper.cxx:112
virtual void DrawDeviceBitmap(const Point &rDestPt, const Size &rDestSize, const Point &rSrcPtPixel, const Size &rSrcSizePixel, BitmapEx &rBitmapEx)
css::uno::Reference< css::awt::XGraphics > CreateUnoGraphics()
Definition: outdev.cxx:324
void DrawPolyPolygon(const tools::PolyPolygon &rPolyPoly)
Render the given poly-polygon.
Definition: polygon.cxx:36
int GetDevFontSizeCount(const vcl::Font &) const
Definition: outdev/font.cxx:98
SAL_DLLPRIVATE void ImplGetEmphasisMark(tools::PolyPolygon &rPolyPoly, bool &rPolyLine, tools::Rectangle &rRect1, tools::Rectangle &rRect2, long &rYOff, long &rWidth, FontEmphasisMark eEmphasis, long nHeight)
InvertFlags
Definition: outdev.hxx:267
sal_Int32 GetDPIScalePercentage() const
Definition: outdev.hxx:517
void AddHatchActions(const tools::PolyPolygon &rPolyPoly, const Hatch &rHatch, GDIMetaFile &rMtf)
SAL_DLLPRIVATE void SetDPIY(sal_Int32 nDPIY)
Definition: outdev.hxx:510
long GetOutOffYPixel() const
Definition: outdev.hxx:446
bool mbInitFont
Definition: outdev.hxx:386
RasterOp GetRasterOp() const
Definition: outdev.hxx:604
void ImplHandleResize(vcl::Window *pWindow, long nNewWidth, long nNewHeight)
Definition: winproc.cxx:1610
static SAL_DLLPRIVATE void ImplUpdateAllFontData(bool bNewFontLists)
virtual void DrawOutDev(const Point &rDestPt, const Size &rDestSize, const Point &rSrcPt, const Size &rSrcSize)
Definition: outdev.cxx:348
bool GetTextIsRTL(const OUString &, sal_Int32 nIndex, sal_Int32 nLen) const
Definition: text.cxx:1355
SAL_DLLPRIVATE long ImplLogicWidthToDevicePixel(long nWidth) const
Convert a logical width to a width in units of device pixels.
Definition: map.cxx:430
virtual vcl::Region ClipToDeviceBounds(vcl::Region aRegion) const
Perform actual rect clip against outdev dimensions, to generate empty clips whenever one of the value...
rtl::Reference< LogicalFontInstance > mpFontInstance
Definition: outdev.hxx:320
BmpMirrorFlags AdjustTwoRect(SalTwoRect &rTwoRect, const Size &rSizePix)
Definition: rect.cxx:317
void AddTextRectActions(const tools::Rectangle &rRect, const OUString &rOrigStr, DrawTextFlags nStyle, GDIMetaFile &rMtf)
Generate MetaTextActions for the text rect.
Definition: text.cxx:1711
long GetTextWidth(const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, vcl::TextLayoutCache const *=nullptr, SalLayoutGlyphs const *const pLayoutCache=nullptr) const
Width of the text.
Definition: text.cxx:877
void DrawCheckered(const Point &rPos, const Size &rSize, sal_uInt32 nLen=8, Color aStart=COL_WHITE, Color aEnd=COL_BLACK)
Fill the given rectangle with checkered rectangles of size nLen x nLen using the colors aStart and aE...
Definition: rect.cxx:190
Size GetDevFontSize(const vcl::Font &rFont, int nSizeIndex) const
DefaultFontType
bool mbInitFillColor
Definition: outdev.hxx:385
SAL_DLLPRIVATE long ImplLogicHeightToDevicePixel(long nHeight) const
Convert a logical height to a height in units of device pixels.
Definition: map.cxx:440
sal_Int32 ValidateKashidas(const OUString &rTxt, sal_Int32 nIdx, sal_Int32 nLen, sal_Int32 nKashCount, const sal_Int32 *pKashidaPos, sal_Int32 *pKashidaPosDropped) const
long mnTextOffX
font specific text alignment offsets in pixel units
Definition: outdev.hxx:351
int GetDevFontCount() const
Definition: outdev/font.cxx:71
sal_Int32 GetTextBreak(const OUString &rStr, long nTextWidth, sal_Int32 nIndex, sal_Int32 nLen=-1, long nCharExtra=0, vcl::TextLayoutCache const *=nullptr, const SalLayoutGlyphs *pGlyphs=nullptr) const
Definition: text.cxx:1366
long mnEmphasisDescent
Definition: outdev.hxx:354
long mnOutWidth
Definition: outdev.hxx:345
SAL_DLLPRIVATE void drawPolyLine(const tools::Polygon &rPoly, const LineInfo &rLineInfo)
Definition: polyline.cxx:253
SAL_DLLPRIVATE tools::Rectangle ImplLogicToDevicePixel(const tools::Rectangle &rLogicRect) const
Convert a logical rectangle to a rectangle in physical device pixel units.
Definition: map.cxx:504
ComplexTextLayoutFlags mnTextLayoutMode
Definition: outdev.hxx:356
bool mbDevOutput
Definition: outdev.hxx:380
virtual vcl::Region GetActiveClipRegion() const override
BitmapEx GetBitmapEx(const Point &rSrcPt, const Size &rSize) const
Query extended bitmap (with alpha channel, if available).
virtual bool TransformAndReduceBitmapExToTargetRange(const basegfx::B2DHomMatrix &aFullTransform, basegfx::B2DRange &aVisibleRange, double &fMaximumArea)
Transform and reduce the area that needs to be drawn of the bitmap and return the new visible range a...
SAL_DLLPRIVATE long ImplDevicePixelToLogicWidth(long nWidth) const
Convert device pixels to a width in logical units.
Definition: map.cxx:458
Size GetPixelOffset() const
Get the offset in pixel.
Definition: outdev.hxx:1713
void SetOutDevViewType(OutDevViewType eOutDevViewType)
If this OutputDevice is used for displaying a Print Preview the OutDevViewType should be set to 'OutD...
Definition: outdev.hxx:613
std::shared_ptr< ImplFontCache > mxFontCache
Definition: outdev.hxx:321
void Erase(const tools::Rectangle &rRect)
Definition: outdev.hxx:949
MapUnit
long GetMinKashida() const
void SetOutOffXPixel(long nOutOffX)
Definition: outdev.cxx:314
std::unique_ptr< ImplOutDevData > mpOutDevData
Definition: outdev.hxx:326
vcl::ExtOutDevData * GetExtOutDevData() const
Definition: outdev.hxx:532
SAL_DLLPRIVATE tools::Rectangle ImplDevicePixelToLogic(const tools::Rectangle &rPixelRect) const
Convert a rectangle in physical pixel units to a rectangle in physical pixel units and coords...
Definition: map.cxx:612
static void RemoveFontsSubstitute()
SAL_DLLPRIVATE void ImplInitTextLineSize()
Definition: textline.cxx:40
vcl::ExtOutDevData * mpExtOutDevData
Definition: outdev.hxx:328
virtual bool DrawTransformBitmapExDirect(const basegfx::B2DHomMatrix &aFullTransform, const BitmapEx &rBitmapEx)
Transform and draw a bitmap directly.
bool IsFillColor() const
Definition: outdev.hxx:624
virtual bool AcquireGraphics() const override
Acquire a graphics device that the output device uses to draw on.
Definition: window.cxx:813
bool IsOverlineColor() const
Definition: outdev.hxx:1124
long GetTextArray(const OUString &rStr, long *pDXAry, sal_Int32 nIndex=0, sal_Int32 nLen=-1, vcl::TextLayoutCache const *=nullptr, SalLayoutGlyphs const *const pLayoutCache=nullptr) const
Definition: text.cxx:947
OutDevViewType
Definition: outdev.hxx:280
Color GetPixel(const Point &rPt) const
Definition: pixel.cxx:29
static SAL_DLLPRIVATE void ImplClearAllFontData(bool bNewFontLists)
static OUString GetNonMnemonicString(const OUString &rStr, sal_Int32 &rMnemonicPos)
Definition: text.cxx:2213
long mnOutHeight
Definition: outdev.hxx:346
FontLineStyle
SAL_DLLPRIVATE DeviceCoordinate LogicWidthToDeviceCoordinate(long nWidth) const
Definition: map.cxx:1931
struct _cairo_surface cairo_surface_t
Definition: svpgdi.hxx:70
void ImplDrawTextLines(SalLayout &, FontStrikeout eStrikeout, FontLineStyle eUnderline, FontLineStyle eOverline, bool bWordLine, bool bUnderlineAbove)
Definition: textline.cxx:726
bool IsDeviceOutputNecessary() const
Definition: outdev.hxx:589
void Push(PushFlags nFlags=PushFlags::ALL)
Definition: outdevstate.cxx:60
Point maRefPoint
Definition: outdev.hxx:372
void DrawGradient(const tools::Rectangle &rRect, const Gradient &rGradient)
virtual void ImplReleaseFonts()
basegfx::B2DHomMatrix GetViewTransformation() const
Definition: map.cxx:853
SAL_DLLPRIVATE sal_Int32 GetDPIY() const
Get the output device's DPI y-axis value.
Definition: outdev.hxx:507
virtual void ClipAndDrawGradientMetafile(const Gradient &rGradient, const tools::PolyPolygon &rPolyPoly)
DrawImageFlags
Definition: outdev.hxx:172
FontStrikeout
SAL_DLLPRIVATE long GetEmphasisAscent() const
Definition: outdev.hxx:1285
long mnTextOffY
Definition: outdev.hxx:352
SAL_DLLPRIVATE void ImplDrawMnemonicLine(long nX, long nY, long nWidth)
Definition: textline.cxx:786
TextAlign
SAL_DLLPRIVATE sal_Int32 GetDPIX() const
Get the output device's DPI x-axis value.
Definition: outdev.hxx:501
void SetTextAlign(TextAlign eAlign)
Definition: text.cxx:763
virtual void ReleaseGraphics(bool bRelease=true) override
Release the graphics device, and remove it from the graphics device list.
Definition: window.cxx:877
bool HasMirroredGraphics() const override
const Color & GetFillColor() const
Definition: outdev.hxx:623
GDIMetaFile * mpMetaFile
Definition: outdev.hxx:319
SAL_DLLPRIVATE void drawOutDevDirect(const OutputDevice *pSrcDev, SalTwoRect &rPosAry)
Definition: outdev.cxx:532
SAL_DLLPRIVATE void ImplDrawPolygon(const tools::Polygon &rPoly, const tools::PolyPolygon *pClipPolyPoly=nullptr)
Definition: polygon.cxx:442
::std::vector< B2DPolyPolygon > B2DPolyPolygonVector
SAL_DLLPRIVATE Bitmap BlendBitmapWithAlpha(Bitmap &aBmp, BitmapReadAccess const *pP, BitmapReadAccess const *pA, const tools::Rectangle &aDstRect, const sal_Int32 nOffY, const sal_Int32 nDstHeight, const sal_Int32 nOffX, const sal_Int32 nDstWidth, const long *pMapX, const long *pMapY)
SAL_DLLPRIVATE bool InitFont() const
LanguageType meTextLanguage
Definition: outdev.hxx:374
typedef void(CALLTYPE *GetFuncDataPtr)(sal_uInt16 &nNo