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  virtual Color GetReadableFontColor(const Color& rFontColor, const Color& rBgColor) const;
634  bool IsBackground() const { return mbBackground; }
635 
636  void SetFont( const vcl::Font& rNewFont );
637  const vcl::Font& GetFont() const { return maFont; }
638 
639 protected:
640 
641  virtual void ImplReleaseFonts();
642 
643 private:
644 
645  SAL_DLLPRIVATE void InitLineColor();
646 
647  SAL_DLLPRIVATE void InitFillColor();
648 
650 
651 
654 
656 public:
657 
658  vcl::Region GetClipRegion() const;
659  void SetClipRegion();
660  void SetClipRegion( const vcl::Region& rRegion );
661  bool SelectClipRegion( const vcl::Region&, SalGraphics* pGraphics = nullptr );
662 
663  bool IsClipRegion() const { return mbClipRegion; }
664 
665  void MoveClipRegion( long nHorzMove, long nVertMove );
666  void IntersectClipRegion( const tools::Rectangle& rRect );
667  void IntersectClipRegion( const vcl::Region& rRegion );
668 
669  virtual vcl::Region GetActiveClipRegion() const;
670 
671 protected:
672 
673  virtual void InitClipRegion();
674 
681  virtual vcl::Region ClipToDeviceBounds(vcl::Region aRegion) const;
682  virtual void ClipToPaintRegion ( tools::Rectangle& rDstRect );
683 
684 private:
685 
686  SAL_DLLPRIVATE void SetDeviceClipRegion( const vcl::Region* pRegion );
688 
689 
692 
694 public:
695 
696  void DrawPixel( const Point& rPt );
697  void DrawPixel( const Point& rPt, const Color& rColor );
698 
699  Color GetPixel( const Point& rPt ) const;
701 
702 
705 
707 public:
708 
709  void DrawRect( const tools::Rectangle& rRect );
710  void DrawRect( const tools::Rectangle& rRect,
711  sal_uLong nHorzRount, sal_uLong nVertRound );
712 
714  void DrawCheckered(
715  const Point& rPos,
716  const Size& rSize,
717  sal_uInt32 nLen = 8,
718  Color aStart = COL_WHITE,
719  Color aEnd = COL_BLACK);
720 
721  void DrawGrid( const tools::Rectangle& rRect, const Size& rDist, DrawGridFlags nFlags );
722 
724 
727 public:
729  void Invert( const tools::Rectangle& rRect, InvertFlags nFlags = InvertFlags::NONE );
730  void Invert( const tools::Polygon& rPoly, InvertFlags nFlags = InvertFlags::NONE );
732 
735 
737 public:
738 
739  void DrawLine( const Point& rStartPt, const Point& rEndPt );
740 
741  void DrawLine( const Point& rStartPt, const Point& rEndPt,
742  const LineInfo& rLineInfo );
743 
744 protected:
745  virtual void DrawHatchLine_DrawLine(const Point& rStartPoint, const Point& rEndPoint);
746 
747 private:
748 
751  SAL_DLLPRIVATE void drawLine( basegfx::B2DPolyPolygon aLinePolyPolygon, const LineInfo& rInfo );
753 
754 
757 
759 public:
760 
769  void DrawPolyLine( const tools::Polygon& rPoly );
770 
771  void DrawPolyLine(
772  const basegfx::B2DPolygon&,
773  double fLineWidth = 0.0,
775  css::drawing::LineCap eLineCap = css::drawing::LineCap_BUTT,
776  double fMiterMinimumAngle = basegfx::deg2rad(15.0));
777 
788  void DrawPolyLine( const tools::Polygon& rPoly,
789  const LineInfo& rLineInfo );
790 
791  // #i101491#
792  // Helper who tries to use SalGDI's DrawPolyLine direct and returns it's bool.
793  bool DrawPolyLineDirect(
794  const basegfx::B2DHomMatrix& rObjectTransform,
795  const basegfx::B2DPolygon& rB2DPolygon,
796  double fLineWidth = 0.0,
797  double fTransparency = 0.0,
799  css::drawing::LineCap eLineCap = css::drawing::LineCap_BUTT,
800  double fMiterMinimumAngle = basegfx::deg2rad(15.0),
801  bool bBypassAACheck = false);
802 
803 private:
804 
805  // #i101491#
806  // Helper which holds the old line geometry creation and is extended to use AA when
807  // switched on. Advantage is that line geometry is only temporarily used for paint
808  SAL_DLLPRIVATE void drawPolyLine(const tools::Polygon& rPoly, const LineInfo& rLineInfo);
809 
811 
812 
815 
817 public:
818 
829  void DrawPolygon( const tools::Polygon& rPoly );
830  void DrawPolygon( const basegfx::B2DPolygon& );
831 
842  void DrawPolyPolygon( const tools::PolyPolygon& rPolyPoly );
844 
845 private:
846 
847  SAL_DLLPRIVATE void ImplDrawPolygon( const tools::Polygon& rPoly, const tools::PolyPolygon* pClipPolyPoly = nullptr );
848  SAL_DLLPRIVATE void ImplDrawPolyPolygon( const tools::PolyPolygon& rPolyPoly, const tools::PolyPolygon* pClipPolyPoly );
849  SAL_DLLPRIVATE void ImplDrawPolyPolygon( sal_uInt16 nPoly, const tools::PolyPolygon& rPolyPoly );
850  // #i101491#
851  // Helper who implements the DrawPolyPolygon functionality for basegfx::B2DPolyPolygon
852  // without MetaFile processing
853  SAL_DLLPRIVATE void ImplDrawPolyPolygonWithB2DPolyPolygon(const basegfx::B2DPolyPolygon& rB2DPolyPoly);
855 
856 
859 
861 public:
862 
863  void DrawEllipse( const tools::Rectangle& rRect );
864 
865  void DrawArc(
866  const tools::Rectangle& rRect,
867  const Point& rStartPt, const Point& rEndPt );
868 
869  void DrawPie(
870  const tools::Rectangle& rRect,
871  const Point& rStartPt, const Point& rEndPt );
872 
873  void DrawChord(
874  const tools::Rectangle& rRect,
875  const Point& rStartPt, const Point& rEndPt );
876 
878 
879 
882 
884 public:
885  void DrawGradient( const tools::Rectangle& rRect, const Gradient& rGradient );
886  void DrawGradient( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient );
887 
888  void AddGradientActions(
889  const tools::Rectangle& rRect,
890  const Gradient& rGradient,
891  GDIMetaFile& rMtf );
892 
893 protected:
894 
895  virtual bool UsePolyPolygonForComplexGradient() = 0;
896 
897  virtual long GetGradientStepCount( long nMinRect );
898 
899 private:
900 
901  SAL_DLLPRIVATE void DrawLinearGradient( const tools::Rectangle& rRect, const Gradient& rGradient, const tools::PolyPolygon* pClipPolyPoly );
902  SAL_DLLPRIVATE void DrawComplexGradient( const tools::Rectangle& rRect, const Gradient& rGradient, const tools::PolyPolygon* pClipPolyPoly );
903 
904  SAL_DLLPRIVATE void DrawGradientToMetafile( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient );
905  SAL_DLLPRIVATE void DrawLinearGradientToMetafile( const tools::Rectangle& rRect, const Gradient& rGradient );
906  SAL_DLLPRIVATE void DrawComplexGradientToMetafile( const tools::Rectangle& rRect, const Gradient& rGradient );
907 
908  SAL_DLLPRIVATE long GetGradientSteps( const Gradient& rGradient, const tools::Rectangle& rRect, bool bMtf, bool bComplex=false );
909 
910  SAL_DLLPRIVATE Color GetSingleColorGradientFill();
911  SAL_DLLPRIVATE void SetGrayscaleColors( Gradient &rGradient );
913 
914 
917 
919 public:
920 
921 #ifdef _MSC_VER
922  void DrawHatch( const tools::PolyPolygon& rPolyPoly, const ::Hatch& rHatch );
923  void AddHatchActions( const tools::PolyPolygon& rPolyPoly,
924  const ::Hatch& rHatch,
925  GDIMetaFile& rMtf );
926 #else
927  void DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch& rHatch );
928  void AddHatchActions( const tools::PolyPolygon& rPolyPoly,
929  const Hatch& rHatch,
930  GDIMetaFile& rMtf );
931 #endif
932 
933  void DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch& rHatch, bool bMtf );
934 
935 private:
936 
937  SAL_DLLPRIVATE void CalcHatchValues( const tools::Rectangle& rRect, long nDist, sal_uInt16 nAngle10, Point& rPt1, Point& rPt2, Size& rInc, Point& rEndPt1 );
938  SAL_DLLPRIVATE void DrawHatchLine( const tools::Line& rLine, const tools::PolyPolygon& rPolyPoly, Point* pPtBuffer, bool bMtf );
940 
941 
944 
946 public:
947  void DrawWallpaper( const tools::Rectangle& rRect, const Wallpaper& rWallpaper );
948 
949  void Erase();
950  void Erase( const tools::Rectangle& rRect ) { DrawWallpaper( rRect, GetBackground() ); }
951 
952 protected:
953  void DrawGradientWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper );
954 
955 private:
956  SAL_DLLPRIVATE void DrawWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper );
957  SAL_DLLPRIVATE void DrawColorWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper );
958  SAL_DLLPRIVATE void DrawBitmapWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper );
960 
961 
964 
966 public:
967 
968  void DrawText( const Point& rStartPt, const OUString& rStr,
969  sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
970  MetricVector* pVector = nullptr, OUString* pDisplayText = nullptr,
971  const SalLayoutGlyphs* pLayoutCache = nullptr );
972 
973  void DrawText( const tools::Rectangle& rRect,
974  const OUString& rStr, DrawTextFlags nStyle = DrawTextFlags::NONE,
975  MetricVector* pVector = nullptr, OUString* pDisplayText = nullptr,
976  vcl::ITextLayout* _pTextLayout = nullptr );
977 
978  static void ImplDrawText( OutputDevice& rTargetDevice, const tools::Rectangle& rRect,
979  const OUString& rOrigStr, DrawTextFlags nStyle,
980  MetricVector* pVector, OUString* pDisplayText, vcl::ITextLayout& _rLayout );
981 
982  void ImplDrawText( SalLayout& );
983 
984  void ImplDrawTextBackground( const SalLayout& );
985 
986  void DrawCtrlText( const Point& rPos, const OUString& rStr,
987  sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
988  DrawTextFlags nStyle = DrawTextFlags::Mnemonic, MetricVector* pVector = nullptr, OUString* pDisplayText = nullptr,
989  const SalLayoutGlyphs* pGlyphs = nullptr);
990 
991  void DrawTextLine( const Point& rPos, long nWidth,
992  FontStrikeout eStrikeout,
993  FontLineStyle eUnderline,
994  FontLineStyle eOverline,
995  bool bUnderlineAbove = false );
996 
997  void ImplDrawTextLine( long nBaseX, long nX, long nY, DeviceCoordinate nWidth,
998  FontStrikeout eStrikeout, FontLineStyle eUnderline,
999  FontLineStyle eOverline, bool bUnderlineAbove );
1000 
1001  void ImplDrawTextLines( SalLayout&, FontStrikeout eStrikeout, FontLineStyle eUnderline,
1002  FontLineStyle eOverline, bool bWordLine, bool bUnderlineAbove );
1003 
1004  void DrawWaveLine( const Point& rStartPos, const Point& rEndPos, long nLineWidth = 1 );
1005 
1006  bool ImplDrawRotateText( SalLayout& );
1007 
1009  const OUString& rStr, DrawTextFlags nStyle = DrawTextFlags::WordBreak,
1010  TextRectInfo* pInfo = nullptr,
1011  const vcl::ITextLayout* _pTextLayout = nullptr ) const;
1012 
1062  bool GetTextBoundRect( tools::Rectangle& rRect,
1063  const OUString& rStr, sal_Int32 nBase = 0, sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
1064  sal_uLong nLayoutWidth = 0, const long* pDXArray = nullptr,
1065  const SalLayoutGlyphs* pGlyphs = nullptr ) const;
1066 
1068 
1070  const OUString& rStr,
1071  sal_Int32 nLen = -1,
1072  sal_uLong nLayoutWidth = 0, const long* pDXArray = nullptr ) const;
1073 
1075  const OUString& rStr, sal_Int32 nBase = 0, sal_Int32 nIndex = 0,
1076  sal_Int32 nLen = -1,
1077  sal_uLong nLayoutWidth = 0, const long* pDXArray = nullptr ) const;
1078 
1080  const OUString& rStr, sal_Int32 nBase, sal_Int32 nIndex = 0,
1081  sal_Int32 nLen = -1,
1082  sal_uLong nLayoutWidth = 0, const long* pDXArray = nullptr ) const;
1083 
1084 
1085  OUString GetEllipsisString( const OUString& rStr, long nMaxWidth,
1086  DrawTextFlags nStyle = DrawTextFlags::EndEllipsis ) const;
1087 
1088  long GetCtrlTextWidth( const OUString& rStr,
1089  const SalLayoutGlyphs* pLayoutCache = nullptr ) const;
1090 
1091  static OUString GetNonMnemonicString( const OUString& rStr, sal_Int32& rMnemonicPos );
1092 
1093  static OUString GetNonMnemonicString( const OUString& rStr )
1094  { sal_Int32 nDummy; return GetNonMnemonicString( rStr, nDummy ); }
1095 
1104  void AddTextRectActions( const tools::Rectangle& rRect,
1105  const OUString& rOrigStr,
1106  DrawTextFlags nStyle,
1107  GDIMetaFile& rMtf );
1108 
1109  void SetTextColor( const Color& rColor );
1110  const Color& GetTextColor() const { return maTextColor; }
1111 
1112  void SetTextFillColor();
1113  void SetTextFillColor( const Color& rColor );
1114  Color GetTextFillColor() const;
1115  bool IsTextFillColor() const { return !maFont.IsTransparent(); }
1116 
1117  void SetTextLineColor();
1118  void SetTextLineColor( const Color& rColor );
1119  const Color& GetTextLineColor() const { return maTextLineColor; }
1120  bool IsTextLineColor() const { return (maTextLineColor.GetTransparency() == 0); }
1121 
1122  void SetOverlineColor();
1123  void SetOverlineColor( const Color& rColor );
1124  const Color& GetOverlineColor() const { return maOverlineColor; }
1125  bool IsOverlineColor() const { return (maOverlineColor.GetTransparency() == 0); }
1126 
1127  void SetTextAlign( TextAlign eAlign );
1128  TextAlign GetTextAlign() const { return maFont.GetAlignment(); }
1129 
1134  long GetTextWidth( const OUString& rStr, sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
1135  vcl::TextLayoutCache const* = nullptr,
1136  SalLayoutGlyphs const*const pLayoutCache = nullptr) const;
1137 
1142  long GetTextHeight() const;
1143  float approximate_char_width() const;
1144  float approximate_digit_width() const;
1145 
1146  void DrawTextArray( const Point& rStartPt, const OUString& rStr,
1147  const long* pDXAry,
1148  sal_Int32 nIndex = 0,
1149  sal_Int32 nLen = -1,
1151  const SalLayoutGlyphs* pLayoutCache = nullptr);
1152  long GetTextArray( const OUString& rStr, long* pDXAry,
1153  sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
1154  vcl::TextLayoutCache const* = nullptr,
1155  SalLayoutGlyphs const*const pLayoutCache = nullptr) const;
1156 
1157  void GetCaretPositions( const OUString&, long* pCaretXArray,
1158  sal_Int32 nIndex, sal_Int32 nLen,
1159  const SalLayoutGlyphs* pGlyphs = nullptr ) const;
1160  void DrawStretchText( const Point& rStartPt, sal_uLong nWidth,
1161  const OUString& rStr,
1162  sal_Int32 nIndex = 0, sal_Int32 nLen = -1);
1163  sal_Int32 GetTextBreak( const OUString& rStr, long nTextWidth,
1164  sal_Int32 nIndex, sal_Int32 nLen = -1,
1165  long nCharExtra = 0,
1166  vcl::TextLayoutCache const* = nullptr,
1167  const SalLayoutGlyphs* pGlyphs = nullptr) const;
1168  sal_Int32 GetTextBreak( const OUString& rStr, long nTextWidth,
1169  sal_Unicode nExtraChar, sal_Int32& rExtraCharPos,
1170  sal_Int32 nIndex, sal_Int32 nLen,
1171  long nCharExtra,
1172  vcl::TextLayoutCache const* = nullptr) const;
1173  static std::shared_ptr<vcl::TextLayoutCache> CreateTextLayoutCache(OUString const&);
1174 
1175 protected:
1176  SAL_DLLPRIVATE void ImplInitTextLineSize();
1177  SAL_DLLPRIVATE void ImplInitAboveTextLineSize();
1178  static
1179  SAL_DLLPRIVATE long ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo, long nWidth, const OUString& rStr, DrawTextFlags nStyle, const vcl::ITextLayout& _rLayout );
1180 private:
1181  SAL_DLLPRIVATE void ImplInitTextColor();
1182 
1183  SAL_DLLPRIVATE void ImplDrawTextDirect( SalLayout&, bool bTextLines);
1184  SAL_DLLPRIVATE void ImplDrawSpecialText( SalLayout& );
1185  SAL_DLLPRIVATE void ImplDrawTextRect( long nBaseX, long nBaseY, long nX, long nY, long nWidth, long nHeight );
1186 
1187  SAL_DLLPRIVATE static void ImplDrawWavePixel( long nOriginX, long nOriginY, long nCurX, long nCurY, short nOrientation, SalGraphics* pGraphics, OutputDevice const * pOutDev,
1188  bool bDrawPixAsRect, long nPixWidth, long nPixHeight );
1189  SAL_DLLPRIVATE void ImplDrawWaveLine( long nBaseX, long nBaseY, long nStartX, long nStartY, long nWidth, long nHeight, long nLineWidth, short nOrientation, const Color& rColor );
1190  SAL_DLLPRIVATE void ImplDrawWaveTextLine( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontLineStyle eTextLine, Color aColor, bool bIsAbove );
1191  SAL_DLLPRIVATE void ImplDrawStraightTextLine( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontLineStyle eTextLine, Color aColor, bool bIsAbove );
1192  SAL_DLLPRIVATE void ImplDrawStrikeoutLine( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontStrikeout eStrikeout, Color aColor );
1193  SAL_DLLPRIVATE void ImplDrawStrikeoutChar( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontStrikeout eStrikeout, Color aColor );
1194  SAL_DLLPRIVATE void ImplDrawMnemonicLine( long nX, long nY, long nWidth );
1195 
1196 
1198 
1199 
1202 
1204 public:
1205 
1206  FontMetric GetDevFont( int nDevFontIndex ) const;
1207  int GetDevFontCount() const;
1208 
1209  bool IsFontAvailable( const OUString& rFontName ) const;
1210 
1211  Size GetDevFontSize( const vcl::Font& rFont, int nSizeIndex ) const;
1212  int GetDevFontSizeCount( const vcl::Font& ) const;
1213 
1214  bool AddTempDevFont( const OUString& rFileURL, const OUString& rFontName );
1215  void RefreshFontData( const bool bNewFontLists );
1216 
1217  FontMetric GetFontMetric() const;
1218  FontMetric GetFontMetric( const vcl::Font& rFont ) const;
1219 
1220  bool GetFontCharMap( FontCharMapRef& rxFontCharMap ) const;
1221  bool GetFontCapabilities( vcl::FontCapabilities& rFontCapabilities ) const;
1222 
1223  bool GetFontFeatures(std::vector<vcl::font::Feature>& rFontFeatures) const;
1224 
1225 
1232  SystemFontData GetSysFontData( int nFallbacklevel ) const;
1233 
1234  SAL_DLLPRIVATE void ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPolyLine, tools::Rectangle& rRect1, tools::Rectangle& rRect2,
1235  long& rYOff, long& rWidth, FontEmphasisMark eEmphasis, long nHeight );
1236  SAL_DLLPRIVATE static FontEmphasisMark
1237  ImplGetEmphasisMarkStyle( const vcl::Font& rFont );
1238 
1239  bool GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, int nIndex,
1240  int nLen, MetricVector& rVector );
1241 
1242  sal_Int32 HasGlyphs( const vcl::Font& rFont, const OUString& rStr,
1243  sal_Int32 nIndex = 0, sal_Int32 nLen = -1 ) const;
1244 
1245  long GetMinKashida() const;
1246 
1247  // i60594
1248  // validate kashida positions against the current font
1249  // returns count of invalid kashida positions
1250  sal_Int32 ValidateKashidas( const OUString& rTxt, sal_Int32 nIdx, sal_Int32 nLen,
1251  sal_Int32 nKashCount, // number of suggested kashida positions (in)
1252  const sal_Int32* pKashidaPos, // suggested kashida positions (in)
1253  sal_Int32* pKashidaPosDropped // invalid kashida positions (out)
1254  ) const;
1255 
1256  static void BeginFontSubstitution();
1257  static void EndFontSubstitution();
1258  static void AddFontSubstitute( const OUString& rFontName,
1259  const OUString& rReplaceFontName,
1260  AddFontSubstituteFlags nFlags );
1261  static void RemoveFontsSubstitute();
1262 
1264  LanguageType eLang,
1265  GetDefaultFontFlags nFlags,
1266  const OutputDevice* pOutDev = nullptr );
1267 
1268  SAL_DLLPRIVATE void ImplInitFontList() const;
1269  SAL_DLLPRIVATE void ImplUpdateFontData();
1270 
1271  //drop font data for all outputdevices.
1272  //If bNewFontLists is true then empty lists of system fonts
1273  SAL_DLLPRIVATE static void ImplClearAllFontData( bool bNewFontLists );
1274  //fetch font data for all outputdevices
1275  //If bNewFontLists is true then fetch lists of system fonts
1276  SAL_DLLPRIVATE static void ImplRefreshAllFontData( bool bNewFontLists );
1277  //drop and fetch font data for all outputdevices
1278  //If bNewFontLists is true then drop and refetch lists of system fonts
1279  SAL_DLLPRIVATE static void ImplUpdateAllFontData( bool bNewFontLists );
1280 
1281  // Lock font updates for all output devices
1282  static void LockFontUpdates(bool bLock);
1283 
1284 protected:
1285  SAL_DLLPRIVATE const LogicalFontInstance* GetFontInstance() const;
1286  SAL_DLLPRIVATE long GetEmphasisAscent() const { return mnEmphasisAscent; }
1287  SAL_DLLPRIVATE long GetEmphasisDescent() const { return mnEmphasisDescent; }
1288 
1289  SAL_DLLPRIVATE bool InitFont() const;
1290  virtual void SetFontOrientation( LogicalFontInstance* const pFontInstance ) const;
1291  virtual long GetFontExtLeading() const;
1292 
1293  virtual void ImplClearFontData(bool bNewFontLists);
1294  virtual void ImplRefreshFontData(bool bNewFontLists);
1295  void ReleaseFontCache();
1296  void ReleaseFontCollection();
1298  void ResetNewFontCache();
1299 
1300 private:
1301 
1302  typedef void ( OutputDevice::* FontUpdateHandler_t )( bool );
1303 
1304  SAL_DLLPRIVATE bool ImplNewFont() const;
1305 
1306  SAL_DLLPRIVATE static void ImplUpdateFontDataForAllFrames( FontUpdateHandler_t pHdl, bool bNewFontLists );
1307 
1308  static
1309  SAL_DLLPRIVATE OUString ImplGetEllipsisString( const OutputDevice& rTargetDevice, const OUString& rStr,
1310  long nMaxWidth, DrawTextFlags nStyle, const vcl::ITextLayout& _rLayout );
1311 
1312  SAL_DLLPRIVATE void ImplDrawEmphasisMark( long nBaseX, long nX, long nY, const tools::PolyPolygon& rPolyPoly, bool bPolyLine, const tools::Rectangle& rRect1, const tools::Rectangle& rRect2 );
1313  SAL_DLLPRIVATE void ImplDrawEmphasisMarks( SalLayout& );
1315 
1316 
1319 
1321 public:
1322 
1323  SystemTextLayoutData GetSysTextLayoutData( const Point& rStartPt, const OUString& rStr,
1324  sal_Int32 nIndex, sal_Int32 nLen,
1325  const long* pDXAry ) const;
1326 
1327  // tells whether this output device is RTL in an LTR UI or LTR in a RTL UI
1328  SAL_DLLPRIVATE bool ImplIsAntiparallel() const ;
1329  SAL_DLLPRIVATE void ReMirror( Point &rPoint ) const;
1330  SAL_DLLPRIVATE void ReMirror( tools::Rectangle &rRect ) const;
1331  SAL_DLLPRIVATE void ReMirror( vcl::Region &rRegion ) const;
1332  SAL_DLLPRIVATE bool ImplIsRecordLayout() const;
1333  virtual bool HasMirroredGraphics() const;
1334  std::unique_ptr<SalLayout>
1335  ImplLayout( const OUString&, sal_Int32 nIndex, sal_Int32 nLen,
1336  const Point& rLogicPos = Point(0,0), long nLogicWidth=0,
1337  const long* pLogicDXArray=nullptr, SalLayoutFlags flags = SalLayoutFlags::NONE,
1338  vcl::TextLayoutCache const* = nullptr,
1339  const SalLayoutGlyphs* pGlyphs = nullptr) const;
1340  SAL_DLLPRIVATE ImplLayoutArgs ImplPrepareLayoutArgs( OUString&, const sal_Int32 nIndex, const sal_Int32 nLen,
1341  DeviceCoordinate nPixelWidth, const DeviceCoordinate* pPixelDXArray,
1343  vcl::TextLayoutCache const* = nullptr) const;
1344  SAL_DLLPRIVATE std::unique_ptr<SalLayout>
1345  ImplGlyphFallbackLayout( std::unique_ptr<SalLayout>, ImplLayoutArgs& ) const;
1346  SAL_DLLPRIVATE std::unique_ptr<SalLayout>
1348  LogicalFontInstance* pLogicalFont, int nFallbackLevel,
1349  ImplLayoutArgs& rLayoutArgs) const;
1350 
1351 
1352  // Enabling/disabling RTL only makes sense for OutputDevices that use a mirroring SalGraphisLayout
1353  virtual void EnableRTL( bool bEnable = true);
1354  bool IsRTLEnabled() const { return mbEnableRTL; }
1355 
1356  bool GetTextIsRTL( const OUString&, sal_Int32 nIndex, sal_Int32 nLen ) const;
1357 
1359 
1360 
1363 
1365 public:
1366 
1376  void DrawBitmap(
1377  const Point& rDestPt,
1378  const Bitmap& rBitmap );
1379 
1389  void DrawBitmap(
1390  const Point& rDestPt,
1391  const Size& rDestSize,
1392  const Bitmap& rBitmap );
1393 
1394  void DrawBitmap(
1395  const Point& rDestPt,
1396  const Size& rDestSize,
1397  const Point& rSrcPtPixel,
1398  const Size& rSrcSizePixel,
1399  const Bitmap& rBitmap,
1401 
1411  void DrawBitmapEx(
1412  const Point& rDestPt,
1413  const BitmapEx& rBitmapEx );
1414 
1415 
1425  void DrawBitmapEx(
1426  const Point& rDestPt,
1427  const Size& rDestSize,
1428  const BitmapEx& rBitmapEx );
1429 
1430  void DrawBitmapEx(
1431  const Point& rDestPt,
1432  const Size& rDestSize,
1433  const Point& rSrcPtPixel,
1434  const Size& rSrcSizePixel,
1435  const BitmapEx& rBitmapEx,
1437 
1445  void DrawImage(
1446  const Point& rPos,
1447  const Image& rImage,
1449 
1450  void DrawImage(
1451  const Point& rPos,
1452  const Size& rSize,
1453  const Image& rImage,
1455 
1456 
1457  virtual Bitmap GetBitmap( const Point& rSrcPt, const Size& rSize ) const;
1458 
1461  BitmapEx GetBitmapEx( const Point& rSrcPt, const Size& rSize ) const;
1462 
1463 
1475  const basegfx::B2DHomMatrix& rTransformation,
1476  const BitmapEx& rBitmapEx);
1477 
1478  void DrawShadowBitmapEx(
1479  const BitmapEx& rBitmapEx,
1480  ::Color aShadowColor);
1481 protected:
1482 
1483  virtual void DrawDeviceBitmap(
1484  const Point& rDestPt, const Size& rDestSize,
1485  const Point& rSrcPtPixel, const Size& rSrcSizePixel,
1486  BitmapEx& rBitmapEx );
1487 
1488  virtual void ScaleBitmap ( Bitmap &rBmp, SalTwoRect &rPosAry );
1489 
1497  virtual bool DrawTransformBitmapExDirect(
1498  const basegfx::B2DHomMatrix& aFullTransform,
1499  const BitmapEx& rBitmapEx);
1500 
1513  const basegfx::B2DHomMatrix& aFullTransform,
1514  basegfx::B2DRange &aVisibleRange,
1515  double &fMaximumArea);
1516 
1517 private:
1518 
1519  SAL_DLLPRIVATE void DrawDeviceAlphaBitmap(
1520  const Bitmap& rBmp,
1521  const AlphaMask& rAlpha,
1522  const Point& rDestPt,
1523  const Size& rDestSize,
1524  const Point& rSrcPtPixel,
1525  const Size& rSrcSizePixel );
1526 
1527  SAL_DLLPRIVATE void DrawDeviceAlphaBitmapSlowPath(
1528  const Bitmap& rBitmap, const AlphaMask& rAlpha,
1529  tools::Rectangle aDstRect, tools::Rectangle aBmpRect,
1530  Size const & aOutSz, Point const & aOutPt);
1531 
1532 
1533  SAL_DLLPRIVATE void BlendBitmap(
1534  const SalTwoRect& rPosAry,
1535  const Bitmap& rBmp );
1536 
1537  SAL_DLLPRIVATE Bitmap BlendBitmap(
1538  Bitmap& aBmp,
1539  BitmapReadAccess const * pP,
1540  BitmapReadAccess const * pA,
1541  const sal_Int32 nOffY,
1542  const sal_Int32 nDstHeight,
1543  const sal_Int32 nOffX,
1544  const sal_Int32 nDstWidth,
1545  const tools::Rectangle& aBmpRect,
1546  const Size& aOutSz,
1547  const bool bHMirr,
1548  const bool bVMirr,
1549  const long* pMapX,
1550  const long* pMapY );
1551 
1552  SAL_DLLPRIVATE Bitmap BlendBitmapWithAlpha(
1553  Bitmap& aBmp,
1554  BitmapReadAccess const * pP,
1555  BitmapReadAccess const * pA,
1556  const tools::Rectangle& aDstRect,
1557  const sal_Int32 nOffY,
1558  const sal_Int32 nDstHeight,
1559  const sal_Int32 nOffX,
1560  const sal_Int32 nDstWidth,
1561  const long* pMapX,
1562  const long* pMapY );
1563 
1569  SAL_DLLPRIVATE Bitmap GetDownsampledBitmap(
1570  const Size& rDstSz,
1571  const Point& rSrcPt,
1572  const Size& rSrcSz,
1573  const Bitmap& rBmp,
1574  long nMaxBmpDPIX,
1575  long nMaxBmpDPIY );
1576 
1578 
1579 
1582 
1584 public:
1585 
1597  const GDIMetaFile& rInMtf, GDIMetaFile& rOutMtf,
1598  long nMaxBmpDPIX, long nMaxBmpDPIY,
1599  bool bReduceTransparency,
1600  bool bTransparencyAutoMode,
1601  bool bDownsampleBitmaps,
1602  const Color& rBackground = COL_TRANSPARENT );
1603 
1604  SAL_DLLPRIVATE void ImplPrintTransparent (
1605  const Bitmap& rBmp, const Bitmap& rMask,
1606  const Point& rDestPt, const Size& rDestSize,
1607  const Point& rSrcPtPixel, const Size& rSrcSizePixel );
1608 
1609  SAL_DLLPRIVATE Color ImplDrawModeToColor ( const Color& rColor ) const;
1610 
1611 
1612  void DrawTransparent( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent );
1613 
1614  void DrawTransparent(
1615  const basegfx::B2DHomMatrix& rObjectTransform,
1616  const basegfx::B2DPolyPolygon& rB2DPolyPoly,
1617  double fTransparency);
1618 
1619  void DrawTransparent(
1620  const GDIMetaFile& rMtf, const Point& rPos, const Size& rSize,
1621  const Gradient& rTransparenceGradient );
1622 
1623 protected:
1624 
1625  virtual void EmulateDrawTransparent( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent );
1626  void DrawInvisiblePolygon( const tools::PolyPolygon& rPolyPoly );
1627 
1628  virtual void ClipAndDrawGradientMetafile ( const Gradient &rGradient, const tools::PolyPolygon &rPolyPoly );
1629 
1630 private:
1631 
1632  SAL_DLLPRIVATE bool DrawTransparentNatively( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent );
1634 
1635 
1638 
1640 public:
1641 
1642  void DrawMask( const Point& rDestPt,
1643  const Bitmap& rBitmap, const Color& rMaskColor );
1644 
1645  void DrawMask( const Point& rDestPt, const Size& rDestSize,
1646  const Bitmap& rBitmap, const Color& rMaskColor );
1647 
1648  void DrawMask( const Point& rDestPt, const Size& rDestSize,
1649  const Point& rSrcPtPixel, const Size& rSrcSizePixel,
1650  const Bitmap& rBitmap, const Color& rMaskColor,
1651  MetaActionType nAction );
1652 
1653 protected:
1654 
1655  virtual void DrawDeviceMask (
1656  const Bitmap& rMask, const Color& rMaskColor,
1657  const Point& rDestPt, const Size& rDestSize,
1658  const Point& rSrcPtPixel, const Size& rSrcSizePixel );
1660 
1661 
1664 
1666 public:
1667 
1668  void EnableMapMode( bool bEnable = true );
1669  bool IsMapModeEnabled() const { return mbMap; }
1670 
1671  void SetMapMode();
1672  virtual void SetMapMode( const MapMode& rNewMapMode );
1673  void SetRelativeMapMode( const MapMode& rNewMapMode );
1674  const MapMode& GetMapMode() const { return maMapMode; }
1675 
1676  // #i75163#
1679 
1680  basegfx::B2DHomMatrix GetViewTransformation( const MapMode& rMapMode ) const;
1682 
1683 
1706  void SetPixelOffset( const Size& rOffset );
1707 
1714  Size GetPixelOffset() const { return Size(mnOutOffOrigX, mnOutOffOrigY);}
1715 
1716  Point LogicToPixel( const Point& rLogicPt ) const;
1717  Size LogicToPixel( const Size& rLogicSize ) const;
1718  tools::Rectangle LogicToPixel( const tools::Rectangle& rLogicRect ) const;
1719  tools::Polygon LogicToPixel( const tools::Polygon& rLogicPoly ) const;
1720  tools::PolyPolygon LogicToPixel( const tools::PolyPolygon& rLogicPolyPoly ) const;
1721  basegfx::B2DPolyPolygon LogicToPixel( const basegfx::B2DPolyPolygon& rLogicPolyPoly ) const;
1722  vcl::Region LogicToPixel( const vcl::Region& rLogicRegion )const;
1723  Point LogicToPixel( const Point& rLogicPt,
1724  const MapMode& rMapMode ) const;
1725  Size LogicToPixel( const Size& rLogicSize,
1726  const MapMode& rMapMode ) const;
1727  tools::Rectangle LogicToPixel( const tools::Rectangle& rLogicRect,
1728  const MapMode& rMapMode ) const;
1729  tools::Polygon LogicToPixel( const tools::Polygon& rLogicPoly,
1730  const MapMode& rMapMode ) const;
1732  const MapMode& rMapMode ) const;
1733 
1734  Point PixelToLogic( const Point& rDevicePt ) const;
1735  Size PixelToLogic( const Size& rDeviceSize ) const;
1736  tools::Rectangle PixelToLogic( const tools::Rectangle& rDeviceRect ) const;
1737  tools::Polygon PixelToLogic( const tools::Polygon& rDevicePoly ) const;
1738  tools::PolyPolygon PixelToLogic( const tools::PolyPolygon& rDevicePolyPoly ) const;
1739  basegfx::B2DPolyPolygon PixelToLogic( const basegfx::B2DPolyPolygon& rDevicePolyPoly ) const;
1740  vcl::Region PixelToLogic( const vcl::Region& rDeviceRegion ) const;
1741  Point PixelToLogic( const Point& rDevicePt,
1742  const MapMode& rMapMode ) const;
1743  Size PixelToLogic( const Size& rDeviceSize,
1744  const MapMode& rMapMode ) const;
1745  tools::Rectangle PixelToLogic( const tools::Rectangle& rDeviceRect,
1746  const MapMode& rMapMode ) const;
1747  tools::Polygon PixelToLogic( const tools::Polygon& rDevicePoly,
1748  const MapMode& rMapMode ) const;
1750  const MapMode& rMapMode ) const;
1752  const MapMode& rMapMode ) const;
1753 
1754  Point LogicToLogic( const Point& rPtSource,
1755  const MapMode* pMapModeSource,
1756  const MapMode* pMapModeDest ) const;
1757  Size LogicToLogic( const Size& rSzSource,
1758  const MapMode* pMapModeSource,
1759  const MapMode* pMapModeDest ) const;
1760  tools::Rectangle LogicToLogic( const tools::Rectangle& rRectSource,
1761  const MapMode* pMapModeSource,
1762  const MapMode* pMapModeDest ) const;
1763  static Point LogicToLogic( const Point& rPtSource,
1764  const MapMode& rMapModeSource,
1765  const MapMode& rMapModeDest );
1766  static Size LogicToLogic( const Size& rSzSource,
1767  const MapMode& rMapModeSource,
1768  const MapMode& rMapModeDest );
1769  static tools::Rectangle LogicToLogic( const tools::Rectangle& rRectSource,
1770  const MapMode& rMapModeSource,
1771  const MapMode& rMapModeDest );
1772  static long LogicToLogic( long nLongSource,
1773  MapUnit eUnitSource,
1774  MapUnit eUnitDest );
1775 
1777  const MapMode& rMapModeSource,
1778  const MapMode& rMapModeDest );
1779 
1780  // create a mapping transformation from rMapModeSource to rMapModeDest (the above methods
1781  // for B2DPoly/Polygons use this internally anyway to transform the B2DPolygon)
1782  static basegfx::B2DHomMatrix LogicToLogic(const MapMode& rMapModeSource, const MapMode& rMapModeDest);
1783 
1790  SAL_DLLPRIVATE tools::Rectangle ImplLogicToDevicePixel( const tools::Rectangle& rLogicRect ) const;
1791 
1798  SAL_DLLPRIVATE Point ImplLogicToDevicePixel( const Point& rLogicPt ) const;
1799 
1810  SAL_DLLPRIVATE long ImplLogicWidthToDevicePixel( long nWidth ) const;
1811 
1812  SAL_DLLPRIVATE DeviceCoordinate LogicWidthToDeviceCoordinate( long nWidth ) const;
1813 
1825  SAL_DLLPRIVATE long ImplLogicXToDevicePixel( long nX ) const;
1826 
1838  SAL_DLLPRIVATE long ImplLogicYToDevicePixel( long nY ) const;
1839 
1850  SAL_DLLPRIVATE long ImplLogicHeightToDevicePixel( long nHeight ) const;
1851 
1861  SAL_DLLPRIVATE long ImplDevicePixelToLogicWidth( long nWidth ) const;
1862 
1872  SAL_DLLPRIVATE long ImplDevicePixelToLogicHeight( long nHeight ) const;
1873 
1883  SAL_DLLPRIVATE float ImplFloatLogicHeightToDevicePixel( float fLogicHeight ) const;
1884 
1891  SAL_DLLPRIVATE Size ImplLogicToDevicePixel( const Size& rLogicSize ) const;
1892 
1899  SAL_DLLPRIVATE tools::Rectangle ImplDevicePixelToLogic( const tools::Rectangle& rPixelRect ) const;
1900 
1907  SAL_DLLPRIVATE tools::Polygon ImplLogicToDevicePixel( const tools::Polygon& rLogicPoly ) const;
1908 
1915  SAL_DLLPRIVATE tools::PolyPolygon ImplLogicToDevicePixel( const tools::PolyPolygon& rLogicPolyPoly ) const;
1916 
1923  SAL_DLLPRIVATE LineInfo ImplLogicToDevicePixel( const LineInfo& rLineInfo ) const;
1924 
1931  SAL_DLLPRIVATE vcl::Region ImplPixelToDevicePixel( const vcl::Region& rRegion ) const;
1932 
1937  SAL_DLLPRIVATE void ImplInvalidateViewTransform();
1938 
1943  SAL_DLLPRIVATE basegfx::B2DHomMatrix ImplGetDeviceTransformation() const;
1945 
1946 
1951 
1953 public:
1954 
1957  bool IsNativeControlSupported( ControlType nType, ControlPart nPart ) const;
1958 
1962  ControlPart nPart,
1963  const tools::Rectangle& rControlRegion,
1964  const Point& aPos,
1965  bool& rIsInside ) const;
1966 
1969  bool DrawNativeControl(
1970  ControlType nType,
1971  ControlPart nPart,
1972  const tools::Rectangle& rControlRegion,
1973  ControlState nState,
1974  const ImplControlValue& aValue,
1975  const OUString& aCaption );
1976 
1980  ControlType nType,
1981  ControlPart nPart,
1982  const tools::Rectangle& rControlRegion,
1983  ControlState nState,
1984  const ImplControlValue& aValue,
1985  tools::Rectangle &rNativeBoundingRegion,
1986  tools::Rectangle &rNativeContentRegion ) const;
1988 
1991 
1993 public:
1994 
2000  bool DrawEPS(
2001  const Point& rPt, const Size& rSz,
2002  const GfxLink& rGfxLink, GDIMetaFile* pSubst = nullptr );
2004 };
2005 
2006 #endif // INCLUDED_VCL_OUTDEV_HXX
2007 
2008 /* 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:1110
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:1910
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:3800
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:1674
long mnEmphasisAscent
Definition: outdev.hxx:353
virtual void CopyDeviceArea(SalTwoRect &aPosAry, bool bWindowInvalidate) override
Definition: window.cxx:1221
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:1119
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:2050
static SAL_DLLPRIVATE void ImplUpdateFontDataForAllFrames(FontUpdateHandler_t pHdl, bool bNewFontLists)
bool IsBackground() const
Definition: outdev.hxx:634
#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:1128
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:1669
bool IsTextLineColor() const
Definition: outdev.hxx:1120
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:1674
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:582
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:2306
FontAlign GetAlignment() const
Definition: font/font.cxx:668
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:42
const Color & GetOverlineColor() const
Definition: outdev.hxx:1124
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:1093
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:637
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:2478
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:1115
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:1354
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:663
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:359
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:83
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:2261
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:1302
std::vector< tools::PolyPolygon > PolyPolyVector
VCL_DLLPUBLIC void DrawFocusRect(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect)
Definition: window2.cxx:1979
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:2457
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:2193
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
virtual Color GetReadableFontColor(const Color &rFontColor, const Color &rBgColor) const
Definition: wallpaper.cxx:27
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:666
void SetRasterOp(RasterOp eRasterOp)
Definition: image.hxx:40
void DrawGrid(const tools::Rectangle &rRect, const Size &rDist, DrawGridFlags nFlags)
Definition: rect.cxx:216
SAL_DLLPRIVATE long GetEmphasisDescent() const
Definition: outdev.hxx:1287
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:122
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:321
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:1714
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:950
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:815
bool IsOverlineColor() const
Definition: outdev.hxx:1125
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:2210
long mnOutHeight
Definition: outdev.hxx:346
FontLineStyle
SAL_DLLPRIVATE DeviceCoordinate LogicWidthToDeviceCoordinate(long nWidth) const
Definition: map.cxx:1927
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:1286
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:879
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