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 #include <com/sun/star/awt/DeviceInfo.hpp>
52 
53 #include <memory>
54 #include <vector>
55 
56 struct ImplOutDevData;
58 struct SystemGraphicsData;
59 class ImplFontCache;
61 class ImplDeviceFontList;
64 class SalGraphics;
65 class Gradient;
66 class Hatch;
67 class AllSettings;
68 class BitmapReadAccess;
69 class BitmapEx;
70 class Image;
71 class TextRectInfo;
72 class FontMetric;
73 class GDIMetaFile;
74 class GfxLink;
75 namespace tools {
76  class Line;
77 }
78 class LineInfo;
79 class AlphaMask;
80 class FontCharMap;
81 class SalLayout;
82 class ImplLayoutArgs;
83 class VirtualDevice;
84 struct SalTwoRect;
85 class Printer;
86 class VCLXGraphics;
87 class OutDevStateStack;
88 class SalLayoutGlyphs;
89 
90 namespace vcl
91 {
92  class ExtOutDevData;
93  class ITextLayout;
94  struct FontCapabilities;
95  class TextLayoutCache;
96  class Window;
97  namespace font {
98  struct Feature;
99  }
100 }
101 
102 namespace basegfx {
103  class B2DHomMatrix;
104  class B2DPolygon;
105  class B2IVector;
106  typedef B2IVector B2ISize;
107 }
108 
109 namespace com::sun::star::awt {
110  class XGraphics;
111 }
112 
113 #if defined UNX
114 #define GLYPH_FONT_HEIGHT 128
115 #else
116 #define GLYPH_FONT_HEIGHT 256
117 #endif
118 
119 // Text Layout options
120 enum class SalLayoutFlags
121 {
122  NONE = 0x0000,
123  BiDiRtl = 0x0001,
124  BiDiStrong = 0x0002,
125  RightAlign = 0x0004,
126  DisableKerning = 0x0010,
127  KerningAsian = 0x0020,
128  Vertical = 0x0040,
129  KashidaJustification = 0x0800,
130  ForFallback = 0x2000,
131  GlyphItemsOnly = 0x4000,
132 };
133 namespace o3tl
134 {
135  template<> struct typed_flags<SalLayoutFlags> : is_typed_flags<SalLayoutFlags, 0x6877> {};
136 }
137 
138 typedef std::vector< tools::Rectangle > MetricVector;
139 
140 // OutputDevice-Types
141 
142 // Flags for DrawText()
143 enum class DrawTextFlags
144 {
145  NONE = 0x00000000,
146  Disable = 0x00000001,
147  Mnemonic = 0x00000002,
148  Mono = 0x00000004,
149  Clip = 0x00000008,
150  Left = 0x00000010,
151  Center = 0x00000020,
152  Right = 0x00000040,
153  Top = 0x00000080,
154  VCenter = 0x00000100,
155  Bottom = 0x00000200,
156  EndEllipsis = 0x00000400,
157  PathEllipsis = 0x00000800,
158  MultiLine = 0x00001000,
159  WordBreak = 0x00002000,
160  NewsEllipsis = 0x00004000,
161  WordBreakHyphenation = 0x00008000 | WordBreak,
162  CenterEllipsis = 0x00010000,
163  HideMnemonic = 0x00020000,
164 };
165 namespace o3tl
166 {
167  template<> struct typed_flags<DrawTextFlags> : is_typed_flags<DrawTextFlags, 0x3ffff> {};
168 }
169 
170 // Flags for DrawImage(), these must match the definitions in css::awt::ImageDrawMode
171 enum class DrawImageFlags
172 {
173  NONE = 0x0000,
174  Disable = 0x0001,
175  Highlight = 0x0002,
176  Deactive = 0x0004,
177  ColorTransform = 0x0008,
178  SemiTransparent = 0x0010,
179 };
180 namespace o3tl
181 {
182  template<> struct typed_flags<DrawImageFlags> : is_typed_flags<DrawImageFlags, 0x001f> {};
183 }
184 
185 // Flags for DrawGrid()
186 enum class DrawGridFlags
187 {
188  NONE = 0x0000,
189  Dots = 0x0001,
190  HorzLines = 0x0002,
191  VertLines = 0x0004
192 };
193 namespace o3tl
194 {
195  template<> struct typed_flags<DrawGridFlags> : is_typed_flags<DrawGridFlags, 0x0007> {};
196 }
197 
198 // DrawModes
199 enum class DrawModeFlags : sal_uInt32
200 {
201  Default = 0x00000000,
202  BlackLine = 0x00000001,
203  BlackFill = 0x00000002,
204  BlackText = 0x00000004,
205  BlackBitmap = 0x00000008,
206  BlackGradient = 0x00000010,
207  GrayLine = 0x00000020,
208  GrayFill = 0x00000040,
209  GrayText = 0x00000080,
210  GrayBitmap = 0x00000100,
211  GrayGradient = 0x00000200,
212  NoFill = 0x00000400,
213  WhiteLine = 0x00000800,
214  WhiteFill = 0x00001000,
215  WhiteText = 0x00002000,
216  WhiteBitmap = 0x00004000,
217  WhiteGradient = 0x00008000,
218  SettingsLine = 0x00010000,
219  SettingsFill = 0x00020000,
220  SettingsText = 0x00040000,
221  SettingsGradient = 0x00080000,
222  NoTransparency = 0x00100000,
223 };
224 namespace o3tl
225 {
226  template<> struct typed_flags<DrawModeFlags> : is_typed_flags<DrawModeFlags, 0x1fffff> {};
227 }
228 
229 // Antialiasing
231 {
232  NONE = 0x0000,
233  DisableText = 0x0001,
234  Enable = 0x0002,
235  PixelSnapHairline = 0x0004,
236 };
237 namespace o3tl
238 {
239  template<> struct typed_flags<AntialiasingFlags> : is_typed_flags<AntialiasingFlags, 0x07> {};
240 }
241 
242 // AddFontSubstitute() flags
244 {
245  NONE = 0x00,
246  ALWAYS = 0x01,
247  ScreenOnly = 0x02,
248 };
249 namespace o3tl
250 {
251  template<> struct typed_flags<AddFontSubstituteFlags> : is_typed_flags<AddFontSubstituteFlags, 0x03> {};
252 }
253 
254 // GetDefaultFont() flags
256 {
257  NONE = 0x0000,
258  OnlyOne = 0x0001,
259 };
260 namespace o3tl
261 {
262  template<> struct typed_flags<GetDefaultFontFlags> : is_typed_flags<GetDefaultFontFlags, 0x01> {};
263 }
264 
265 // Flags for Invert()
266 enum class InvertFlags
267 {
268  NONE = 0x0000,
269  N50 = 0x0001,
270  TrackFrame = 0x0002
271 };
272 namespace o3tl
273 {
274  template<> struct typed_flags<InvertFlags> : is_typed_flags<InvertFlags, 0x0003> {};
275 }
276 
278 
280 
281 // OutputDevice
282 
284 
285 BmpMirrorFlags AdjustTwoRect( SalTwoRect& rTwoRect, const Size& rSizePix );
286 void AdjustTwoRect( SalTwoRect& rTwoRect, const tools::Rectangle& rValidSrcRect );
287 
288 class OutputDevice;
289 
290 namespace vcl {
292 }
293 
294 VCL_DLLPUBLIC void DrawFocusRect(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect);
295 
296 typedef struct _cairo_surface cairo_surface_t;
297 
304 {
305  friend class Printer;
306  friend class VirtualDevice;
307  friend class vcl::Window;
308  friend class WorkWindow;
309  friend void ImplHandleResize( vcl::Window* pWindow, tools::Long nNewWidth, tools::Long nNewHeight );
310 
311 private:
312  OutputDevice(const OutputDevice&) = delete;
313  OutputDevice& operator=(const OutputDevice&) = delete;
314 
320  mutable std::shared_ptr<ImplFontCache> mxFontCache;
321  mutable std::shared_ptr<PhysicalFontCollection> mxFontCollection;
322  mutable std::unique_ptr<ImplDeviceFontList> mpDeviceFontList;
323  mutable std::unique_ptr<ImplDeviceFontSizeList> mpDeviceFontSizeList;
324  std::vector<OutDevState> maOutDevStateStack;
325  std::unique_ptr<ImplOutDevData> mpOutDevData;
326  std::vector< VCLXGraphics* >* mpUnoGraphicsList;
328 
329  // TEMP TEMP TEMP
331 
346  sal_Int32 mnDPIX;
347  sal_Int32 mnDPIY;
349  mutable tools::Long mnTextOffX;
359  vcl::Region maRegion; // contains the clip region, see SetClipRegion(...)
368  std::unique_ptr<AllSettings> mxSettings;
373 
374  mutable bool mbMap : 1;
375  mutable bool mbClipRegion : 1;
376  mutable bool mbBackground : 1;
377  mutable bool mbOutput : 1;
378  mutable bool mbDevOutput : 1;
379  mutable bool mbOutputClipped : 1;
380  mutable bool mbLineColor : 1;
381  mutable bool mbFillColor : 1;
382  mutable bool mbInitLineColor : 1;
383  mutable bool mbInitFillColor : 1;
384  mutable bool mbInitFont : 1;
385  mutable bool mbInitTextColor : 1;
386  mutable bool mbInitClipRegion : 1;
387  mutable bool mbClipRegionSet : 1;
388  mutable bool mbNewFont : 1;
389  mutable bool mbTextLines : 1;
390  mutable bool mbTextSpecial : 1;
391  mutable bool mbRefPoint : 1;
392  mutable bool mbEnableRTL : 1;
393 
396 
398 protected:
399  OutputDevice(OutDevType eOutDevType);
400  virtual ~OutputDevice() override;
401  virtual void dispose() override;
402 
403 public:
404 
411  SalGraphics const *GetGraphics() const;
413 
414  void SetConnectMetaFile( GDIMetaFile* pMtf );
416 
417  virtual void SetSettings( const AllSettings& rSettings );
418  const AllSettings& GetSettings() const { return *mxSettings; }
419 
421  bool SupportsCairo() const;
425  cairo::SurfaceSharedPtr CreateSurface(int x, int y, int width, int height) const;
427  cairo::SurfaceSharedPtr CreateBitmapSurface(const BitmapSystemData& rData, const Size& rSize) const;
429  css::uno::Any GetNativeSurfaceHandle(cairo::SurfaceSharedPtr& rSurface, const basegfx::B2ISize& rSize) const;
430  css::uno::Any GetSystemGfxDataAny() const;
431 
432  void SetRefPoint();
433  void SetRefPoint( const Point& rRefPoint );
434  const Point& GetRefPoint() const { return maRefPoint; }
435  bool IsRefPoint() const { return mbRefPoint; }
436 
437  virtual bool IsScreenComp() const { return true; }
438 
439  virtual sal_uInt16 GetBitCount() const;
440 
442  { return Size( mnOutWidth, mnOutHeight ); }
447  void SetOutOffXPixel(tools::Long nOutOffX);
448  void SetOutOffYPixel(tools::Long nOutOffY);
450  { return Point( mnOutOffX, mnOutOffY ); }
453 
455  { return PixelToLogic( GetOutputSizePixel() ); }
456 
457  css::uno::Reference< css::awt::XGraphics >
459  std::vector< VCLXGraphics* > *GetUnoGraphicsList() const { return mpUnoGraphicsList; }
460  std::vector< VCLXGraphics* > *CreateUnoGraphicsList();
461 
462  virtual size_t GetSyncCount() const { return 0xffffffff; }
463 
464 protected:
465 
485  virtual bool AcquireGraphics() const = 0;
486 
493  virtual void ReleaseGraphics( bool bRelease = true ) = 0;
495 
496 
499 
501 public:
502 
507  SAL_DLLPRIVATE sal_Int32 GetDPIX() const { return mnDPIX; }
508 
513  SAL_DLLPRIVATE sal_Int32 GetDPIY() const { return mnDPIY; }
514 
515  SAL_DLLPRIVATE void SetDPIX( sal_Int32 nDPIX ) { mnDPIX = nDPIX; }
516  SAL_DLLPRIVATE void SetDPIY( sal_Int32 nDPIY ) { mnDPIY = nDPIY; }
517 
518  float GetDPIScaleFactor() const
519  {
520  return mnDPIScalePercentage / 100.0f;
521  }
522 
523  sal_Int32 GetDPIScalePercentage() const
524  {
525  return mnDPIScalePercentage;
526  }
527 
529  virtual bool IsVirtual() const;
530 
535  bool SupportsOperation( OutDevSupportType ) const;
536 
537  void SetExtOutDevData( vcl::ExtOutDevData* pExtOutDevData ) { mpExtOutDevData = pExtOutDevData; }
539 
541 
542 public:
543  virtual Size GetButtonBorderSize() { return Size(1, 1); };
545 
548 
550 public:
551  virtual void Flush() {}
552 
553  virtual void DrawOutDev(
554  const Point& rDestPt, const Size& rDestSize,
555  const Point& rSrcPt, const Size& rSrcSize );
556 
557  virtual void DrawOutDev(
558  const Point& rDestPt, const Size& rDestSize,
559  const Point& rSrcPt, const Size& rSrcSize,
560  const OutputDevice& rOutDev );
561 
562  virtual void CopyArea(
563  const Point& rDestPt,
564  const Point& rSrcPt, const Size& rSrcSize,
565  bool bWindowInvalidate = false );
566 
567 protected:
568 
569  virtual void CopyDeviceArea( SalTwoRect& aPosAry, bool bWindowInvalidate);
570 
572 
573  virtual const OutputDevice* DrawOutDevDirectCheck(const OutputDevice& rSrcDev) const;
574 
575  virtual void DrawOutDevDirectProcess(const OutputDevice& rSrcDev, SalTwoRect& rPosAry, SalGraphics* pSrcGraphics);
576 
577  SAL_DLLPRIVATE void drawOutDevDirect(const OutputDevice& rSrcDev, SalTwoRect& rPosAry);
578 
579  SAL_DLLPRIVATE bool is_double_buffered_window() const;
580 
581 private:
582 
583  // not implemented; to detect misuses of DrawOutDev(...OutputDevice&);
584  SAL_DLLPRIVATE void DrawOutDev( const Point&, const Size&, const Point&, const Size&, const Printer&) = delete;
586 
587 
590 
592 public:
593 
594  void Push( PushFlags nFlags = PushFlags::ALL );
595  void Pop();
596 
597  // returns the current stack depth; that is the number of Push() calls minus the number of Pop() calls
598  // this should not normally be used since Push and Pop must always be used symmetrically
599  // however this may be e.g. a help when debugging code in which this somehow is not the case
600  sal_uInt32 GetGCStackDepth() const;
601  void ClearStack();
602 
603  void EnableOutput( bool bEnable = true );
604  bool IsOutputEnabled() const { return mbOutput; }
605  bool IsDeviceOutputNecessary() const { return (mbOutput && mbDevOutput); }
606 
607  void SetAntialiasing( AntialiasingFlags nMode );
609 
610  void SetDrawMode( DrawModeFlags nDrawMode );
612 
613  void SetLayoutMode( ComplexTextLayoutFlags nTextLayoutMode );
615 
618 
619  void SetRasterOp( RasterOp eRasterOp );
620  RasterOp GetRasterOp() const { return meRasterOp; }
621 
629  void SetOutDevViewType( OutDevViewType eOutDevViewType ) { meOutDevViewType=eOutDevViewType; }
631 
632  void SetLineColor();
633  void SetLineColor( const Color& rColor );
634  const Color& GetLineColor() const { return maLineColor; }
635  bool IsLineColor() const { return mbLineColor; }
636 
637  void SetFillColor();
638  void SetFillColor( const Color& rColor );
639  const Color& GetFillColor() const { return maFillColor; }
640  bool IsFillColor() const { return mbFillColor; }
641 
642  void SetBackground();
643  void SetBackground( const Wallpaper& rBackground );
644  virtual void SaveBackground(VirtualDevice& rSaveDevice,
645  const Point& rPos, const Size& rSize, const Size& rBackgroundSize) const;
646 
647  const Wallpaper& GetBackground() const { return maBackground; }
648  virtual Color GetBackgroundColor() const;
649  virtual Color GetReadableFontColor(const Color& rFontColor, const Color& rBgColor) const;
650  bool IsBackground() const { return mbBackground; }
651 
652  void SetFont( const vcl::Font& rNewFont );
653  const vcl::Font& GetFont() const { return maFont; }
654 
655 protected:
656 
657  virtual void ImplReleaseFonts();
658 
659 private:
660 
661  SAL_DLLPRIVATE void InitLineColor();
662 
663  SAL_DLLPRIVATE void InitFillColor();
664 
666 
667 
670 
672 public:
673 
674  vcl::Region GetClipRegion() const;
675  void SetClipRegion();
676  void SetClipRegion( const vcl::Region& rRegion );
677  bool SelectClipRegion( const vcl::Region&, SalGraphics* pGraphics = nullptr );
678 
679  bool IsClipRegion() const { return mbClipRegion; }
680 
681  void MoveClipRegion( tools::Long nHorzMove, tools::Long nVertMove );
682  void IntersectClipRegion( const tools::Rectangle& rRect );
683  void IntersectClipRegion( const vcl::Region& rRegion );
684 
685  virtual vcl::Region GetActiveClipRegion() const;
686  virtual vcl::Region GetOutputBoundsClipRegion() const;
687 
688 protected:
689 
690  virtual void InitClipRegion();
691 
698  virtual vcl::Region ClipToDeviceBounds(vcl::Region aRegion) const;
699  virtual void ClipToPaintRegion ( tools::Rectangle& rDstRect );
700 
701 private:
702 
703  SAL_DLLPRIVATE void SetDeviceClipRegion( const vcl::Region* pRegion );
705 
706 public:
707  virtual void DrawBorder(tools::Rectangle aBorderRect);
708 
709 
712 
714 public:
715 
716  void DrawPixel( const Point& rPt );
717  void DrawPixel( const Point& rPt, const Color& rColor );
718 
719  Color GetPixel( const Point& rPt ) const;
721 
722 
725 
727 public:
728 
729  void DrawRect( const tools::Rectangle& rRect );
730  void DrawRect( const tools::Rectangle& rRect,
731  sal_uLong nHorzRount, sal_uLong nVertRound );
732 
734  void DrawCheckered(
735  const Point& rPos,
736  const Size& rSize,
737  sal_uInt32 nLen = 8,
738  Color aStart = COL_WHITE,
739  Color aEnd = COL_BLACK);
740 
741  void DrawGrid( const tools::Rectangle& rRect, const Size& rDist, DrawGridFlags nFlags );
742 
744 
747 public:
749  void Invert( const tools::Rectangle& rRect, InvertFlags nFlags = InvertFlags::NONE );
750  void Invert( const tools::Polygon& rPoly, InvertFlags nFlags = InvertFlags::NONE );
752 
755 
757 public:
758 
759  void DrawLine( const Point& rStartPt, const Point& rEndPt );
760 
761  void DrawLine( const Point& rStartPt, const Point& rEndPt,
762  const LineInfo& rLineInfo );
763 
764 protected:
765  virtual void DrawHatchLine_DrawLine(const Point& rStartPoint, const Point& rEndPoint);
766 
767 private:
768 
771  SAL_DLLPRIVATE void drawLine( basegfx::B2DPolyPolygon aLinePolyPolygon, const LineInfo& rInfo );
773 
774 
777 
779 public:
780 
789  void DrawPolyLine( const tools::Polygon& rPoly );
790 
791  void DrawPolyLine(
792  const basegfx::B2DPolygon&,
793  double fLineWidth = 0.0,
795  css::drawing::LineCap eLineCap = css::drawing::LineCap_BUTT,
796  double fMiterMinimumAngle = basegfx::deg2rad(15.0));
797 
808  void DrawPolyLine( const tools::Polygon& rPoly,
809  const LineInfo& rLineInfo );
810 
811  // #i101491#
812  // Helper who tries to use SalGDI's DrawPolyLine direct and returns it's bool.
813  bool DrawPolyLineDirect(
814  const basegfx::B2DHomMatrix& rObjectTransform,
815  const basegfx::B2DPolygon& rB2DPolygon,
816  double fLineWidth = 0.0,
817  double fTransparency = 0.0,
818  const std::vector< double >* = nullptr, // MM01
820  css::drawing::LineCap eLineCap = css::drawing::LineCap_BUTT,
821  double fMiterMinimumAngle = basegfx::deg2rad(15.0));
822 
823 private:
824 
825  // #i101491#
826  // Helper which holds the old line geometry creation and is extended to use AA when
827  // switched on. Advantage is that line geometry is only temporarily used for paint
828  SAL_DLLPRIVATE void drawPolyLine(const tools::Polygon& rPoly, const LineInfo& rLineInfo);
829 
831 
833  const basegfx::B2DHomMatrix& rObjectTransform,
834  const basegfx::B2DPolygon& rB2DPolygon,
835  double fLineWidth = 0.0,
836  double fTransparency = 0.0,
837  const std::vector< double >* = nullptr, // MM01
839  css::drawing::LineCap eLineCap = css::drawing::LineCap_BUTT,
840  double fMiterMinimumAngle = basegfx::deg2rad(15.0));
841 
844 
846 public:
847 
858  void DrawPolygon( const tools::Polygon& rPoly );
859  void DrawPolygon( const basegfx::B2DPolygon& );
860 
871  void DrawPolyPolygon( const tools::PolyPolygon& rPolyPoly );
873 
874 private:
875 
876  SAL_DLLPRIVATE void ImplDrawPolygon( const tools::Polygon& rPoly, const tools::PolyPolygon* pClipPolyPoly = nullptr );
877  SAL_DLLPRIVATE void ImplDrawPolyPolygon( const tools::PolyPolygon& rPolyPoly, const tools::PolyPolygon* pClipPolyPoly );
878  SAL_DLLPRIVATE void ImplDrawPolyPolygon( sal_uInt16 nPoly, const tools::PolyPolygon& rPolyPoly );
879  // #i101491#
880  // Helper who implements the DrawPolyPolygon functionality for basegfx::B2DPolyPolygon
881  // without MetaFile processing
882  SAL_DLLPRIVATE void ImplDrawPolyPolygonWithB2DPolyPolygon(const basegfx::B2DPolyPolygon& rB2DPolyPoly);
884 
885 
888 
890 public:
891 
892  void DrawEllipse( const tools::Rectangle& rRect );
893 
894  void DrawArc(
895  const tools::Rectangle& rRect,
896  const Point& rStartPt, const Point& rEndPt );
897 
898  void DrawPie(
899  const tools::Rectangle& rRect,
900  const Point& rStartPt, const Point& rEndPt );
901 
902  void DrawChord(
903  const tools::Rectangle& rRect,
904  const Point& rStartPt, const Point& rEndPt );
905 
907 
908 
911 
913 public:
914  void DrawGradient( const tools::Rectangle& rRect, const Gradient& rGradient );
915  void DrawGradient( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient );
916 
917  void AddGradientActions(
918  const tools::Rectangle& rRect,
919  const Gradient& rGradient,
920  GDIMetaFile& rMtf );
921 
922 protected:
923 
924  virtual bool UsePolyPolygonForComplexGradient() = 0;
925 
926  virtual tools::Long GetGradientStepCount( tools::Long nMinRect );
927 
928 private:
929 
930  SAL_DLLPRIVATE void DrawLinearGradient( const tools::Rectangle& rRect, const Gradient& rGradient, const tools::PolyPolygon* pClipPolyPoly );
931  SAL_DLLPRIVATE void DrawComplexGradient( const tools::Rectangle& rRect, const Gradient& rGradient, const tools::PolyPolygon* pClipPolyPoly );
932 
933  SAL_DLLPRIVATE void DrawGradientToMetafile( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient );
934  SAL_DLLPRIVATE void DrawLinearGradientToMetafile( const tools::Rectangle& rRect, const Gradient& rGradient );
935  SAL_DLLPRIVATE void DrawComplexGradientToMetafile( const tools::Rectangle& rRect, const Gradient& rGradient );
936 
937  SAL_DLLPRIVATE tools::Long GetGradientSteps( const Gradient& rGradient, const tools::Rectangle& rRect, bool bMtf, bool bComplex=false );
938 
939  SAL_DLLPRIVATE Color GetSingleColorGradientFill();
941 
942 
945 
947 public:
948 
949 #ifdef _MSC_VER
950  void DrawHatch( const tools::PolyPolygon& rPolyPoly, const ::Hatch& rHatch );
951  void AddHatchActions( const tools::PolyPolygon& rPolyPoly,
952  const ::Hatch& rHatch,
953  GDIMetaFile& rMtf );
954 #else
955  void DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch& rHatch );
956  void AddHatchActions( const tools::PolyPolygon& rPolyPoly,
957  const Hatch& rHatch,
958  GDIMetaFile& rMtf );
959 #endif
960 
961  void DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch& rHatch, bool bMtf );
962 
963 private:
964 
965  SAL_DLLPRIVATE void CalcHatchValues( const tools::Rectangle& rRect, tools::Long nDist, Degree10 nAngle10, Point& rPt1, Point& rPt2, Size& rInc, Point& rEndPt1 );
966  SAL_DLLPRIVATE void DrawHatchLine( const tools::Line& rLine, const tools::PolyPolygon& rPolyPoly, Point* pPtBuffer, bool bMtf );
968 
969 
972 
974 public:
975  void DrawWallpaper( const tools::Rectangle& rRect, const Wallpaper& rWallpaper );
976 
977  void Erase();
978  void Erase(const tools::Rectangle& rRect);
979 
980 protected:
981  void DrawGradientWallpaper( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, const Wallpaper& rWallpaper );
982 
983 private:
984  SAL_DLLPRIVATE void DrawWallpaper( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, const Wallpaper& rWallpaper );
985  SAL_DLLPRIVATE void DrawColorWallpaper( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, const Wallpaper& rWallpaper );
986  SAL_DLLPRIVATE void DrawBitmapWallpaper( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, const Wallpaper& rWallpaper );
988 
989 
992 
994 public:
995 
996  void DrawText( const Point& rStartPt, const OUString& rStr,
997  sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
998  MetricVector* pVector = nullptr, OUString* pDisplayText = nullptr,
999  const SalLayoutGlyphs* pLayoutCache = nullptr );
1000 
1001  void DrawText( const tools::Rectangle& rRect,
1002  const OUString& rStr, DrawTextFlags nStyle = DrawTextFlags::NONE,
1003  MetricVector* pVector = nullptr, OUString* pDisplayText = nullptr,
1004  vcl::ITextLayout* _pTextLayout = nullptr );
1005 
1006  static void ImplDrawText( OutputDevice& rTargetDevice, const tools::Rectangle& rRect,
1007  const OUString& rOrigStr, DrawTextFlags nStyle,
1008  MetricVector* pVector, OUString* pDisplayText, vcl::ITextLayout& _rLayout );
1009 
1010  void ImplDrawText( SalLayout& );
1011 
1012  void ImplDrawTextBackground( const SalLayout& );
1013 
1014  void DrawCtrlText( const Point& rPos, const OUString& rStr,
1015  sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
1016  DrawTextFlags nStyle = DrawTextFlags::Mnemonic, MetricVector* pVector = nullptr, OUString* pDisplayText = nullptr,
1017  const SalLayoutGlyphs* pGlyphs = nullptr);
1018 
1019  void DrawTextLine( const Point& rPos, tools::Long nWidth,
1020  FontStrikeout eStrikeout,
1021  FontLineStyle eUnderline,
1022  FontLineStyle eOverline,
1023  bool bUnderlineAbove = false );
1024 
1026  FontStrikeout eStrikeout, FontLineStyle eUnderline,
1027  FontLineStyle eOverline, bool bUnderlineAbove );
1028 
1029  void ImplDrawTextLines( SalLayout&, FontStrikeout eStrikeout, FontLineStyle eUnderline,
1030  FontLineStyle eOverline, bool bWordLine, bool bUnderlineAbove );
1031 
1032  void DrawWaveLine( const Point& rStartPos, const Point& rEndPos, tools::Long nLineWidth = 1 );
1033 
1034  bool ImplDrawRotateText( SalLayout& );
1035 
1037  const OUString& rStr, DrawTextFlags nStyle = DrawTextFlags::WordBreak,
1038  TextRectInfo* pInfo = nullptr,
1039  const vcl::ITextLayout* _pTextLayout = nullptr ) const;
1040 
1090  bool GetTextBoundRect( tools::Rectangle& rRect,
1091  const OUString& rStr, sal_Int32 nBase = 0, sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
1092  sal_uLong nLayoutWidth = 0, const tools::Long* pDXArray = nullptr,
1093  const SalLayoutGlyphs* pGlyphs = nullptr ) const;
1094 
1096 
1098  const OUString& rStr ) const;
1099 
1101  const OUString& rStr, sal_Int32 nBase = 0, sal_Int32 nIndex = 0,
1102  sal_Int32 nLen = -1,
1103  sal_uLong nLayoutWidth = 0, const tools::Long* pDXArray = nullptr ) const;
1104 
1106  const OUString& rStr, sal_Int32 nBase, sal_Int32 nIndex = 0,
1107  sal_Int32 nLen = -1,
1108  sal_uLong nLayoutWidth = 0, const tools::Long* pDXArray = nullptr ) const;
1109 
1110 
1111  OUString GetEllipsisString( const OUString& rStr, tools::Long nMaxWidth,
1112  DrawTextFlags nStyle = DrawTextFlags::EndEllipsis ) const;
1113 
1114  tools::Long GetCtrlTextWidth( const OUString& rStr,
1115  const SalLayoutGlyphs* pLayoutCache = nullptr ) const;
1116 
1117  static OUString GetNonMnemonicString( const OUString& rStr, sal_Int32& rMnemonicPos );
1118 
1119  static OUString GetNonMnemonicString( const OUString& rStr )
1120  { sal_Int32 nDummy; return GetNonMnemonicString( rStr, nDummy ); }
1121 
1130  void AddTextRectActions( const tools::Rectangle& rRect,
1131  const OUString& rOrigStr,
1132  DrawTextFlags nStyle,
1133  GDIMetaFile& rMtf );
1134 
1135  void SetTextColor( const Color& rColor );
1136  const Color& GetTextColor() const { return maTextColor; }
1137 
1138  void SetTextFillColor();
1139  void SetTextFillColor( const Color& rColor );
1140  Color GetTextFillColor() const;
1141  bool IsTextFillColor() const { return !maFont.IsTransparent(); }
1142 
1143  void SetTextLineColor();
1144  void SetTextLineColor( const Color& rColor );
1145  const Color& GetTextLineColor() const { return maTextLineColor; }
1146  bool IsTextLineColor() const { return !maTextLineColor.IsTransparent(); }
1147 
1148  void SetOverlineColor();
1149  void SetOverlineColor( const Color& rColor );
1150  const Color& GetOverlineColor() const { return maOverlineColor; }
1151  bool IsOverlineColor() const { return !maOverlineColor.IsTransparent(); }
1152 
1153  void SetTextAlign( TextAlign eAlign );
1154  TextAlign GetTextAlign() const { return maFont.GetAlignment(); }
1155 
1160  tools::Long GetTextWidth( const OUString& rStr, sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
1161  vcl::TextLayoutCache const* = nullptr,
1162  SalLayoutGlyphs const*const pLayoutCache = nullptr) const;
1163 
1168  tools::Long GetTextHeight() const;
1169  float approximate_digit_width() const;
1170 
1171  void DrawTextArray( const Point& rStartPt, const OUString& rStr,
1172  const tools::Long* pDXAry,
1173  sal_Int32 nIndex = 0,
1174  sal_Int32 nLen = -1,
1176  const SalLayoutGlyphs* pLayoutCache = nullptr);
1177  tools::Long GetTextArray( const OUString& rStr, tools::Long* pDXAry,
1178  sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
1179  vcl::TextLayoutCache const* = nullptr,
1180  SalLayoutGlyphs const*const pLayoutCache = nullptr) const;
1181 
1182  void GetCaretPositions( const OUString&, tools::Long* pCaretXArray,
1183  sal_Int32 nIndex, sal_Int32 nLen,
1184  const SalLayoutGlyphs* pGlyphs = nullptr ) const;
1185  void DrawStretchText( const Point& rStartPt, sal_uLong nWidth,
1186  const OUString& rStr,
1187  sal_Int32 nIndex = 0, sal_Int32 nLen = -1);
1188  sal_Int32 GetTextBreak( const OUString& rStr, tools::Long nTextWidth,
1189  sal_Int32 nIndex, sal_Int32 nLen = -1,
1190  tools::Long nCharExtra = 0,
1191  vcl::TextLayoutCache const* = nullptr,
1192  const SalLayoutGlyphs* pGlyphs = nullptr) const;
1193  sal_Int32 GetTextBreak( const OUString& rStr, tools::Long nTextWidth,
1194  sal_Unicode nExtraChar, sal_Int32& rExtraCharPos,
1195  sal_Int32 nIndex, sal_Int32 nLen,
1196  tools::Long nCharExtra,
1197  vcl::TextLayoutCache const* = nullptr) const;
1198  static std::shared_ptr<vcl::TextLayoutCache> CreateTextLayoutCache(OUString const&);
1199 
1200 protected:
1201  SAL_DLLPRIVATE void ImplInitTextLineSize();
1202  SAL_DLLPRIVATE void ImplInitAboveTextLineSize();
1203  static
1204  SAL_DLLPRIVATE tools::Long ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo, tools::Long nWidth, const OUString& rStr, DrawTextFlags nStyle, const vcl::ITextLayout& _rLayout );
1205  SAL_DLLPRIVATE float approximate_char_width() const;
1206 private:
1207  SAL_DLLPRIVATE void ImplInitTextColor();
1208 
1209  SAL_DLLPRIVATE void ImplDrawTextDirect( SalLayout&, bool bTextLines);
1210  SAL_DLLPRIVATE void ImplDrawSpecialText( SalLayout& );
1211  SAL_DLLPRIVATE void ImplDrawTextRect( tools::Long nBaseX, tools::Long nBaseY, tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight );
1212 
1213  SAL_DLLPRIVATE static void ImplDrawWavePixel( tools::Long nOriginX, tools::Long nOriginY, tools::Long nCurX, tools::Long nCurY, Degree10 nOrientation, SalGraphics* pGraphics, const OutputDevice& rOutDev,
1214  bool bDrawPixAsRect, tools::Long nPixWidth, tools::Long nPixHeight );
1215  SAL_DLLPRIVATE void ImplDrawWaveLine( tools::Long nBaseX, tools::Long nBaseY, tools::Long nStartX, tools::Long nStartY, tools::Long nWidth, tools::Long nHeight, tools::Long nLineWidth, Degree10 nOrientation, const Color& rColor );
1216  SAL_DLLPRIVATE void ImplDrawWaveTextLine( tools::Long nBaseX, tools::Long nBaseY, tools::Long nX, tools::Long nY, tools::Long nWidth, FontLineStyle eTextLine, Color aColor, bool bIsAbove );
1217  SAL_DLLPRIVATE void ImplDrawStraightTextLine( tools::Long nBaseX, tools::Long nBaseY, tools::Long nX, tools::Long nY, tools::Long nWidth, FontLineStyle eTextLine, Color aColor, bool bIsAbove );
1218  SAL_DLLPRIVATE void ImplDrawStrikeoutLine( tools::Long nBaseX, tools::Long nBaseY, tools::Long nX, tools::Long nY, tools::Long nWidth, FontStrikeout eStrikeout, Color aColor );
1219  SAL_DLLPRIVATE void ImplDrawStrikeoutChar( tools::Long nBaseX, tools::Long nBaseY, tools::Long nX, tools::Long nY, tools::Long nWidth, FontStrikeout eStrikeout, Color aColor );
1220  SAL_DLLPRIVATE void ImplDrawMnemonicLine( tools::Long nX, tools::Long nY, tools::Long nWidth );
1221 
1222 
1224 
1225 
1228 
1230 public:
1231 
1232  FontMetric GetDevFont( int nDevFontIndex ) const;
1233  int GetDevFontCount() const;
1234 
1235  bool IsFontAvailable( const OUString& rFontName ) const;
1236 
1237  Size GetDevFontSize( const vcl::Font& rFont, int nSizeIndex ) const;
1238  int GetDevFontSizeCount( const vcl::Font& ) const;
1239 
1240  bool AddTempDevFont( const OUString& rFileURL, const OUString& rFontName );
1241  void RefreshFontData( const bool bNewFontLists );
1242 
1243  FontMetric GetFontMetric() const;
1244  FontMetric GetFontMetric( const vcl::Font& rFont ) const;
1245 
1246  bool GetFontCharMap( FontCharMapRef& rxFontCharMap ) const;
1247  bool GetFontCapabilities( vcl::FontCapabilities& rFontCapabilities ) const;
1248 
1249  bool GetFontFeatures(std::vector<vcl::font::Feature>& rFontFeatures) const;
1250 
1251  SAL_DLLPRIVATE void ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPolyLine, tools::Rectangle& rRect1, tools::Rectangle& rRect2,
1252  tools::Long& rYOff, tools::Long& rWidth, FontEmphasisMark eEmphasis, tools::Long nHeight );
1253  SAL_DLLPRIVATE static FontEmphasisMark
1254  ImplGetEmphasisMarkStyle( const vcl::Font& rFont );
1255 
1256  bool GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, int nIndex,
1257  int nLen, MetricVector& rVector );
1258 
1259  sal_Int32 HasGlyphs( const vcl::Font& rFont, const OUString& rStr,
1260  sal_Int32 nIndex = 0, sal_Int32 nLen = -1 ) const;
1261 
1262  tools::Long GetMinKashida() const;
1263 
1264  // i60594
1265  // validate kashida positions against the current font
1266  // returns count of invalid kashida positions
1267  sal_Int32 ValidateKashidas( const OUString& rTxt, sal_Int32 nIdx, sal_Int32 nLen,
1268  sal_Int32 nKashCount, // number of suggested kashida positions (in)
1269  const sal_Int32* pKashidaPos, // suggested kashida positions (in)
1270  sal_Int32* pKashidaPosDropped // invalid kashida positions (out)
1271  ) const;
1272 
1273  static void BeginFontSubstitution();
1274  static void EndFontSubstitution();
1275  static void AddFontSubstitute( const OUString& rFontName,
1276  const OUString& rReplaceFontName,
1277  AddFontSubstituteFlags nFlags );
1278  static void RemoveFontsSubstitute();
1279 
1281  LanguageType eLang,
1282  GetDefaultFontFlags nFlags,
1283  const OutputDevice* pOutDev = nullptr );
1284 
1285  SAL_DLLPRIVATE void ImplInitFontList() const;
1286  SAL_DLLPRIVATE void ImplUpdateFontData();
1287 
1288  //drop font data for all outputdevices.
1289  //If bNewFontLists is true then empty lists of system fonts
1290  SAL_DLLPRIVATE static void ImplClearAllFontData( bool bNewFontLists );
1291  //fetch font data for all outputdevices
1292  //If bNewFontLists is true then fetch lists of system fonts
1293  SAL_DLLPRIVATE static void ImplRefreshAllFontData( bool bNewFontLists );
1294  //drop and fetch font data for all outputdevices
1295  //If bNewFontLists is true then drop and refetch lists of system fonts
1296  SAL_DLLPRIVATE static void ImplUpdateAllFontData( bool bNewFontLists );
1297 
1298 protected:
1299  SAL_DLLPRIVATE const LogicalFontInstance* GetFontInstance() const;
1300  SAL_DLLPRIVATE tools::Long GetEmphasisAscent() const { return mnEmphasisAscent; }
1301  SAL_DLLPRIVATE tools::Long GetEmphasisDescent() const { return mnEmphasisDescent; }
1302 
1303  SAL_DLLPRIVATE bool InitFont() const;
1304  virtual void SetFontOrientation( LogicalFontInstance* const pFontInstance ) const;
1305  virtual tools::Long GetFontExtLeading() const;
1306 
1307  virtual void ImplClearFontData(bool bNewFontLists);
1308  virtual void ImplRefreshFontData(bool bNewFontLists);
1309  void ReleaseFontCache();
1310  void ReleaseFontCollection();
1312  void ResetNewFontCache();
1313 
1314 private:
1315 
1316  typedef void ( OutputDevice::* FontUpdateHandler_t )( bool );
1317 
1318  SAL_DLLPRIVATE bool ImplNewFont() const;
1319 
1320  SAL_DLLPRIVATE static void ImplUpdateFontDataForAllFrames( FontUpdateHandler_t pHdl, bool bNewFontLists );
1321 
1322  static
1323  SAL_DLLPRIVATE OUString ImplGetEllipsisString( const OutputDevice& rTargetDevice, const OUString& rStr,
1324  tools::Long nMaxWidth, DrawTextFlags nStyle, const vcl::ITextLayout& _rLayout );
1325 
1326  SAL_DLLPRIVATE void ImplDrawEmphasisMark( tools::Long nBaseX, tools::Long nX, tools::Long nY, const tools::PolyPolygon& rPolyPoly, bool bPolyLine, const tools::Rectangle& rRect1, const tools::Rectangle& rRect2 );
1327  SAL_DLLPRIVATE void ImplDrawEmphasisMarks( SalLayout& );
1329 
1330 
1333 
1335 public:
1336 
1337  // tells whether this output device is RTL in an LTR UI or LTR in a RTL UI
1338  SAL_DLLPRIVATE bool ImplIsAntiparallel() const ;
1339  SAL_DLLPRIVATE void ReMirror( Point &rPoint ) const;
1340  SAL_DLLPRIVATE void ReMirror( tools::Rectangle &rRect ) const;
1341  SAL_DLLPRIVATE void ReMirror( vcl::Region &rRegion ) const;
1342  SAL_DLLPRIVATE bool ImplIsRecordLayout() const;
1343  virtual bool HasMirroredGraphics() const;
1344  std::unique_ptr<SalLayout>
1345  ImplLayout( const OUString&, sal_Int32 nIndex, sal_Int32 nLen,
1346  const Point& rLogicPos = Point(0,0), tools::Long nLogicWidth=0,
1347  const tools::Long* pLogicDXArray=nullptr, SalLayoutFlags flags = SalLayoutFlags::NONE,
1348  vcl::TextLayoutCache const* = nullptr,
1349  const SalLayoutGlyphs* pGlyphs = nullptr) const;
1350  SAL_DLLPRIVATE ImplLayoutArgs ImplPrepareLayoutArgs( OUString&, const sal_Int32 nIndex, const sal_Int32 nLen,
1351  DeviceCoordinate nPixelWidth, const DeviceCoordinate* pPixelDXArray,
1353  vcl::TextLayoutCache const* = nullptr) const;
1354  SAL_DLLPRIVATE std::unique_ptr<SalLayout>
1355  ImplGlyphFallbackLayout( std::unique_ptr<SalLayout>, ImplLayoutArgs& ) const;
1356  SAL_DLLPRIVATE std::unique_ptr<SalLayout>
1358  LogicalFontInstance* pLogicalFont, int nFallbackLevel,
1359  ImplLayoutArgs& rLayoutArgs) const;
1360 
1361 
1362  // Enabling/disabling RTL only makes sense for OutputDevices that use a mirroring SalGraphicsLayout
1363  virtual void EnableRTL( bool bEnable = true);
1364  bool IsRTLEnabled() const { return mbEnableRTL; }
1365 
1366  bool GetTextIsRTL( const OUString&, sal_Int32 nIndex, sal_Int32 nLen ) const;
1367 
1369 
1370 
1373 
1375 public:
1376 
1386  void DrawBitmap(
1387  const Point& rDestPt,
1388  const Bitmap& rBitmap );
1389 
1399  void DrawBitmap(
1400  const Point& rDestPt,
1401  const Size& rDestSize,
1402  const Bitmap& rBitmap );
1403 
1404  void DrawBitmap(
1405  const Point& rDestPt,
1406  const Size& rDestSize,
1407  const Point& rSrcPtPixel,
1408  const Size& rSrcSizePixel,
1409  const Bitmap& rBitmap,
1411 
1421  void DrawBitmapEx(
1422  const Point& rDestPt,
1423  const BitmapEx& rBitmapEx );
1424 
1425 
1435  void DrawBitmapEx(
1436  const Point& rDestPt,
1437  const Size& rDestSize,
1438  const BitmapEx& rBitmapEx );
1439 
1440  void DrawBitmapEx(
1441  const Point& rDestPt,
1442  const Size& rDestSize,
1443  const Point& rSrcPtPixel,
1444  const Size& rSrcSizePixel,
1445  const BitmapEx& rBitmapEx,
1447 
1455  void DrawImage(
1456  const Point& rPos,
1457  const Image& rImage,
1459 
1460  void DrawImage(
1461  const Point& rPos,
1462  const Size& rSize,
1463  const Image& rImage,
1465 
1466 
1467  virtual Bitmap GetBitmap( const Point& rSrcPt, const Size& rSize ) const;
1468 
1471  BitmapEx GetBitmapEx( const Point& rSrcPt, const Size& rSize ) const;
1472 
1473 
1488  const basegfx::B2DHomMatrix& rTransformation,
1489  const BitmapEx& rBitmapEx,
1490  double fAlpha = 1.0);
1491 
1496  bool HasFastDrawTransformedBitmap() const;
1497 
1498 protected:
1499 
1500  virtual void DrawDeviceBitmap(
1501  const Point& rDestPt, const Size& rDestSize,
1502  const Point& rSrcPtPixel, const Size& rSrcSizePixel,
1503  BitmapEx& rBitmapEx );
1504 
1505  virtual bool CanSubsampleBitmap() const { return true; }
1506 
1514  virtual bool DrawTransformBitmapExDirect(
1515  const basegfx::B2DHomMatrix& aFullTransform,
1516  const BitmapEx& rBitmapEx,
1517  double fAlpha = 1.0);
1518 
1531  const basegfx::B2DHomMatrix& aFullTransform,
1532  basegfx::B2DRange &aVisibleRange,
1533  double &fMaximumArea);
1534 
1535 private:
1536 
1537  SAL_DLLPRIVATE void DrawDeviceAlphaBitmap(
1538  const Bitmap& rBmp,
1539  const AlphaMask& rAlpha,
1540  const Point& rDestPt,
1541  const Size& rDestSize,
1542  const Point& rSrcPtPixel,
1543  const Size& rSrcSizePixel );
1544 
1545  SAL_DLLPRIVATE void DrawDeviceAlphaBitmapSlowPath(
1546  const Bitmap& rBitmap, const AlphaMask& rAlpha,
1547  tools::Rectangle aDstRect, tools::Rectangle aBmpRect,
1548  Size const & aOutSz, Point const & aOutPt);
1549 
1550 
1551  SAL_DLLPRIVATE void BlendBitmap(
1552  const SalTwoRect& rPosAry,
1553  const Bitmap& rBmp );
1554 
1555  SAL_DLLPRIVATE Bitmap BlendBitmap(
1556  Bitmap& aBmp,
1557  BitmapReadAccess const * pP,
1558  BitmapReadAccess const * pA,
1559  const sal_Int32 nOffY,
1560  const sal_Int32 nDstHeight,
1561  const sal_Int32 nOffX,
1562  const sal_Int32 nDstWidth,
1563  const tools::Rectangle& aBmpRect,
1564  const Size& aOutSz,
1565  const bool bHMirr,
1566  const bool bVMirr,
1567  const tools::Long* pMapX,
1568  const tools::Long* pMapY );
1569 
1570  SAL_DLLPRIVATE Bitmap BlendBitmapWithAlpha(
1571  Bitmap& aBmp,
1572  BitmapReadAccess const * pP,
1573  BitmapReadAccess const * pA,
1574  const tools::Rectangle& aDstRect,
1575  const sal_Int32 nOffY,
1576  const sal_Int32 nDstHeight,
1577  const sal_Int32 nOffX,
1578  const sal_Int32 nDstWidth,
1579  const tools::Long* pMapX,
1580  const tools::Long* pMapY );
1581 
1587  SAL_DLLPRIVATE Bitmap GetDownsampledBitmap(
1588  const Size& rDstSz,
1589  const Point& rSrcPt,
1590  const Size& rSrcSz,
1591  const Bitmap& rBmp,
1592  tools::Long nMaxBmpDPIX,
1593  tools::Long nMaxBmpDPIY );
1594 
1596 
1597 
1600 
1602 public:
1603 
1615  const GDIMetaFile& rInMtf, GDIMetaFile& rOutMtf,
1616  tools::Long nMaxBmpDPIX, tools::Long nMaxBmpDPIY,
1617  bool bReduceTransparency,
1618  bool bTransparencyAutoMode,
1619  bool bDownsampleBitmaps,
1620  const Color& rBackground = COL_TRANSPARENT );
1621 
1622  SAL_DLLPRIVATE Color ImplDrawModeToColor ( const Color& rColor ) const;
1623 
1624 
1625  void DrawTransparent( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent );
1626 
1627  void DrawTransparent(
1628  const basegfx::B2DHomMatrix& rObjectTransform,
1629  const basegfx::B2DPolyPolygon& rB2DPolyPoly,
1630  double fTransparency);
1631 
1632  void DrawTransparent(
1633  const GDIMetaFile& rMtf, const Point& rPos, const Size& rSize,
1634  const Gradient& rTransparenceGradient );
1635 
1636 protected:
1637 
1638  virtual void EmulateDrawTransparent( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent );
1639  void DrawInvisiblePolygon( const tools::PolyPolygon& rPolyPoly );
1640 
1641  virtual void ClipAndDrawGradientMetafile ( const Gradient &rGradient, const tools::PolyPolygon &rPolyPoly );
1642 
1643 private:
1644 
1645  SAL_DLLPRIVATE bool DrawTransparentNatively( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent );
1647 
1648 
1651 
1653 public:
1654 
1655  void DrawMask( const Point& rDestPt,
1656  const Bitmap& rBitmap, const Color& rMaskColor );
1657 
1658  void DrawMask( const Point& rDestPt, const Size& rDestSize,
1659  const Bitmap& rBitmap, const Color& rMaskColor );
1660 
1661  void DrawMask( const Point& rDestPt, const Size& rDestSize,
1662  const Point& rSrcPtPixel, const Size& rSrcSizePixel,
1663  const Bitmap& rBitmap, const Color& rMaskColor,
1664  MetaActionType nAction );
1665 
1666 protected:
1667 
1668  virtual void DrawDeviceMask (
1669  const Bitmap& rMask, const Color& rMaskColor,
1670  const Point& rDestPt, const Size& rDestSize,
1671  const Point& rSrcPtPixel, const Size& rSrcSizePixel );
1673 
1674 
1677 
1679 public:
1680 
1681  void EnableMapMode( bool bEnable = true );
1682  bool IsMapModeEnabled() const { return mbMap; }
1683 
1684  void SetMapMode();
1685  virtual void SetMapMode( const MapMode& rNewMapMode );
1686  void SetRelativeMapMode( const MapMode& rNewMapMode );
1687  virtual void SetMetafileMapMode(const MapMode& rNewMapMode, bool bIsRecord);
1688  const MapMode& GetMapMode() const { return maMapMode; }
1689 
1690 protected:
1691  virtual void ImplInitMapModeObjects();
1692 
1693 public:
1694  // #i75163#
1697 
1698  basegfx::B2DHomMatrix GetViewTransformation( const MapMode& rMapMode ) const;
1700 
1701 
1724  void SetPixelOffset( const Size& rOffset );
1725 
1732  Size GetPixelOffset() const { return Size(mnOutOffOrigX, mnOutOffOrigY);}
1733 
1734  Point LogicToPixel( const Point& rLogicPt ) const;
1735  Size LogicToPixel( const Size& rLogicSize ) const;
1736  tools::Rectangle LogicToPixel( const tools::Rectangle& rLogicRect ) const;
1737  tools::Polygon LogicToPixel( const tools::Polygon& rLogicPoly ) const;
1738  tools::PolyPolygon LogicToPixel( const tools::PolyPolygon& rLogicPolyPoly ) const;
1739  basegfx::B2DPolyPolygon LogicToPixel( const basegfx::B2DPolyPolygon& rLogicPolyPoly ) const;
1740  vcl::Region LogicToPixel( const vcl::Region& rLogicRegion )const;
1741  Point LogicToPixel( const Point& rLogicPt,
1742  const MapMode& rMapMode ) const;
1743  Size LogicToPixel( const Size& rLogicSize,
1744  const MapMode& rMapMode ) const;
1745  tools::Rectangle LogicToPixel( const tools::Rectangle& rLogicRect,
1746  const MapMode& rMapMode ) const;
1747  tools::Polygon LogicToPixel( const tools::Polygon& rLogicPoly,
1748  const MapMode& rMapMode ) const;
1750  const MapMode& rMapMode ) const;
1751 
1752  Point PixelToLogic( const Point& rDevicePt ) const;
1753  Size PixelToLogic( const Size& rDeviceSize ) const;
1754  tools::Rectangle PixelToLogic( const tools::Rectangle& rDeviceRect ) const;
1755  tools::Polygon PixelToLogic( const tools::Polygon& rDevicePoly ) const;
1756  tools::PolyPolygon PixelToLogic( const tools::PolyPolygon& rDevicePolyPoly ) const;
1757  basegfx::B2DPolyPolygon PixelToLogic( const basegfx::B2DPolyPolygon& rDevicePolyPoly ) const;
1758  vcl::Region PixelToLogic( const vcl::Region& rDeviceRegion ) const;
1759  Point PixelToLogic( const Point& rDevicePt,
1760  const MapMode& rMapMode ) const;
1761  Size PixelToLogic( const Size& rDeviceSize,
1762  const MapMode& rMapMode ) const;
1763  tools::Rectangle PixelToLogic( const tools::Rectangle& rDeviceRect,
1764  const MapMode& rMapMode ) const;
1765  tools::Polygon PixelToLogic( const tools::Polygon& rDevicePoly,
1766  const MapMode& rMapMode ) const;
1768  const MapMode& rMapMode ) const;
1770  const MapMode& rMapMode ) const;
1771 
1772  Point LogicToLogic( const Point& rPtSource,
1773  const MapMode* pMapModeSource,
1774  const MapMode* pMapModeDest ) const;
1775  Size LogicToLogic( const Size& rSzSource,
1776  const MapMode* pMapModeSource,
1777  const MapMode* pMapModeDest ) const;
1778  tools::Rectangle LogicToLogic( const tools::Rectangle& rRectSource,
1779  const MapMode* pMapModeSource,
1780  const MapMode* pMapModeDest ) const;
1781  static Point LogicToLogic( const Point& rPtSource,
1782  const MapMode& rMapModeSource,
1783  const MapMode& rMapModeDest );
1784  static Size LogicToLogic( const Size& rSzSource,
1785  const MapMode& rMapModeSource,
1786  const MapMode& rMapModeDest );
1787  static tools::Rectangle LogicToLogic( const tools::Rectangle& rRectSource,
1788  const MapMode& rMapModeSource,
1789  const MapMode& rMapModeDest );
1790  static tools::Long LogicToLogic( tools::Long nLongSource,
1791  MapUnit eUnitSource,
1792  MapUnit eUnitDest );
1793 
1795  const MapMode& rMapModeSource,
1796  const MapMode& rMapModeDest );
1797 
1798  // create a mapping transformation from rMapModeSource to rMapModeDest (the above methods
1799  // for B2DPoly/Polygons use this internally anyway to transform the B2DPolygon)
1800  static basegfx::B2DHomMatrix LogicToLogic(const MapMode& rMapModeSource, const MapMode& rMapModeDest);
1801 
1808  SAL_DLLPRIVATE tools::Rectangle ImplLogicToDevicePixel( const tools::Rectangle& rLogicRect ) const;
1809 
1816  SAL_DLLPRIVATE Point ImplLogicToDevicePixel( const Point& rLogicPt ) const;
1817 
1828  SAL_DLLPRIVATE tools::Long ImplLogicWidthToDevicePixel( tools::Long nWidth ) const;
1829 
1830  SAL_DLLPRIVATE DeviceCoordinate LogicWidthToDeviceCoordinate( tools::Long nWidth ) const;
1831 
1843  SAL_DLLPRIVATE tools::Long ImplLogicXToDevicePixel( tools::Long nX ) const;
1844 
1856  SAL_DLLPRIVATE tools::Long ImplLogicYToDevicePixel( tools::Long nY ) const;
1857 
1868  SAL_DLLPRIVATE tools::Long ImplLogicHeightToDevicePixel( tools::Long nHeight ) const;
1869 
1879  SAL_DLLPRIVATE tools::Long ImplDevicePixelToLogicWidth( tools::Long nWidth ) const;
1880 
1890  SAL_DLLPRIVATE tools::Long ImplDevicePixelToLogicHeight( tools::Long nHeight ) const;
1891 
1901  SAL_DLLPRIVATE float ImplFloatLogicHeightToDevicePixel( float fLogicHeight ) const;
1902 
1909  SAL_DLLPRIVATE Size ImplLogicToDevicePixel( const Size& rLogicSize ) const;
1910 
1917  SAL_DLLPRIVATE tools::Rectangle ImplDevicePixelToLogic( const tools::Rectangle& rPixelRect ) const;
1918 
1925  SAL_DLLPRIVATE tools::Polygon ImplLogicToDevicePixel( const tools::Polygon& rLogicPoly ) const;
1926 
1933  SAL_DLLPRIVATE tools::PolyPolygon ImplLogicToDevicePixel( const tools::PolyPolygon& rLogicPolyPoly ) const;
1934 
1941  SAL_DLLPRIVATE LineInfo ImplLogicToDevicePixel( const LineInfo& rLineInfo ) const;
1942 
1949  SAL_DLLPRIVATE vcl::Region ImplPixelToDevicePixel( const vcl::Region& rRegion ) const;
1950 
1955  SAL_DLLPRIVATE void ImplInvalidateViewTransform();
1956 
1961  SAL_DLLPRIVATE basegfx::B2DHomMatrix ImplGetDeviceTransformation() const;
1963 
1964 
1969 
1971 public:
1972 
1975  virtual bool CanEnableNativeWidget() const { return false; }
1976 
1979  bool IsNativeControlSupported( ControlType nType, ControlPart nPart ) const;
1980 
1984  ControlPart nPart,
1985  const tools::Rectangle& rControlRegion,
1986  const Point& aPos,
1987  bool& rIsInside ) const;
1988 
1991  bool DrawNativeControl(
1992  ControlType nType,
1993  ControlPart nPart,
1994  const tools::Rectangle& rControlRegion,
1995  ControlState nState,
1996  const ImplControlValue& aValue,
1997  const OUString& aCaption,
1998  const Color& rBackgroundColor = COL_AUTO );
1999 
2003  ControlType nType,
2004  ControlPart nPart,
2005  const tools::Rectangle& rControlRegion,
2006  ControlState nState,
2007  const ImplControlValue& aValue,
2008  tools::Rectangle &rNativeBoundingRegion,
2009  tools::Rectangle &rNativeContentRegion ) const;
2011 
2014 
2016 public:
2017 
2023  bool DrawEPS(
2024  const Point& rPt, const Size& rSz,
2025  const GfxLink& rGfxLink, GDIMetaFile* pSubst = nullptr );
2027 
2028 public:
2029  virtual css::awt::DeviceInfo GetDeviceInfo() const;
2030 
2031 protected:
2032  css::awt::DeviceInfo GetCommonDeviceInfo(Size const& aDevSize) const;
2033 
2034 };
2035 
2036 #endif // INCLUDED_VCL_OUTDEV_HXX
2037 
2038 /* 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:742
VclReferenceBase & operator=(const VclReferenceBase &)=delete
vcl::Region GetClipRegion() const
const Color & GetTextColor() const
Definition: outdev.hxx:1136
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:791
OutDevType GetOutDevType() const
Definition: outdev.hxx:528
sal_Int32 mnDPIScalePercentage
For HiDPI displays, we want to draw elements for a percentage larger.
Definition: outdev.hxx:348
virtual void Flush()
Definition: outdev.hxx:551
void SetDigitLanguage(LanguageType)
SAL_DLLPRIVATE float approximate_char_width() const
Definition: text.cxx:904
VclPtr< OutputDevice > mpNextGraphics
Next output device in list.
Definition: outdev.hxx:317
tools::SvRef< FontCharMap > FontCharMapRef
Definition: outdev.hxx:283
virtual Color GetMonochromeButtonColor()
Definition: outdev.hxx:544
void SetPixelOffset(const Size &rOffset)
Set an offset in pixel.
Definition: map.cxx:1698
SAL_DLLPRIVATE DeviceCoordinate LogicWidthToDeviceCoordinate(tools::Long nWidth) const
Definition: map.cxx:1713
static vcl::Font GetDefaultFont(DefaultFontType nType, LanguageType eLang, GetDefaultFontFlags nFlags, const OutputDevice *pOutDev=nullptr)
const Wallpaper & GetBackground() const
Definition: outdev.hxx:647
bool GetFontCharMap(FontCharMapRef &rxFontCharMap) const
Definition: hatch.hxx:46
virtual tools::Long GetGradientStepCount(tools::Long nMinRect)
void SetRelativeMapMode(const MapMode &rNewMapMode)
Definition: map.cxx:642
B2IVector B2ISize
static void AddFontSubstitute(const OUString &rFontName, const OUString &rReplaceFontName, AddFontSubstituteFlags nFlags)
tools::Long mnTextOffX
font specific text alignment offsets in pixel units
Definition: outdev.hxx:350
tools::Long mnOutOffLogicX
Additional output offset in logical coordinates, applied in PixelToLogic (used by SetPixelOffset/GetP...
Definition: outdev.hxx:335
SAL_DLLPRIVATE bool ImplIsRecordLayout() const
Definition: outdev.cxx:632
virtual bool DrawTransformBitmapExDirect(const basegfx::B2DHomMatrix &aFullTransform, const BitmapEx &rBitmapEx, double fAlpha=1.0)
Transform and draw a bitmap directly.
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:138
SAL_DLLPRIVATE tools::Long GetEmphasisAscent() const
Definition: outdev.hxx:1300
tools::Long mnOutOffOrigY
Additional output pixel offset, applied in LogicToPixel (used by SetPixelOffset/GetPixelOffset) ...
Definition: outdev.hxx:337
virtual bool UsePolyPolygonForComplexGradient() override
Definition: window.cxx:3843
sal_uInt32 GetGCStackDepth() const
OutputDevice(const OutputDevice &)=delete
bool mbOutput
Definition: outdev.hxx:377
SAL_DLLPRIVATE void DrawComplexGradient(const tools::Rectangle &rRect, const Gradient &rGradient, const tools::PolyPolygon *pClipPolyPoly)
SAL_DLLPRIVATE tools::Long GetGradientSteps(const Gradient &rGradient, const tools::Rectangle &rRect, bool bMtf, bool bComplex=false)
virtual bool IsVirtual() const
Definition: outdev.cxx:180
Color maTextColor
Definition: outdev.hxx:363
DrawModeFlags
Definition: outdev.hxx:199
const Point & GetRefPoint() const
Definition: outdev.hxx:434
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)
bool SupportsCairo() const
SAL_DLLPRIVATE void SetDeviceClipRegion(const vcl::Region *pRegion)
void ImplHandleResize(vcl::Window *pWindow, tools::Long nNewWidth, tools::Long nNewHeight)
Definition: winproc.cxx:1634
void ImplClearFontData(bool bNewFontLists) override
Definition: window3.cxx:42
Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
Definition: map.cxx:1466
bool IsTransparent() const
virtual void CopyDeviceArea(SalTwoRect &aPosAry, bool bWindowInvalidate) override
Definition: window.cxx:1224
virtual ~OutputDevice() override
Definition: outdev.cxx:133
const Color & GetTextLineColor() const
Definition: outdev.hxx:1145
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:390
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:2057
static SAL_DLLPRIVATE void ImplUpdateFontDataForAllFrames(FontUpdateHandler_t pHdl, bool bNewFontLists)
bool IsBackground() const
Definition: outdev.hxx:650
SAL_DLLPRIVATE void CalcHatchValues(const tools::Rectangle &rRect, tools::Long nDist, Degree10 nAngle10, Point &rPt1, Point &rPt2, Size &rInc, Point &rEndPt1)
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
DrawModeFlags mnDrawMode
Definition: outdev.hxx:354
Color maLineColor
Definition: outdev.hxx:360
sal_uIntPtr sal_uLong
long Long
static void EndFontSubstitution()
TextAlign GetTextAlign() const
Definition: outdev.hxx:1154
static SAL_DLLPRIVATE OUString ImplGetEllipsisString(const OutputDevice &rTargetDevice, const OUString &rStr, tools::Long nMaxWidth, DrawTextFlags nStyle, const vcl::ITextLayout &_rLayout)
Definition: text.cxx:1932
bool IsOutputEnabled() const
Definition: outdev.hxx:604
FontEmphasisMark
SAL_DLLPRIVATE void SetDPIX(sal_Int32 nDPIX)
Definition: outdev.hxx:515
sal_Int32 GetTextBreak(const OUString &rStr, tools::Long nTextWidth, sal_Int32 nIndex, sal_Int32 nLen=-1, tools::Long nCharExtra=0, vcl::TextLayoutCache const *=nullptr, const SalLayoutGlyphs *pGlyphs=nullptr) const
Definition: text.cxx:1374
bool IsMapModeEnabled() const
Definition: outdev.hxx:1682
bool IsTextLineColor() const
Definition: outdev.hxx:1146
tools::Long GetOutOffXPixel() const
Definition: outdev.hxx:445
vcl::Region maRegion
Definition: outdev.hxx:359
SAL_DLLPRIVATE std::unique_ptr< SalLayout > getFallbackLayout(LogicalFontInstance *pLogicalFont, int nFallbackLevel, ImplLayoutArgs &rLayoutArgs) const
bool mbOutputClipped
Definition: outdev.hxx:379
void DrawChord(const tools::Rectangle &rRect, const Point &rStartPt, const Point &rEndPt)
tools::Long mnOutOffY
Output offset for device output in pixel (pseudo window offset within window system's frames) ...
Definition: outdev.hxx:343
SAL_DLLPRIVATE void ImplInitTextColor()
Definition: text.cxx:71
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:321
ComplexTextLayoutFlags GetLayoutMode() const
Definition: outdev.hxx:614
SAL_DLLPRIVATE bool is_double_buffered_window() const
const MapMode & GetMapMode() const
Definition: outdev.hxx:1688
void SetTextFillColor()
Definition: text.cxx:697
sal_Int32 mnDPIY
Definition: outdev.hxx:347
SAL_DLLPRIVATE Color ImplDrawModeToColor(const Color &rColor) const
Definition: transparent.cxx:77
std::vector< VCLXGraphics * > * mpUnoGraphicsList
Definition: outdev.hxx:326
SAL_DLLPRIVATE void DrawLinearGradientToMetafile(const tools::Rectangle &rRect, const Gradient &rGradient)
void SetLayoutMode(ComplexTextLayoutFlags nTextLayoutMode)
std::unique_ptr< ImplDeviceFontSizeList > mpDeviceFontSizeList
Definition: outdev.hxx:323
void IntersectClipRegion(const tools::Rectangle &rRect)
GDIMetaFile * GetConnectMetaFile() const
Definition: outdev.hxx:415
void DrawTextLine(const Point &rPos, tools::Long nWidth, FontStrikeout eStrikeout, FontLineStyle eUnderline, FontLineStyle eOverline, bool bUnderlineAbove=false)
Definition: textline.cxx:898
cairo::SurfaceSharedPtr CreateBitmapSurface(const BitmapSystemData &rData, const Size &rSize) const
Create Surface for given bitmap data.
sal_Int32 mnDPIX
Definition: outdev.hxx:346
void ReleaseFontCollection()
SAL_DLLPRIVATE void ImplDrawSpecialText(SalLayout &)
Definition: text.cxx:314
virtual void SetSettings(const AllSettings &rSettings) override
void EnableMapMode(bool bEnable=true)
Definition: map.cxx:508
void DrawMask(const Point &rDestPt, const Bitmap &rBitmap, const Color &rMaskColor)
Definition: mask.cxx:30
virtual void DrawBorder(tools::Rectangle aBorderRect)
Definition: rect.cxx:32
bool SupportsOperation(OutDevSupportType) const
Query an OutputDevice to see whether it supports a specific operation.
Definition: outdev.cxx:335
bool mbMap
Definition: outdev.hxx:374
SAL_DLLPRIVATE const LogicalFontInstance * GetFontInstance() const
std::vector< VCLXGraphics * > * CreateUnoGraphicsList()
Definition: outdev.cxx:327
SAL_DLLPRIVATE void ImplDrawWaveLine(tools::Long nBaseX, tools::Long nBaseY, tools::Long nStartX, tools::Long nStartY, tools::Long nWidth, tools::Long nHeight, tools::Long nLineWidth, Degree10 nOrientation, const Color &rColor)
Definition: textline.cxx:75
SAL_DLLPRIVATE Color GetSingleColorGradientFill()
SAL_DLLPRIVATE Bitmap GetDownsampledBitmap(const Size &rDstSz, const Point &rSrcPt, const Size &rSrcSz, const Bitmap &rBmp, tools::Long nMaxBmpDPIX, tools::Long nMaxBmpDPIY)
Retrieve downsampled and cropped bitmap.
bool mbEnableRTL
Definition: outdev.hxx:392
SAL_DLLPRIVATE void ImplDrawStrikeoutLine(tools::Long nBaseX, tools::Long nBaseY, tools::Long nX, tools::Long nY, tools::Long nWidth, FontStrikeout eStrikeout, Color aColor)
Definition: textline.cxx:506
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:516
AntialiasingFlags GetAntialiasing() const
Definition: outdev.hxx:608
tools::Long mnEmphasisDescent
Definition: outdev.hxx:353
tools::Long mnOutOffOrigX
Additional output pixel offset, applied in LogicToPixel (used by SetPixelOffset/GetPixelOffset) ...
Definition: outdev.hxx:333
void DrawGradientWallpaper(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, const Wallpaper &rWallpaper)
Definition: wallpaper.cxx:372
tools::Rectangle ImplGetTextBoundRect(const SalLayout &)
Definition: text.cxx:161
void DrawTextArray(const Point &rStartPt, const OUString &rStr, const tools::Long *pDXAry, sal_Int32 nIndex=0, sal_Int32 nLen=-1, SalLayoutFlags flags=SalLayoutFlags::NONE, const SalLayoutGlyphs *pLayoutCache=nullptr)
Definition: text.cxx:917
OutDevSupportType
Definition: vclenum.hxx:196
Color GetBackgroundColor() const override
Definition: window.cxx:587
FontAlign GetAlignment() const
Definition: font/font.cxx:819
bool SelectClipRegion(const vcl::Region &, SalGraphics *pGraphics=nullptr)
MapMode maMapMode
Definition: outdev.hxx:369
void SetDrawMode(DrawModeFlags nDrawMode)
void DrawWallpaper(const tools::Rectangle &rRect, const Wallpaper &rWallpaper)
Definition: wallpaper.cxx:42
const Color & GetOverlineColor() const
Definition: outdev.hxx:1150
SAL_DLLPRIVATE void ImplInitFontList() const
void ImplDrawTextBackground(const SalLayout &)
Definition: text.cxx:141
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:1796
Color GetTextFillColor() const
Definition: text.cxx:755
SAL_DLLPRIVATE void InitLineColor()
static SAL_DLLPRIVATE tools::Long ImplGetTextLines(ImplMultiTextLineInfo &rLineInfo, tools::Long nWidth, const OUString &rStr, DrawTextFlags nStyle, const vcl::ITextLayout &_rLayout)
Definition: text.cxx:455
sal_uInt16 sal_Unicode
static OUString GetNonMnemonicString(const OUString &rStr)
Definition: outdev.hxx:1119
Color maOverlineColor
Definition: outdev.hxx:365
void SetBackground()
void DrawStretchText(const Point &rStartPt, sal_uLong nWidth, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1)
Definition: text.cxx:1114
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:147
AddFontSubstituteFlags
Definition: outdev.hxx:243
void SetOutOffYPixel(tools::Long nOutOffY)
Definition: outdev.cxx:316
bool DrawPolyLineDirectInternal(const basegfx::B2DHomMatrix &rObjectTransform, const basegfx::B2DPolygon &rB2DPolygon, double fLineWidth=0.0, double fTransparency=0.0, const std::vector< double > *=nullptr, basegfx::B2DLineJoin eLineJoin=basegfx::B2DLineJoin::NONE, css::drawing::LineCap eLineCap=css::drawing::LineCap_BUTT, double fMiterMinimumAngle=basegfx::deg2rad(15.0))
Definition: polyline.cxx:323
SAL_DLLPRIVATE void ReMirror(Point &rPoint) const
Definition: outdev.cxx:595
SAL_DLLPRIVATE tools::Long ImplLogicXToDevicePixel(tools::Long nX) const
Convert a logical X coordinate to a device pixel's X coordinate.
Definition: map.cxx:296
SAL_DLLPRIVATE void DrawLinearGradient(const tools::Rectangle &rRect, const Gradient &rGradient, const tools::PolyPolygon *pClipPolyPoly)
const vcl::Font & GetFont() const
Definition: outdev.hxx:653
RasterOp
Definition: vclenum.hxx:192
void ImplRefreshFontData(bool bNewFontLists) override
Definition: window3.cxx:49
SAL_DLLPRIVATE void ImplDrawWaveTextLine(tools::Long nBaseX, tools::Long nBaseY, tools::Long nX, tools::Long nY, tools::Long nWidth, FontLineStyle eTextLine, Color aColor, bool bIsAbove)
Definition: textline.cxx:195
OutDevViewType meOutDevViewType
Definition: outdev.hxx:358
virtual bool CanSubsampleBitmap() const
Definition: outdev.hxx:1505
OUString GetEllipsisString(const OUString &rStr, tools::Long nMaxWidth, DrawTextFlags nStyle=DrawTextFlags::EndEllipsis) const
Definition: text.cxx:1925
void RefreshFontData(const bool bNewFontLists)
SAL_DLLPRIVATE void BlendBitmap(const SalTwoRect &rPosAry, const Bitmap &rBmp)
AntialiasingFlags mnAntialiasing
Definition: outdev.hxx:371
bool mbBackground
Definition: outdev.hxx:376
bool GetTextOutline(tools::PolyPolygon &, const OUString &rStr) const
Definition: text.cxx:2424
virtual Bitmap GetBitmap(const Point &rSrcPt, const Size &rSize) const
virtual void DrawOutDevDirectProcess(const OutputDevice &rSrcDev, SalTwoRect &rPosAry, SalGraphics *pSrcGraphics) override
Definition: window.cxx:1265
PushFlags
Definition: outdevstate.hxx:38
FontMetric GetFontMetric() const
MetaActionType
tools::Long GetCtrlTextWidth(const OUString &rStr, const SalLayoutGlyphs *pLayoutCache=nullptr) const
Definition: text.cxx:2200
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 tools::Long *pMapX, const tools::Long *pMapY)
void DrawInvisiblePolygon(const tools::PolyPolygon &rPolyPoly)
SAL_DLLPRIVATE bool ImplNewFont() const
void ClearStack()
bool mbClipRegionSet
Definition: outdev.hxx:387
SystemGraphicsData GetSystemGfxData() const
Definition: outdev.cxx:218
void SetFontCollectionFromSVData()
Color maFillColor
Definition: outdev.hxx:361
bool GetFontFeatures(std::vector< vcl::font::Feature > &rFontFeatures) const
void ReleaseFontCache()
static void BeginFontSubstitution()
GetDefaultFontFlags
Definition: outdev.hxx:255
bool AddTempDevFont(const OUString &rFileURL, const OUString &rFontName)
void SetTextLineColor()
Definition: textline.cxx:800
SAL_DLLPRIVATE void ImplDrawMnemonicLine(tools::Long nX, tools::Long nY, tools::Long nWidth)
Definition: textline.cxx:786
std::unique_ptr< AllSettings > mxSettings
Definition: outdev.hxx:368
bool GetTextOutlines(PolyPolyVector &, const OUString &rStr, sal_Int32 nBase=0, sal_Int32 nIndex=0, sal_Int32 nLen=-1, sal_uLong nLayoutWidth=0, const tools::Long *pDXArray=nullptr) const
Definition: text.cxx:2403
SalGraphics * mpGraphics
Graphics context to draw on.
Definition: outdev.hxx:315
SAL_DLLPRIVATE bool DrawTransparentNatively(const tools::PolyPolygon &rPolyPoly, sal_uInt16 nTransparencePercent)
SAL_DLLPRIVATE basegfx::B2DHomMatrix ImplGetDeviceTransformation() const
Get device transformation.
Definition: map.cxx:791
std::shared_ptr< Surface > SurfaceSharedPtr
Definition: cairo.hxx:36
std::vector< OutDevState > maOutDevStateStack
Definition: outdev.hxx:324
virtual void CopyArea(const Point &rDestPt, const Point &rSrcPt, const Size &rSrcSize, bool bWindowInvalidate=false)
Definition: outdev.cxx:460
bool DrawPolyLineDirect(const basegfx::B2DHomMatrix &rObjectTransform, const basegfx::B2DPolygon &rB2DPolygon, double fLineWidth=0.0, double fTransparency=0.0, const std::vector< double > *=nullptr, basegfx::B2DLineJoin eLineJoin=basegfx::B2DLineJoin::NONE, css::drawing::LineCap eLineCap=css::drawing::LineCap_BUTT, double fMiterMinimumAngle=basegfx::deg2rad(15.0))
Definition: polyline.cxx:290
void DrawTransformedBitmapEx(const basegfx::B2DHomMatrix &rTransformation, const BitmapEx &rBitmapEx, double fAlpha=1.0)
Draw BitmapEx transformed.
FontMetric GetDevFont(int nDevFontIndex) const
Definition: outdev/font.cxx:47
bool IsTextFillColor() const
Definition: outdev.hxx:1141
SAL_DLLPRIVATE void ImplInvalidateViewTransform()
Invalidate the view transformation.
Definition: map.cxx:224
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:275
void SetConnectMetaFile(GDIMetaFile *pMtf)
Definition: outdev.cxx:205
bool IsRTLEnabled() const
Definition: outdev.hxx:1364
static std::shared_ptr< vcl::TextLayoutCache > CreateTextLayoutCache(OUString const &)
Definition: text.cxx:1357
Wallpaper maBackground
Definition: outdev.hxx:367
virtual tools::Rectangle GetBackgroundComponentBounds() const
Definition: outdev.cxx:564
SAL_DLLPRIVATE float ImplFloatLogicHeightToDevicePixel(float fLogicHeight) const
Convert logical height to device pixels, with exact sub-pixel value.
Definition: map.cxx:330
bool IsClipRegion() const
Definition: outdev.hxx:679
css::uno::Any GetNativeSurfaceHandle(cairo::SurfaceSharedPtr &rSurface, const basegfx::B2ISize &rSize) const
Return native handle for underlying surface.
tools::Long GetOutputHeightPixel() const
Definition: outdev.hxx:444
OutDevType
Definition: outdev.hxx:277
bool IsLineColor() const
Definition: outdev.hxx:635
SAL_DLLPRIVATE void DrawHatchLine(const tools::Line &rLine, const tools::PolyPolygon &rPolyPoly, Point *pPtBuffer, bool bMtf)
void drawLine(VirtualDevice *dev, Point const &orig, Point const &dest, Size const &pSize)
draws a line from orig to dest knowing penSize
Definition: shape.cxx:111
float approximate_digit_width() const
Definition: text.cxx:912
ComplexTextLayoutFlags
Definition: outdevstate.hxx:66
std::unique_ptr< ImplDeviceFontList > mpDeviceFontList
Definition: outdev.hxx:322
void DrawTransparent(const tools::PolyPolygon &rPolyPoly, sal_uInt16 nTransparencePercent)
SAL_DLLPRIVATE void ImplDrawTextDirect(SalLayout &, bool bTextLines)
Definition: text.cxx:271
SAL_DLLPRIVATE bool ImplIsAntiparallel() const
Definition: outdev.cxx:579
SAL_DLLPRIVATE void ImplInitAboveTextLineSize()
Definition: textline.cxx:45
Size GetOutputSize() const
Definition: outdev.hxx:454
virtual void SetFontOrientation(LogicalFontInstance *const pFontInstance) const
virtual bool HasMirroredGraphics() const
Definition: outdev.cxx:627
bool mbInitLineColor
Definition: outdev.hxx:382
SAL_DLLPRIVATE void ImplDrawTextRect(tools::Long nBaseX, tools::Long nBaseY, tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight)
Definition: text.cxx:82
const OutDevType meOutDevType
Definition: outdev.hxx:357
void SetFillColor()
tools::Long mnOutHeight
Definition: outdev.hxx:345
bool mbNewFont
Definition: outdev.hxx:388
AntialiasingFlags
Definition: outdev.hxx:230
SAL_DLLPRIVATE void drawOutDevDirect(const OutputDevice &rSrcDev, SalTwoRect &rPosAry)
Definition: outdev.cxx:515
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:303
const Color & GetLineColor() const
Definition: outdev.hxx:634
virtual void InitClipRegion() override
SAL_DLLPRIVATE tools::Long ImplLogicWidthToDevicePixel(tools::Long nWidth) const
Convert a logical width to a width in units of device pixels.
Definition: map.cxx:314
virtual void ClipToPaintRegion(tools::Rectangle &rDstRect) override
bool mbTextLines
Definition: outdev.hxx:389
void ImplDrawTextLine(tools::Long nBaseX, tools::Long nX, tools::Long nY, DeviceCoordinate nWidth, FontStrikeout eStrikeout, FontLineStyle eUnderline, FontLineStyle eOverline, bool bUnderlineAbove)
Definition: textline.cxx:660
bool IsFontAvailable(const OUString &rFontName) const
Definition: outdev/font.cxx:92
void SetTextColor(const Color &rColor)
Definition: text.cxx:662
SAL_DLLPRIVATE void ImplDrawStraightTextLine(tools::Long nBaseX, tools::Long nBaseY, tools::Long nX, tools::Long nY, tools::Long nWidth, FontLineStyle eTextLine, Color aColor, bool bIsAbove)
Definition: textline.cxx:263
tools::Long DeviceCoordinate
static SAL_DLLPRIVATE FontEmphasisMark ImplGetEmphasisMarkStyle(const vcl::Font &rFont)
BmpMirrorFlags
Definition: bitmap.hxx:41
void(OutputDevice::* FontUpdateHandler_t)(bool)
Definition: outdev.hxx:1316
std::vector< tools::PolyPolygon > PolyPolyVector
VCL_DLLPUBLIC void DrawFocusRect(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect)
Definition: window2.cxx:1995
vcl::Font maFont
Definition: outdev.hxx:362
void AddGradientActions(const tools::Rectangle &rRect, const Gradient &rGradient, GDIMetaFile &rMtf)
bool ImplDrawRotateText(SalLayout &)
Definition: text.cxx:199
bool mbLineColor
Definition: outdev.hxx:380
constexpr double deg2rad(double v)
void SetOverlineColor()
Definition: textline.cxx:849
bool DrawNativeControl(ControlType nType, ControlPart nPart, const tools::Rectangle &rControlRegion, ControlState nState, const ImplControlValue &aValue, const OUString &aCaption, const Color &rBackgroundColor=COL_AUTO)
Request rendering of a particular control and/or part.
std::shared_ptr< cairo_surface_t > CairoSurfaceSharedPtr
Definition: cairo.hxx:34
RasterOp meRasterOp
Definition: outdev.hxx:366
const AllSettings & GetSettings() const
Definition: outdev.hxx:418
Size GetOutputSizePixel() const
Definition: outdev.hxx:441
DrawTextFlags
Definition: outdev.hxx:143
void MoveClipRegion(tools::Long nHorzMove, tools::Long nVertMove)
bool mbInitTextColor
Definition: outdev.hxx:385
css::uno::Any GetSystemGfxDataAny() const
Definition: outdev.cxx:266
Color maTextLineColor
Definition: outdev.hxx:364
SAL_DLLPRIVATE void DrawColorWallpaper(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, const Wallpaper &rWallpaper)
Definition: wallpaper.cxx:83
virtual void SetMetafileMapMode(const MapMode &rNewMapMode, bool bIsRecord)
Definition: map.cxx:632
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:302
DrawModeFlags GetDrawMode() const
Definition: outdev.hxx:611
void DrawBitmap(const Point &rDestPt, const Bitmap &rBitmap)
This is an overloaded member function, provided for convenience. It differs from the above function o...
DrawGridFlags
Definition: outdev.hxx:186
virtual tools::Long GetFontExtLeading() const
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
tools::Long mnEmphasisAscent
Definition: outdev.hxx:352
void DrawHatch(const tools::PolyPolygon &rPolyPoly, const Hatch &rHatch)
std::unique_ptr< SalLayout > ImplLayout(const OUString &, sal_Int32 nIndex, sal_Int32 nLen, const Point &rLogicPos=Point(0, 0), tools::Long nLogicWidth=0, const tools::Long *pLogicDXArray=nullptr, SalLayoutFlags flags=SalLayoutFlags::NONE, vcl::TextLayoutCache const *=nullptr, const SalLayoutGlyphs *pGlyphs=nullptr) const
Definition: text.cxx:1241
virtual void DrawHatchLine_DrawLine(const Point &rStartPoint, const Point &rEndPoint)
TextAlign
bool mbRefPoint
Definition: outdev.hxx:391
float GetDPIScaleFactor() const
Definition: outdev.hxx:518
tools::Long GetOutOffYPixel() const
Definition: outdev.hxx:446
virtual void dispose()
bool GetGlyphBoundRects(const Point &rOrigin, const OUString &rStr, int nIndex, int nLen, MetricVector &rVector)
SAL_DLLPRIVATE void ImplDrawStrikeoutChar(tools::Long nBaseX, tools::Long nBaseY, tools::Long nX, tools::Long nY, tools::Long nWidth, FontStrikeout eStrikeout, Color aColor)
Definition: textline.cxx:568
std::vector< VCLXGraphics * > * GetUnoGraphicsList() const
Definition: outdev.hxx:459
void GetCaretPositions(const OUString &, tools::Long *pCaretXArray, sal_Int32 nIndex, sal_Int32 nLen, const SalLayoutGlyphs *pGlyphs=nullptr) const
Definition: text.cxx:1059
Point PixelToLogic(const Point &rDevicePt) const
Definition: map.cxx:1021
Point LogicToPixel(const Point &rLogicPt) const
Definition: map.cxx:800
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...
#define SAL_WARN_UNUSED
SAL_DLLPRIVATE void ImplDrawPolyPolygonWithB2DPolyPolygon(const basegfx::B2DPolyPolygon &rB2DPolyPoly)
Definition: polygon.cxx:269
tools::Long GetMinKashida() const
VclPtr< OutputDevice > mpPrevGraphics
Previous output device in list.
Definition: outdev.hxx:316
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:1141
SalLayoutFlags
Definition: outdev.hxx:120
bool mbFillColor
Definition: outdev.hxx:381
VclPtr< VirtualDevice > mpAlphaVDev
Definition: outdev.hxx:330
SAL_DLLPRIVATE tools::Long GetEmphasisDescent() const
Definition: outdev.hxx:1301
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:498
bool IsRefPoint() const
Definition: outdev.hxx:435
ImplMapRes maMapRes
Definition: outdev.hxx:356
bool mbClipRegion
Definition: outdev.hxx:375
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
css::awt::DeviceInfo GetCommonDeviceInfo(Size const &aDevSize) const
Definition: outdev.cxx:698
SAL_DLLPRIVATE void DrawBitmapWallpaper(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, const Wallpaper &rWallpaper)
Definition: wallpaper.cxx:135
void SetExtOutDevData(vcl::ExtOutDevData *pExtOutDevData)
Definition: outdev.hxx:537
bool RemoveTransparenciesFromMetaFile(const GDIMetaFile &rInMtf, GDIMetaFile &rOutMtf, tools::Long nMaxBmpDPIX, tools::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:627
void ResetNewFontCache()
OutputDevice RenderContext
Definition: outdev.hxx:291
virtual Color GetReadableFontColor(const Color &rFontColor, const Color &rBgColor) const
Definition: wallpaper.cxx:27
void SetFont(const vcl::Font &rNewFont)
tools::Rectangle GetOutputRectPixel() const
Definition: outdev.hxx:451
LanguageType GetDigitLanguage() const
Definition: outdev.hxx:617
virtual void EnableRTL(bool bEnable=true) override
OutDevViewType GetOutDevViewType() const
Definition: outdev.hxx:630
bool mbInitClipRegion
Definition: outdev.hxx:386
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_WHITE
tools::Long GetTextHeight() const
Height where any character of the current font fits; in logic coordinates.
Definition: text.cxx:891
static void ImplDrawText(OutputDevice &rTargetDevice, const tools::Rectangle &rRect, const OUString &rOrigStr, DrawTextFlags nStyle, MetricVector *pVector, OUString *pDisplayText, vcl::ITextLayout &_rLayout)
Definition: text.cxx:1460
SAL_DLLPRIVATE void ImplDrawEmphasisMarks(SalLayout &)
Point GetOutputOffPixel() const
Definition: outdev.hxx:449
SAL_DLLPRIVATE void ImplUpdateFontData()
bool IsTransparent() const
Definition: font/font.cxx:817
void SetRasterOp(RasterOp eRasterOp)
void SetOutOffXPixel(tools::Long nOutOffX)
Definition: outdev.cxx:311
Definition: image.hxx:39
void DrawGrid(const tools::Rectangle &rRect, const Size &rDist, DrawGridFlags nFlags)
Definition: rect.cxx:235
bool DrawEPS(const Point &rPt, const Size &rSz, const GfxLink &rGfxLink, GDIMetaFile *pSubst=nullptr)
Definition: outdev.cxx:642
SalGraphics const * GetGraphics() const
Get the graphic context that the output device uses to draw on.
Definition: outdev.cxx:195
virtual void DrawDeviceBitmap(const Point &rDestPt, const Size &rDestSize, const Point &rSrcPtPixel, const Size &rSrcSizePixel, BitmapEx &rBitmapEx)
tools::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:880
css::uno::Reference< css::awt::XGraphics > CreateUnoGraphics()
Definition: outdev.cxx:321
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:99
InvertFlags
Definition: outdev.hxx:266
css::awt::DeviceInfo GetDeviceInfo() const override
Definition: window.cxx:3943
sal_Int32 GetDPIScalePercentage() const
Definition: outdev.hxx:523
void AddHatchActions(const tools::PolyPolygon &rPolyPoly, const Hatch &rHatch, GDIMetaFile &rMtf)
virtual Size GetButtonBorderSize()
Definition: outdev.hxx:543
SAL_DLLPRIVATE void SetDPIY(sal_Int32 nDPIY)
Definition: outdev.hxx:516
bool mbInitFont
Definition: outdev.hxx:384
RasterOp GetRasterOp() const
Definition: outdev.hxx:620
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:345
bool GetTextIsRTL(const OUString &, sal_Int32 nIndex, sal_Int32 nLen) const
Definition: text.cxx:1363
void DrawWaveLine(const Point &rStartPos, const Point &rEndPos, tools::Long nLineWidth=1)
Definition: textline.cxx:939
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:319
BmpMirrorFlags AdjustTwoRect(SalTwoRect &rTwoRect, const Size &rSizePix)
Definition: rect.cxx:336
void AddTextRectActions(const tools::Rectangle &rRect, const OUString &rOrigStr, DrawTextFlags nStyle, GDIMetaFile &rMtf)
Generate MetaTextActions for the text rect.
Definition: text.cxx:1718
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:209
Size GetDevFontSize(const vcl::Font &rFont, int nSizeIndex) const
DefaultFontType
bool mbInitFillColor
Definition: outdev.hxx:383
sal_Int32 ValidateKashidas(const OUString &rTxt, sal_Int32 nIdx, sal_Int32 nLen, sal_Int32 nKashCount, const sal_Int32 *pKashidaPos, sal_Int32 *pKashidaPosDropped) const
tools::Long mnOutWidth
Definition: outdev.hxx:344
int GetDevFontCount() const
Definition: outdev/font.cxx:72
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 tools::Long *pDXArray=nullptr, const SalLayoutGlyphs *pGlyphs=nullptr) const
Return the exact bounding rectangle of rStr.
Definition: text.cxx:2252
SAL_DLLPRIVATE void drawPolyLine(const tools::Polygon &rPoly, const LineInfo &rLineInfo)
Definition: polyline.cxx:242
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:376
ComplexTextLayoutFlags mnTextLayoutMode
Definition: outdev.hxx:355
bool mbDevOutput
Definition: outdev.hxx:378
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...
void ImplInitMapModeObjects() override
Definition: window3.cxx:56
Size GetPixelOffset() const
Get the offset in pixel.
Definition: outdev.hxx:1732
void SetOutDevViewType(OutDevViewType eOutDevViewType)
If this OutputDevice is used for displaying a Print Preview the OutDevViewType should be set to 'OutD...
Definition: outdev.hxx:629
std::shared_ptr< ImplFontCache > mxFontCache
Definition: outdev.hxx:320
MapUnit
tools::Long mnOutOffX
Output offset for device output in pixel (pseudo window offset within window system's frames) ...
Definition: outdev.hxx:341
std::unique_ptr< ImplOutDevData > mpOutDevData
Definition: outdev.hxx:325
vcl::ExtOutDevData * GetExtOutDevData() const
Definition: outdev.hxx:538
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:477
SAL_DLLPRIVATE tools::Long ImplLogicYToDevicePixel(tools::Long nY) const
Convert a logical Y coordinate to a device pixel's Y coordinate.
Definition: map.cxx:305
static void RemoveFontsSubstitute()
SAL_DLLPRIVATE void ImplInitTextLineSize()
Definition: textline.cxx:40
SAL_DLLPRIVATE void ImplDrawEmphasisMark(tools::Long nBaseX, tools::Long nX, tools::Long nY, const tools::PolyPolygon &rPolyPoly, bool bPolyLine, const tools::Rectangle &rRect1, const tools::Rectangle &rRect2)
vcl::ExtOutDevData * mpExtOutDevData
Definition: outdev.hxx:327
bool IsFillColor() const
Definition: outdev.hxx:640
virtual bool AcquireGraphics() const override
Acquire a graphics device that the output device uses to draw on.
Definition: window.cxx:819
tools::Long mnOutOffLogicY
Additional output offset in logical coordinates, applied in PixelToLogic (used by SetPixelOffset/GetP...
Definition: outdev.hxx:339
bool IsOverlineColor() const
Definition: outdev.hxx:1151
virtual size_t GetSyncCount() const
Definition: outdev.hxx:462
OutDevViewType
Definition: outdev.hxx:279
static SAL_DLLPRIVATE void ImplDrawWavePixel(tools::Long nOriginX, tools::Long nOriginY, tools::Long nCurX, tools::Long nCurY, Degree10 nOrientation, SalGraphics *pGraphics, const OutputDevice &rOutDev, bool bDrawPixAsRect, tools::Long nPixWidth, tools::Long nPixHeight)
Definition: textline.cxx:50
Color GetPixel(const Point &rPt) const
Definition: pixel.cxx:29
virtual const OutputDevice * DrawOutDevDirectCheck(const OutputDevice &rSrcDev) const override
Definition: window.cxx:1250
SAL_DLLPRIVATE void ImplGetEmphasisMark(tools::PolyPolygon &rPolyPoly, bool &rPolyLine, tools::Rectangle &rRect1, tools::Rectangle &rRect2, tools::Long &rYOff, tools::Long &rWidth, FontEmphasisMark eEmphasis, tools::Long nHeight)
SAL_DLLPRIVATE tools::Long ImplDevicePixelToLogicWidth(tools::Long nWidth) const
Convert device pixels to a width in logical units.
Definition: map.cxx:338
static SAL_DLLPRIVATE void ImplClearAllFontData(bool bNewFontLists)
static OUString GetNonMnemonicString(const OUString &rStr, sal_Int32 &rMnemonicPos)
Definition: text.cxx:2217
FontLineStyle
struct _cairo_surface cairo_surface_t
Definition: svpgdi.hxx:71
void ImplDrawTextLines(SalLayout &, FontStrikeout eStrikeout, FontLineStyle eUnderline, FontLineStyle eOverline, bool bWordLine, bool bUnderlineAbove)
Definition: textline.cxx:726
bool IsDeviceOutputNecessary() const
Definition: outdev.hxx:605
void Push(PushFlags nFlags=PushFlags::ALL)
Definition: outdevstate.cxx:59
Point maRefPoint
Definition: outdev.hxx:370
void DrawGradient(const tools::Rectangle &rRect, const Gradient &rGradient)
virtual void ImplReleaseFonts()
basegfx::B2DHomMatrix GetViewTransformation() const
Definition: map.cxx:714
SAL_DLLPRIVATE tools::Long ImplLogicHeightToDevicePixel(tools::Long nHeight) const
Convert a logical height to a height in units of device pixels.
Definition: map.cxx:322
tools::Long GetTextArray(const OUString &rStr, tools::Long *pDXAry, sal_Int32 nIndex=0, sal_Int32 nLen=-1, vcl::TextLayoutCache const *=nullptr, SalLayoutGlyphs const *const pLayoutCache=nullptr) const
Definition: text.cxx:950
SAL_DLLPRIVATE sal_Int32 GetDPIY() const
Get the output device's DPI y-axis value.
Definition: outdev.hxx:513
SAL_DLLPRIVATE tools::Long ImplDevicePixelToLogicHeight(tools::Long nHeight) const
Convert device pixels to a height in logical units.
Definition: map.cxx:346
bool HasFastDrawTransformedBitmap() const
Return true if DrawTransformedBitmapEx() is fast.
virtual void ClipAndDrawGradientMetafile(const Gradient &rGradient, const tools::PolyPolygon &rPolyPoly)
DrawImageFlags
Definition: outdev.hxx:171
tools::Long GetOutputWidthPixel() const
Definition: outdev.hxx:443
tools::Long mnTextOffY
Definition: outdev.hxx:351
FontStrikeout
SAL_DLLPRIVATE sal_Int32 GetDPIX() const
Get the output device's DPI x-axis value.
Definition: outdev.hxx:507
void SetTextAlign(TextAlign eAlign)
Definition: text.cxx:763
virtual bool IsScreenComp() const
Definition: outdev.hxx:437
virtual void ReleaseGraphics(bool bRelease=true) override
Release the graphics device, and remove it from the graphics device list.
Definition: window.cxx:883
virtual vcl::Region GetOutputBoundsClipRegion() const override
const Color & GetFillColor() const
Definition: outdev.hxx:639
GDIMetaFile * mpMetaFile
Definition: outdev.hxx:318
SAL_DLLPRIVATE void ImplDrawPolygon(const tools::Polygon &rPoly, const tools::PolyPolygon *pClipPolyPoly=nullptr)
Definition: polygon.cxx:442
::std::vector< B2DPolyPolygon > B2DPolyPolygonVector
SAL_DLLPRIVATE bool InitFont() const
LanguageType meTextLanguage
Definition: outdev.hxx:372
virtual bool CanEnableNativeWidget() const
Determine if native widgets can be enabled.
Definition: outdev.hxx:1975
typedef void(CALLTYPE *GetFuncDataPtr)(sal_uInt16 &nNo