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 class ImplFontCache;
60 class ImplDeviceFontList;
63 class SalGraphics;
64 class Gradient;
65 class Hatch;
66 class AllSettings;
67 class BitmapReadAccess;
68 class BitmapEx;
69 class Image;
70 class TextRectInfo;
71 class FontMetric;
72 class GDIMetaFile;
73 class GfxLink;
74 namespace tools {
75  class Line;
76 }
77 class LineInfo;
78 class AlphaMask;
79 class FontCharMap;
80 class SalLayout;
81 class ImplLayoutArgs;
82 class VirtualDevice;
83 struct SalTwoRect;
84 class Printer;
85 class VCLXGraphics;
86 class OutDevStateStack;
87 class SalLayoutGlyphs;
88 
89 namespace vcl
90 {
91  class ExtOutDevData;
92  class ITextLayout;
93  struct FontCapabilities;
94  class TextLayoutCache;
95  class Window;
96  namespace font {
97  struct Feature;
98  }
99 }
100 
101 namespace basegfx {
102  class B2DHomMatrix;
103  class B2DPolygon;
104  class B2IVector;
105  typedef B2IVector B2ISize;
106 }
107 
108 namespace com::sun::star::awt {
109  class XGraphics;
110 }
111 
112 #if defined UNX
113 #define GLYPH_FONT_HEIGHT 128
114 #else
115 #define GLYPH_FONT_HEIGHT 256
116 #endif
117 
118 // Text Layout options
119 enum class SalLayoutFlags
120 {
121  NONE = 0x0000,
122  BiDiRtl = 0x0001,
123  BiDiStrong = 0x0002,
124  RightAlign = 0x0004,
125  DisableKerning = 0x0010,
126  KerningAsian = 0x0020,
127  Vertical = 0x0040,
128  KashidaJustification = 0x0800,
129  ForFallback = 0x2000,
130  GlyphItemsOnly = 0x4000,
131 };
132 namespace o3tl
133 {
134  template<> struct typed_flags<SalLayoutFlags> : is_typed_flags<SalLayoutFlags, 0x6877> {};
135 }
136 
137 typedef std::vector< tools::Rectangle > MetricVector;
138 
139 // OutputDevice-Types
140 
141 // Flags for DrawText()
142 enum class DrawTextFlags
143 {
144  NONE = 0x00000000,
145  Disable = 0x00000001,
146  Mnemonic = 0x00000002,
147  Mono = 0x00000004,
148  Clip = 0x00000008,
149  Left = 0x00000010,
150  Center = 0x00000020,
151  Right = 0x00000040,
152  Top = 0x00000080,
153  VCenter = 0x00000100,
154  Bottom = 0x00000200,
155  EndEllipsis = 0x00000400,
156  PathEllipsis = 0x00000800,
157  MultiLine = 0x00001000,
158  WordBreak = 0x00002000,
159  NewsEllipsis = 0x00004000,
160  WordBreakHyphenation = 0x00008000 | WordBreak,
161  CenterEllipsis = 0x00010000,
162  HideMnemonic = 0x00020000,
163 };
164 namespace o3tl
165 {
166  template<> struct typed_flags<DrawTextFlags> : is_typed_flags<DrawTextFlags, 0x3ffff> {};
167 }
168 
169 // Flags for DrawImage(), these must match the definitions in css::awt::ImageDrawMode
170 enum class DrawImageFlags
171 {
172  NONE = 0x0000,
173  Disable = 0x0001,
174  Highlight = 0x0002,
175  Deactive = 0x0004,
176  ColorTransform = 0x0008,
177  SemiTransparent = 0x0010,
178 };
179 namespace o3tl
180 {
181  template<> struct typed_flags<DrawImageFlags> : is_typed_flags<DrawImageFlags, 0x001f> {};
182 }
183 
184 // Flags for DrawGrid()
185 enum class DrawGridFlags
186 {
187  NONE = 0x0000,
188  Dots = 0x0001,
189  HorzLines = 0x0002,
190  VertLines = 0x0004
191 };
192 namespace o3tl
193 {
194  template<> struct typed_flags<DrawGridFlags> : is_typed_flags<DrawGridFlags, 0x0007> {};
195 }
196 
197 // DrawModes
198 enum class DrawModeFlags : sal_uInt32
199 {
200  Default = 0x00000000,
201  BlackLine = 0x00000001,
202  BlackFill = 0x00000002,
203  BlackText = 0x00000004,
204  BlackBitmap = 0x00000008,
205  BlackGradient = 0x00000010,
206  GrayLine = 0x00000020,
207  GrayFill = 0x00000040,
208  GrayText = 0x00000080,
209  GrayBitmap = 0x00000100,
210  GrayGradient = 0x00000200,
211  NoFill = 0x00000400,
212  WhiteLine = 0x00000800,
213  WhiteFill = 0x00001000,
214  WhiteText = 0x00002000,
215  WhiteBitmap = 0x00004000,
216  WhiteGradient = 0x00008000,
217  SettingsLine = 0x00010000,
218  SettingsFill = 0x00020000,
219  SettingsText = 0x00040000,
220  SettingsGradient = 0x00080000,
221  NoTransparency = 0x00100000,
222 };
223 namespace o3tl
224 {
225  template<> struct typed_flags<DrawModeFlags> : is_typed_flags<DrawModeFlags, 0x1fffff> {};
226 }
227 
228 // Antialiasing
230 {
231  NONE = 0x0000,
232  DisableText = 0x0001,
233  Enable = 0x0002,
234  PixelSnapHairline = 0x0004,
235 };
236 namespace o3tl
237 {
238  template<> struct typed_flags<AntialiasingFlags> : is_typed_flags<AntialiasingFlags, 0x07> {};
239 }
240 
241 // AddFontSubstitute() flags
243 {
244  NONE = 0x00,
245  ALWAYS = 0x01,
246  ScreenOnly = 0x02,
247 };
248 namespace o3tl
249 {
250  template<> struct typed_flags<AddFontSubstituteFlags> : is_typed_flags<AddFontSubstituteFlags, 0x03> {};
251 }
252 
253 // GetDefaultFont() flags
255 {
256  NONE = 0x0000,
257  OnlyOne = 0x0001,
258 };
259 namespace o3tl
260 {
261  template<> struct typed_flags<GetDefaultFontFlags> : is_typed_flags<GetDefaultFontFlags, 0x01> {};
262 }
263 
264 // Flags for Invert()
265 enum class InvertFlags
266 {
267  NONE = 0x0000,
268  N50 = 0x0001,
269  TrackFrame = 0x0002
270 };
271 namespace o3tl
272 {
273  template<> struct typed_flags<InvertFlags> : is_typed_flags<InvertFlags, 0x0003> {};
274 }
275 
277 
279 
280 // OutputDevice
281 
283 
284 BmpMirrorFlags AdjustTwoRect( SalTwoRect& rTwoRect, const Size& rSizePix );
285 void AdjustTwoRect( SalTwoRect& rTwoRect, const tools::Rectangle& rValidSrcRect );
286 
287 class OutputDevice;
288 
289 namespace vcl {
291 }
292 
293 VCL_DLLPUBLIC void DrawFocusRect(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect);
294 
295 typedef struct _cairo_surface cairo_surface_t;
296 
303 {
304  friend class Printer;
305  friend class VirtualDevice;
306  friend class vcl::Window;
307  friend class WorkWindow;
308  friend void ImplHandleResize( vcl::Window* pWindow, tools::Long nNewWidth, tools::Long nNewHeight );
309 
310 private:
311  OutputDevice(const OutputDevice&) = delete;
312  OutputDevice& operator=(const OutputDevice&) = delete;
313 
319  mutable std::shared_ptr<ImplFontCache> mxFontCache;
320  mutable std::shared_ptr<PhysicalFontCollection> mxFontCollection;
321  mutable std::unique_ptr<ImplDeviceFontList> mpDeviceFontList;
322  mutable std::unique_ptr<ImplDeviceFontSizeList> mpDeviceFontSizeList;
323  std::vector<OutDevState> maOutDevStateStack;
324  std::unique_ptr<ImplOutDevData> mpOutDevData;
325  std::vector< VCLXGraphics* >* mpUnoGraphicsList;
327 
328  // TEMP TEMP TEMP
330 
345  sal_Int32 mnDPIX;
346  sal_Int32 mnDPIY;
348  mutable tools::Long mnTextOffX;
358  vcl::Region maRegion; // contains the clip region, see SetClipRegion(...)
367  std::unique_ptr<AllSettings> mxSettings;
372 
373  mutable bool mbMap : 1;
374  mutable bool mbClipRegion : 1;
375  mutable bool mbBackground : 1;
376  mutable bool mbOutput : 1;
377  mutable bool mbDevOutput : 1;
378  mutable bool mbOutputClipped : 1;
379  mutable bool mbLineColor : 1;
380  mutable bool mbFillColor : 1;
381  mutable bool mbInitLineColor : 1;
382  mutable bool mbInitFillColor : 1;
383  mutable bool mbInitFont : 1;
384  mutable bool mbInitTextColor : 1;
385  mutable bool mbInitClipRegion : 1;
386  mutable bool mbClipRegionSet : 1;
387  mutable bool mbNewFont : 1;
388  mutable bool mbTextLines : 1;
389  mutable bool mbTextSpecial : 1;
390  mutable bool mbRefPoint : 1;
391  mutable bool mbEnableRTL : 1;
392 
395 
397 protected:
398  OutputDevice(OutDevType eOutDevType);
399  virtual ~OutputDevice() override;
400  virtual void dispose() override;
401 
402 public:
403 
410  SalGraphics const *GetGraphics() const;
412 
413  void SetConnectMetaFile( GDIMetaFile* pMtf );
415 
416  virtual void SetSettings( const AllSettings& rSettings );
417  const AllSettings& GetSettings() const { return *mxSettings; }
418 
420  bool SupportsCairo() const;
424  cairo::SurfaceSharedPtr CreateSurface(int x, int y, int width, int height) const;
426  cairo::SurfaceSharedPtr CreateBitmapSurface(const BitmapSystemData& rData, const Size& rSize) const;
428  css::uno::Any GetNativeSurfaceHandle(cairo::SurfaceSharedPtr& rSurface, const basegfx::B2ISize& rSize) const;
429  css::uno::Any GetSystemGfxDataAny() const;
430 
431  void SetRefPoint();
432  void SetRefPoint( const Point& rRefPoint );
433  const Point& GetRefPoint() const { return maRefPoint; }
434  bool IsRefPoint() const { return mbRefPoint; }
435 
436  virtual bool IsScreenComp() const { return true; }
437 
438  virtual sal_uInt16 GetBitCount() const;
439 
441  { return Size( mnOutWidth, mnOutHeight ); }
446  void SetOutOffXPixel(tools::Long nOutOffX);
447  void SetOutOffYPixel(tools::Long nOutOffY);
448 
450  { return PixelToLogic( GetOutputSizePixel() ); }
451 
452  css::uno::Reference< css::awt::XGraphics >
454  std::vector< VCLXGraphics* > *GetUnoGraphicsList() const { return mpUnoGraphicsList; }
455  std::vector< VCLXGraphics* > *CreateUnoGraphicsList();
456 
457  virtual size_t GetSyncCount() const { return 0xffffffff; }
458 
459 protected:
460 
480  virtual bool AcquireGraphics() const = 0;
481 
488  virtual void ReleaseGraphics( bool bRelease = true ) = 0;
490 
491 
494 
496 public:
497 
502  SAL_DLLPRIVATE sal_Int32 GetDPIX() const { return mnDPIX; }
503 
508  SAL_DLLPRIVATE sal_Int32 GetDPIY() const { return mnDPIY; }
509 
510  SAL_DLLPRIVATE void SetDPIX( sal_Int32 nDPIX ) { mnDPIX = nDPIX; }
511  SAL_DLLPRIVATE void SetDPIY( sal_Int32 nDPIY ) { mnDPIY = nDPIY; }
512 
513  float GetDPIScaleFactor() const
514  {
515  return mnDPIScalePercentage / 100.0f;
516  }
517 
518  sal_Int32 GetDPIScalePercentage() const
519  {
520  return mnDPIScalePercentage;
521  }
522 
524  virtual bool IsVirtual() const;
525 
530  bool SupportsOperation( OutDevSupportType ) const;
531 
532  void SetExtOutDevData( vcl::ExtOutDevData* pExtOutDevData ) { mpExtOutDevData = pExtOutDevData; }
534 
536 
537 public:
538  virtual Size GetButtonBorderSize() { return Size(1, 1); };
540 
543 
545 public:
546  virtual void Flush() {}
547 
548  virtual void DrawOutDev(
549  const Point& rDestPt, const Size& rDestSize,
550  const Point& rSrcPt, const Size& rSrcSize );
551 
552  virtual void DrawOutDev(
553  const Point& rDestPt, const Size& rDestSize,
554  const Point& rSrcPt, const Size& rSrcSize,
555  const OutputDevice& rOutDev );
556 
557  virtual void CopyArea(
558  const Point& rDestPt,
559  const Point& rSrcPt, const Size& rSrcSize,
560  bool bWindowInvalidate = false );
561 
562 protected:
563 
564  virtual void CopyDeviceArea( SalTwoRect& aPosAry, bool bWindowInvalidate);
565 
567 
568  virtual const OutputDevice* DrawOutDevDirectCheck(const OutputDevice* pSrcDev) const;
569 
570  virtual void DrawOutDevDirectProcess( const OutputDevice* pSrcDev, SalTwoRect& rPosAry, SalGraphics* pSrcGraphics );
571 
572  SAL_DLLPRIVATE void drawOutDevDirect ( const OutputDevice* pSrcDev, SalTwoRect& rPosAry );
573 
574  SAL_DLLPRIVATE bool is_double_buffered_window() const;
575 
576 private:
577 
578  // not implemented; to detect misuses of DrawOutDev(...OutputDevice&);
579  SAL_DLLPRIVATE void DrawOutDev( const Point&, const Size&, const Point&, const Size&, const Printer&) = delete;
581 
582 
585 
587 public:
588 
589  void Push( PushFlags nFlags = PushFlags::ALL );
590  void Pop();
591 
592  // returns the current stack depth; that is the number of Push() calls minus the number of Pop() calls
593  // this should not normally be used since Push and Pop must always be used symmetrically
594  // however this may be e.g. a help when debugging code in which this somehow is not the case
595  sal_uInt32 GetGCStackDepth() const;
596  void ClearStack();
597 
598  void EnableOutput( bool bEnable = true );
599  bool IsOutputEnabled() const { return mbOutput; }
600  bool IsDeviceOutputNecessary() const { return (mbOutput && mbDevOutput); }
601 
602  void SetAntialiasing( AntialiasingFlags nMode );
604 
605  void SetDrawMode( DrawModeFlags nDrawMode );
607 
608  void SetLayoutMode( ComplexTextLayoutFlags nTextLayoutMode );
610 
613 
614  void SetRasterOp( RasterOp eRasterOp );
615  RasterOp GetRasterOp() const { return meRasterOp; }
616 
624  void SetOutDevViewType( OutDevViewType eOutDevViewType ) { meOutDevViewType=eOutDevViewType; }
626 
627  void SetLineColor();
628  void SetLineColor( const Color& rColor );
629  const Color& GetLineColor() const { return maLineColor; }
630  bool IsLineColor() const { return mbLineColor; }
631 
632  void SetFillColor();
633  void SetFillColor( const Color& rColor );
634  const Color& GetFillColor() const { return maFillColor; }
635  bool IsFillColor() const { return mbFillColor; }
636 
637  void SetBackground();
638  void SetBackground( const Wallpaper& rBackground );
639  virtual void SaveBackground(VirtualDevice& rSaveDevice,
640  const Point& rPos, const Size& rSize, const Size& rBackgroundSize) const;
641 
642  const Wallpaper& GetBackground() const { return maBackground; }
643  virtual Color GetBackgroundColor() const;
644  virtual Color GetReadableFontColor(const Color& rFontColor, const Color& rBgColor) const;
645  bool IsBackground() const { return mbBackground; }
646 
647  void SetFont( const vcl::Font& rNewFont );
648  const vcl::Font& GetFont() const { return maFont; }
649 
650 protected:
651 
652  virtual void ImplReleaseFonts();
653 
654 private:
655 
656  SAL_DLLPRIVATE void InitLineColor();
657 
658  SAL_DLLPRIVATE void InitFillColor();
659 
661 
662 
665 
667 public:
668 
669  vcl::Region GetClipRegion() const;
670  void SetClipRegion();
671  void SetClipRegion( const vcl::Region& rRegion );
672  bool SelectClipRegion( const vcl::Region&, SalGraphics* pGraphics = nullptr );
673 
674  bool IsClipRegion() const { return mbClipRegion; }
675 
676  void MoveClipRegion( tools::Long nHorzMove, tools::Long nVertMove );
677  void IntersectClipRegion( const tools::Rectangle& rRect );
678  void IntersectClipRegion( const vcl::Region& rRegion );
679 
680  virtual vcl::Region GetActiveClipRegion() const;
681  virtual vcl::Region GetOutputBoundsClipRegion() const;
682 
683 protected:
684 
685  virtual void InitClipRegion();
686 
693  virtual vcl::Region ClipToDeviceBounds(vcl::Region aRegion) const;
694  virtual void ClipToPaintRegion ( tools::Rectangle& rDstRect );
695 
696 private:
697 
698  SAL_DLLPRIVATE void SetDeviceClipRegion( const vcl::Region* pRegion );
700 
701 public:
702  virtual void DrawBorder(tools::Rectangle aBorderRect);
703 
704 
707 
709 public:
710 
711  void DrawPixel( const Point& rPt );
712  void DrawPixel( const Point& rPt, const Color& rColor );
713 
714  Color GetPixel( const Point& rPt ) const;
716 
717 
720 
722 public:
723 
724  void DrawRect( const tools::Rectangle& rRect );
725  void DrawRect( const tools::Rectangle& rRect,
726  sal_uLong nHorzRount, sal_uLong nVertRound );
727 
729  void DrawCheckered(
730  const Point& rPos,
731  const Size& rSize,
732  sal_uInt32 nLen = 8,
733  Color aStart = COL_WHITE,
734  Color aEnd = COL_BLACK);
735 
736  void DrawGrid( const tools::Rectangle& rRect, const Size& rDist, DrawGridFlags nFlags );
737 
739 
742 public:
744  void Invert( const tools::Rectangle& rRect, InvertFlags nFlags = InvertFlags::NONE );
745  void Invert( const tools::Polygon& rPoly, InvertFlags nFlags = InvertFlags::NONE );
747 
750 
752 public:
753 
754  void DrawLine( const Point& rStartPt, const Point& rEndPt );
755 
756  void DrawLine( const Point& rStartPt, const Point& rEndPt,
757  const LineInfo& rLineInfo );
758 
759 protected:
760  virtual void DrawHatchLine_DrawLine(const Point& rStartPoint, const Point& rEndPoint);
761 
762 private:
763 
766  SAL_DLLPRIVATE void drawLine( basegfx::B2DPolyPolygon aLinePolyPolygon, const LineInfo& rInfo );
768 
769 
772 
774 public:
775 
784  void DrawPolyLine( const tools::Polygon& rPoly );
785 
786  void DrawPolyLine(
787  const basegfx::B2DPolygon&,
788  double fLineWidth = 0.0,
790  css::drawing::LineCap eLineCap = css::drawing::LineCap_BUTT,
791  double fMiterMinimumAngle = basegfx::deg2rad(15.0));
792 
803  void DrawPolyLine( const tools::Polygon& rPoly,
804  const LineInfo& rLineInfo );
805 
806  // #i101491#
807  // Helper who tries to use SalGDI's DrawPolyLine direct and returns it's bool.
808  bool DrawPolyLineDirect(
809  const basegfx::B2DHomMatrix& rObjectTransform,
810  const basegfx::B2DPolygon& rB2DPolygon,
811  double fLineWidth = 0.0,
812  double fTransparency = 0.0,
813  const std::vector< double >* = nullptr, // MM01
815  css::drawing::LineCap eLineCap = css::drawing::LineCap_BUTT,
816  double fMiterMinimumAngle = basegfx::deg2rad(15.0));
817 
818 private:
819 
820  // #i101491#
821  // Helper which holds the old line geometry creation and is extended to use AA when
822  // switched on. Advantage is that line geometry is only temporarily used for paint
823  SAL_DLLPRIVATE void drawPolyLine(const tools::Polygon& rPoly, const LineInfo& rLineInfo);
824 
826 
828  const basegfx::B2DHomMatrix& rObjectTransform,
829  const basegfx::B2DPolygon& rB2DPolygon,
830  double fLineWidth = 0.0,
831  double fTransparency = 0.0,
832  const std::vector< double >* = nullptr, // MM01
834  css::drawing::LineCap eLineCap = css::drawing::LineCap_BUTT,
835  double fMiterMinimumAngle = basegfx::deg2rad(15.0));
836 
839 
841 public:
842 
853  void DrawPolygon( const tools::Polygon& rPoly );
854  void DrawPolygon( const basegfx::B2DPolygon& );
855 
866  void DrawPolyPolygon( const tools::PolyPolygon& rPolyPoly );
868 
869 private:
870 
871  SAL_DLLPRIVATE void ImplDrawPolygon( const tools::Polygon& rPoly, const tools::PolyPolygon* pClipPolyPoly = nullptr );
872  SAL_DLLPRIVATE void ImplDrawPolyPolygon( const tools::PolyPolygon& rPolyPoly, const tools::PolyPolygon* pClipPolyPoly );
873  SAL_DLLPRIVATE void ImplDrawPolyPolygon( sal_uInt16 nPoly, const tools::PolyPolygon& rPolyPoly );
874  // #i101491#
875  // Helper who implements the DrawPolyPolygon functionality for basegfx::B2DPolyPolygon
876  // without MetaFile processing
877  SAL_DLLPRIVATE void ImplDrawPolyPolygonWithB2DPolyPolygon(const basegfx::B2DPolyPolygon& rB2DPolyPoly);
879 
880 
883 
885 public:
886 
887  void DrawEllipse( const tools::Rectangle& rRect );
888 
889  void DrawArc(
890  const tools::Rectangle& rRect,
891  const Point& rStartPt, const Point& rEndPt );
892 
893  void DrawPie(
894  const tools::Rectangle& rRect,
895  const Point& rStartPt, const Point& rEndPt );
896 
897  void DrawChord(
898  const tools::Rectangle& rRect,
899  const Point& rStartPt, const Point& rEndPt );
900 
902 
903 
906 
908 public:
909  void DrawGradient( const tools::Rectangle& rRect, const Gradient& rGradient );
910  void DrawGradient( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient );
911 
912  void AddGradientActions(
913  const tools::Rectangle& rRect,
914  const Gradient& rGradient,
915  GDIMetaFile& rMtf );
916 
917 protected:
918 
919  virtual bool UsePolyPolygonForComplexGradient() = 0;
920 
921  virtual tools::Long GetGradientStepCount( tools::Long nMinRect );
922 
923 private:
924 
925  SAL_DLLPRIVATE void DrawLinearGradient( const tools::Rectangle& rRect, const Gradient& rGradient, const tools::PolyPolygon* pClipPolyPoly );
926  SAL_DLLPRIVATE void DrawComplexGradient( const tools::Rectangle& rRect, const Gradient& rGradient, const tools::PolyPolygon* pClipPolyPoly );
927 
928  SAL_DLLPRIVATE void DrawGradientToMetafile( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient );
929  SAL_DLLPRIVATE void DrawLinearGradientToMetafile( const tools::Rectangle& rRect, const Gradient& rGradient );
930  SAL_DLLPRIVATE void DrawComplexGradientToMetafile( const tools::Rectangle& rRect, const Gradient& rGradient );
931 
932  SAL_DLLPRIVATE tools::Long GetGradientSteps( const Gradient& rGradient, const tools::Rectangle& rRect, bool bMtf, bool bComplex=false );
933 
934  SAL_DLLPRIVATE Color GetSingleColorGradientFill();
935  SAL_DLLPRIVATE void SetGrayscaleColors( Gradient &rGradient );
937 
938 
941 
943 public:
944 
945 #ifdef _MSC_VER
946  void DrawHatch( const tools::PolyPolygon& rPolyPoly, const ::Hatch& rHatch );
947  void AddHatchActions( const tools::PolyPolygon& rPolyPoly,
948  const ::Hatch& rHatch,
949  GDIMetaFile& rMtf );
950 #else
951  void DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch& rHatch );
952  void AddHatchActions( const tools::PolyPolygon& rPolyPoly,
953  const Hatch& rHatch,
954  GDIMetaFile& rMtf );
955 #endif
956 
957  void DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch& rHatch, bool bMtf );
958 
959 private:
960 
961  SAL_DLLPRIVATE void CalcHatchValues( const tools::Rectangle& rRect, tools::Long nDist, Degree10 nAngle10, Point& rPt1, Point& rPt2, Size& rInc, Point& rEndPt1 );
962  SAL_DLLPRIVATE void DrawHatchLine( const tools::Line& rLine, const tools::PolyPolygon& rPolyPoly, Point* pPtBuffer, bool bMtf );
964 
965 
968 
970 public:
971  void DrawWallpaper( const tools::Rectangle& rRect, const Wallpaper& rWallpaper );
972 
973  void Erase();
974  void Erase(const tools::Rectangle& rRect);
975 
976 protected:
977  void DrawGradientWallpaper( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, const Wallpaper& rWallpaper );
978 
979 private:
980  SAL_DLLPRIVATE void DrawWallpaper( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, const Wallpaper& rWallpaper );
981  SAL_DLLPRIVATE void DrawColorWallpaper( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, const Wallpaper& rWallpaper );
982  SAL_DLLPRIVATE void DrawBitmapWallpaper( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, const Wallpaper& rWallpaper );
984 
985 
988 
990 public:
991 
992  void DrawText( const Point& rStartPt, const OUString& rStr,
993  sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
994  MetricVector* pVector = nullptr, OUString* pDisplayText = nullptr,
995  const SalLayoutGlyphs* pLayoutCache = nullptr );
996 
997  void DrawText( const tools::Rectangle& rRect,
998  const OUString& rStr, DrawTextFlags nStyle = DrawTextFlags::NONE,
999  MetricVector* pVector = nullptr, OUString* pDisplayText = nullptr,
1000  vcl::ITextLayout* _pTextLayout = nullptr );
1001 
1002  static void ImplDrawText( OutputDevice& rTargetDevice, const tools::Rectangle& rRect,
1003  const OUString& rOrigStr, DrawTextFlags nStyle,
1004  MetricVector* pVector, OUString* pDisplayText, vcl::ITextLayout& _rLayout );
1005 
1006  void ImplDrawText( SalLayout& );
1007 
1008  void ImplDrawTextBackground( const SalLayout& );
1009 
1010  void DrawCtrlText( const Point& rPos, const OUString& rStr,
1011  sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
1012  DrawTextFlags nStyle = DrawTextFlags::Mnemonic, MetricVector* pVector = nullptr, OUString* pDisplayText = nullptr,
1013  const SalLayoutGlyphs* pGlyphs = nullptr);
1014 
1015  void DrawTextLine( const Point& rPos, tools::Long nWidth,
1016  FontStrikeout eStrikeout,
1017  FontLineStyle eUnderline,
1018  FontLineStyle eOverline,
1019  bool bUnderlineAbove = false );
1020 
1022  FontStrikeout eStrikeout, FontLineStyle eUnderline,
1023  FontLineStyle eOverline, bool bUnderlineAbove );
1024 
1025  void ImplDrawTextLines( SalLayout&, FontStrikeout eStrikeout, FontLineStyle eUnderline,
1026  FontLineStyle eOverline, bool bWordLine, bool bUnderlineAbove );
1027 
1028  void DrawWaveLine( const Point& rStartPos, const Point& rEndPos, tools::Long nLineWidth = 1 );
1029 
1030  bool ImplDrawRotateText( SalLayout& );
1031 
1033  const OUString& rStr, DrawTextFlags nStyle = DrawTextFlags::WordBreak,
1034  TextRectInfo* pInfo = nullptr,
1035  const vcl::ITextLayout* _pTextLayout = nullptr ) const;
1036 
1086  bool GetTextBoundRect( tools::Rectangle& rRect,
1087  const OUString& rStr, sal_Int32 nBase = 0, sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
1088  sal_uLong nLayoutWidth = 0, const tools::Long* pDXArray = nullptr,
1089  const SalLayoutGlyphs* pGlyphs = nullptr ) const;
1090 
1092 
1094  const OUString& rStr ) const;
1095 
1097  const OUString& rStr, sal_Int32 nBase = 0, sal_Int32 nIndex = 0,
1098  sal_Int32 nLen = -1,
1099  sal_uLong nLayoutWidth = 0, const tools::Long* pDXArray = nullptr ) const;
1100 
1102  const OUString& rStr, sal_Int32 nBase, sal_Int32 nIndex = 0,
1103  sal_Int32 nLen = -1,
1104  sal_uLong nLayoutWidth = 0, const tools::Long* pDXArray = nullptr ) const;
1105 
1106 
1107  OUString GetEllipsisString( const OUString& rStr, tools::Long nMaxWidth,
1108  DrawTextFlags nStyle = DrawTextFlags::EndEllipsis ) const;
1109 
1110  tools::Long GetCtrlTextWidth( const OUString& rStr,
1111  const SalLayoutGlyphs* pLayoutCache = nullptr ) const;
1112 
1113  static OUString GetNonMnemonicString( const OUString& rStr, sal_Int32& rMnemonicPos );
1114 
1115  static OUString GetNonMnemonicString( const OUString& rStr )
1116  { sal_Int32 nDummy; return GetNonMnemonicString( rStr, nDummy ); }
1117 
1126  void AddTextRectActions( const tools::Rectangle& rRect,
1127  const OUString& rOrigStr,
1128  DrawTextFlags nStyle,
1129  GDIMetaFile& rMtf );
1130 
1131  void SetTextColor( const Color& rColor );
1132  const Color& GetTextColor() const { return maTextColor; }
1133 
1134  void SetTextFillColor();
1135  void SetTextFillColor( const Color& rColor );
1136  Color GetTextFillColor() const;
1137  bool IsTextFillColor() const { return !maFont.IsTransparent(); }
1138 
1139  void SetTextLineColor();
1140  void SetTextLineColor( const Color& rColor );
1141  const Color& GetTextLineColor() const { return maTextLineColor; }
1142  bool IsTextLineColor() const { return (maTextLineColor.GetTransparency() == 0); }
1143 
1144  void SetOverlineColor();
1145  void SetOverlineColor( const Color& rColor );
1146  const Color& GetOverlineColor() const { return maOverlineColor; }
1147  bool IsOverlineColor() const { return (maOverlineColor.GetTransparency() == 0); }
1148 
1149  void SetTextAlign( TextAlign eAlign );
1150  TextAlign GetTextAlign() const { return maFont.GetAlignment(); }
1151 
1156  tools::Long GetTextWidth( const OUString& rStr, sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
1157  vcl::TextLayoutCache const* = nullptr,
1158  SalLayoutGlyphs const*const pLayoutCache = nullptr) const;
1159 
1164  tools::Long GetTextHeight() const;
1165  float approximate_digit_width() const;
1166 
1167  void DrawTextArray( const Point& rStartPt, const OUString& rStr,
1168  const tools::Long* pDXAry,
1169  sal_Int32 nIndex = 0,
1170  sal_Int32 nLen = -1,
1172  const SalLayoutGlyphs* pLayoutCache = nullptr);
1173  tools::Long GetTextArray( const OUString& rStr, tools::Long* pDXAry,
1174  sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
1175  vcl::TextLayoutCache const* = nullptr,
1176  SalLayoutGlyphs const*const pLayoutCache = nullptr) const;
1177 
1178  void GetCaretPositions( const OUString&, tools::Long* pCaretXArray,
1179  sal_Int32 nIndex, sal_Int32 nLen,
1180  const SalLayoutGlyphs* pGlyphs = nullptr ) const;
1181  void DrawStretchText( const Point& rStartPt, sal_uLong nWidth,
1182  const OUString& rStr,
1183  sal_Int32 nIndex = 0, sal_Int32 nLen = -1);
1184  sal_Int32 GetTextBreak( const OUString& rStr, tools::Long nTextWidth,
1185  sal_Int32 nIndex, sal_Int32 nLen = -1,
1186  tools::Long nCharExtra = 0,
1187  vcl::TextLayoutCache const* = nullptr,
1188  const SalLayoutGlyphs* pGlyphs = nullptr) const;
1189  sal_Int32 GetTextBreak( const OUString& rStr, tools::Long nTextWidth,
1190  sal_Unicode nExtraChar, sal_Int32& rExtraCharPos,
1191  sal_Int32 nIndex, sal_Int32 nLen,
1192  tools::Long nCharExtra,
1193  vcl::TextLayoutCache const* = nullptr) const;
1194  static std::shared_ptr<vcl::TextLayoutCache> CreateTextLayoutCache(OUString const&);
1195 
1196 protected:
1197  SAL_DLLPRIVATE void ImplInitTextLineSize();
1198  SAL_DLLPRIVATE void ImplInitAboveTextLineSize();
1199  static
1200  SAL_DLLPRIVATE tools::Long ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo, tools::Long nWidth, const OUString& rStr, DrawTextFlags nStyle, const vcl::ITextLayout& _rLayout );
1201  SAL_DLLPRIVATE float approximate_char_width() const;
1202 private:
1203  SAL_DLLPRIVATE void ImplInitTextColor();
1204 
1205  SAL_DLLPRIVATE void ImplDrawTextDirect( SalLayout&, bool bTextLines);
1206  SAL_DLLPRIVATE void ImplDrawSpecialText( SalLayout& );
1207  SAL_DLLPRIVATE void ImplDrawTextRect( tools::Long nBaseX, tools::Long nBaseY, tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight );
1208 
1209  SAL_DLLPRIVATE static void ImplDrawWavePixel( tools::Long nOriginX, tools::Long nOriginY, tools::Long nCurX, tools::Long nCurY, Degree10 nOrientation, SalGraphics* pGraphics, OutputDevice const * pOutDev,
1210  bool bDrawPixAsRect, tools::Long nPixWidth, tools::Long nPixHeight );
1211  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 );
1212  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 );
1213  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 );
1214  SAL_DLLPRIVATE void ImplDrawStrikeoutLine( tools::Long nBaseX, tools::Long nBaseY, tools::Long nX, tools::Long nY, tools::Long nWidth, FontStrikeout eStrikeout, Color aColor );
1215  SAL_DLLPRIVATE void ImplDrawStrikeoutChar( tools::Long nBaseX, tools::Long nBaseY, tools::Long nX, tools::Long nY, tools::Long nWidth, FontStrikeout eStrikeout, Color aColor );
1216  SAL_DLLPRIVATE void ImplDrawMnemonicLine( tools::Long nX, tools::Long nY, tools::Long nWidth );
1217 
1218 
1220 
1221 
1224 
1226 public:
1227 
1228  FontMetric GetDevFont( int nDevFontIndex ) const;
1229  int GetDevFontCount() const;
1230 
1231  bool IsFontAvailable( const OUString& rFontName ) const;
1232 
1233  Size GetDevFontSize( const vcl::Font& rFont, int nSizeIndex ) const;
1234  int GetDevFontSizeCount( const vcl::Font& ) const;
1235 
1236  bool AddTempDevFont( const OUString& rFileURL, const OUString& rFontName );
1237  void RefreshFontData( const bool bNewFontLists );
1238 
1239  FontMetric GetFontMetric() const;
1240  FontMetric GetFontMetric( const vcl::Font& rFont ) const;
1241 
1242  bool GetFontCharMap( FontCharMapRef& rxFontCharMap ) const;
1243  bool GetFontCapabilities( vcl::FontCapabilities& rFontCapabilities ) const;
1244 
1245  bool GetFontFeatures(std::vector<vcl::font::Feature>& rFontFeatures) const;
1246 
1247  SAL_DLLPRIVATE void ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPolyLine, tools::Rectangle& rRect1, tools::Rectangle& rRect2,
1248  tools::Long& rYOff, tools::Long& rWidth, FontEmphasisMark eEmphasis, tools::Long nHeight );
1249  SAL_DLLPRIVATE static FontEmphasisMark
1250  ImplGetEmphasisMarkStyle( const vcl::Font& rFont );
1251 
1252  bool GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, int nIndex,
1253  int nLen, MetricVector& rVector );
1254 
1255  sal_Int32 HasGlyphs( const vcl::Font& rFont, const OUString& rStr,
1256  sal_Int32 nIndex = 0, sal_Int32 nLen = -1 ) const;
1257 
1258  tools::Long GetMinKashida() const;
1259 
1260  // i60594
1261  // validate kashida positions against the current font
1262  // returns count of invalid kashida positions
1263  sal_Int32 ValidateKashidas( const OUString& rTxt, sal_Int32 nIdx, sal_Int32 nLen,
1264  sal_Int32 nKashCount, // number of suggested kashida positions (in)
1265  const sal_Int32* pKashidaPos, // suggested kashida positions (in)
1266  sal_Int32* pKashidaPosDropped // invalid kashida positions (out)
1267  ) const;
1268 
1269  static void BeginFontSubstitution();
1270  static void EndFontSubstitution();
1271  static void AddFontSubstitute( const OUString& rFontName,
1272  const OUString& rReplaceFontName,
1273  AddFontSubstituteFlags nFlags );
1274  static void RemoveFontsSubstitute();
1275 
1277  LanguageType eLang,
1278  GetDefaultFontFlags nFlags,
1279  const OutputDevice* pOutDev = nullptr );
1280 
1281  SAL_DLLPRIVATE void ImplInitFontList() const;
1282  SAL_DLLPRIVATE void ImplUpdateFontData();
1283 
1284  //drop font data for all outputdevices.
1285  //If bNewFontLists is true then empty lists of system fonts
1286  SAL_DLLPRIVATE static void ImplClearAllFontData( bool bNewFontLists );
1287  //fetch font data for all outputdevices
1288  //If bNewFontLists is true then fetch lists of system fonts
1289  SAL_DLLPRIVATE static void ImplRefreshAllFontData( bool bNewFontLists );
1290  //drop and fetch font data for all outputdevices
1291  //If bNewFontLists is true then drop and refetch lists of system fonts
1292  SAL_DLLPRIVATE static void ImplUpdateAllFontData( bool bNewFontLists );
1293 
1294 protected:
1295  SAL_DLLPRIVATE const LogicalFontInstance* GetFontInstance() const;
1296  SAL_DLLPRIVATE tools::Long GetEmphasisAscent() const { return mnEmphasisAscent; }
1297  SAL_DLLPRIVATE tools::Long GetEmphasisDescent() const { return mnEmphasisDescent; }
1298 
1299  SAL_DLLPRIVATE bool InitFont() const;
1300  virtual void SetFontOrientation( LogicalFontInstance* const pFontInstance ) const;
1301  virtual tools::Long GetFontExtLeading() const;
1302 
1303  virtual void ImplClearFontData(bool bNewFontLists);
1304  virtual void ImplRefreshFontData(bool bNewFontLists);
1305  void ReleaseFontCache();
1306  void ReleaseFontCollection();
1308  void ResetNewFontCache();
1309 
1310 private:
1311 
1312  typedef void ( OutputDevice::* FontUpdateHandler_t )( bool );
1313 
1314  SAL_DLLPRIVATE bool ImplNewFont() const;
1315 
1316  SAL_DLLPRIVATE static void ImplUpdateFontDataForAllFrames( FontUpdateHandler_t pHdl, bool bNewFontLists );
1317 
1318  static
1319  SAL_DLLPRIVATE OUString ImplGetEllipsisString( const OutputDevice& rTargetDevice, const OUString& rStr,
1320  tools::Long nMaxWidth, DrawTextFlags nStyle, const vcl::ITextLayout& _rLayout );
1321 
1322  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 );
1323  SAL_DLLPRIVATE void ImplDrawEmphasisMarks( SalLayout& );
1325 
1326 
1329 
1331 public:
1332 
1333  // tells whether this output device is RTL in an LTR UI or LTR in a RTL UI
1334  SAL_DLLPRIVATE bool ImplIsAntiparallel() const ;
1335  SAL_DLLPRIVATE void ReMirror( Point &rPoint ) const;
1336  SAL_DLLPRIVATE void ReMirror( tools::Rectangle &rRect ) const;
1337  SAL_DLLPRIVATE void ReMirror( vcl::Region &rRegion ) const;
1338  SAL_DLLPRIVATE bool ImplIsRecordLayout() const;
1339  virtual bool HasMirroredGraphics() const;
1340  std::unique_ptr<SalLayout>
1341  ImplLayout( const OUString&, sal_Int32 nIndex, sal_Int32 nLen,
1342  const Point& rLogicPos = Point(0,0), tools::Long nLogicWidth=0,
1343  const tools::Long* pLogicDXArray=nullptr, SalLayoutFlags flags = SalLayoutFlags::NONE,
1344  vcl::TextLayoutCache const* = nullptr,
1345  const SalLayoutGlyphs* pGlyphs = nullptr) const;
1346  SAL_DLLPRIVATE ImplLayoutArgs ImplPrepareLayoutArgs( OUString&, const sal_Int32 nIndex, const sal_Int32 nLen,
1347  DeviceCoordinate nPixelWidth, const DeviceCoordinate* pPixelDXArray,
1349  vcl::TextLayoutCache const* = nullptr) const;
1350  SAL_DLLPRIVATE std::unique_ptr<SalLayout>
1351  ImplGlyphFallbackLayout( std::unique_ptr<SalLayout>, ImplLayoutArgs& ) const;
1352  SAL_DLLPRIVATE std::unique_ptr<SalLayout>
1354  LogicalFontInstance* pLogicalFont, int nFallbackLevel,
1355  ImplLayoutArgs& rLayoutArgs) const;
1356 
1357 
1358  // Enabling/disabling RTL only makes sense for OutputDevices that use a mirroring SalGraphicsLayout
1359  virtual void EnableRTL( bool bEnable = true);
1360  bool IsRTLEnabled() const { return mbEnableRTL; }
1361 
1362  bool GetTextIsRTL( const OUString&, sal_Int32 nIndex, sal_Int32 nLen ) const;
1363 
1365 
1366 
1369 
1371 public:
1372 
1382  void DrawBitmap(
1383  const Point& rDestPt,
1384  const Bitmap& rBitmap );
1385 
1395  void DrawBitmap(
1396  const Point& rDestPt,
1397  const Size& rDestSize,
1398  const Bitmap& rBitmap );
1399 
1400  void DrawBitmap(
1401  const Point& rDestPt,
1402  const Size& rDestSize,
1403  const Point& rSrcPtPixel,
1404  const Size& rSrcSizePixel,
1405  const Bitmap& rBitmap,
1407 
1417  void DrawBitmapEx(
1418  const Point& rDestPt,
1419  const BitmapEx& rBitmapEx );
1420 
1421 
1431  void DrawBitmapEx(
1432  const Point& rDestPt,
1433  const Size& rDestSize,
1434  const BitmapEx& rBitmapEx );
1435 
1436  void DrawBitmapEx(
1437  const Point& rDestPt,
1438  const Size& rDestSize,
1439  const Point& rSrcPtPixel,
1440  const Size& rSrcSizePixel,
1441  const BitmapEx& rBitmapEx,
1443 
1451  void DrawImage(
1452  const Point& rPos,
1453  const Image& rImage,
1455 
1456  void DrawImage(
1457  const Point& rPos,
1458  const Size& rSize,
1459  const Image& rImage,
1461 
1462 
1463  virtual Bitmap GetBitmap( const Point& rSrcPt, const Size& rSize ) const;
1464 
1467  BitmapEx GetBitmapEx( const Point& rSrcPt, const Size& rSize ) const;
1468 
1469 
1481  const basegfx::B2DHomMatrix& rTransformation,
1482  const BitmapEx& rBitmapEx);
1483 
1484  void DrawShadowBitmapEx(
1485  const BitmapEx& rBitmapEx,
1486  ::Color aShadowColor);
1487 protected:
1488 
1489  virtual void DrawDeviceBitmap(
1490  const Point& rDestPt, const Size& rDestSize,
1491  const Point& rSrcPtPixel, const Size& rSrcSizePixel,
1492  BitmapEx& rBitmapEx );
1493 
1494  virtual void ScaleBitmap ( Bitmap &rBmp, SalTwoRect &rPosAry );
1495 
1503  virtual bool DrawTransformBitmapExDirect(
1504  const basegfx::B2DHomMatrix& aFullTransform,
1505  const BitmapEx& rBitmapEx);
1506 
1519  const basegfx::B2DHomMatrix& aFullTransform,
1520  basegfx::B2DRange &aVisibleRange,
1521  double &fMaximumArea);
1522 
1523 private:
1524 
1525  SAL_DLLPRIVATE void DrawDeviceAlphaBitmap(
1526  const Bitmap& rBmp,
1527  const AlphaMask& rAlpha,
1528  const Point& rDestPt,
1529  const Size& rDestSize,
1530  const Point& rSrcPtPixel,
1531  const Size& rSrcSizePixel );
1532 
1533  SAL_DLLPRIVATE void DrawDeviceAlphaBitmapSlowPath(
1534  const Bitmap& rBitmap, const AlphaMask& rAlpha,
1535  tools::Rectangle aDstRect, tools::Rectangle aBmpRect,
1536  Size const & aOutSz, Point const & aOutPt);
1537 
1538 
1539  SAL_DLLPRIVATE void BlendBitmap(
1540  const SalTwoRect& rPosAry,
1541  const Bitmap& rBmp );
1542 
1543  SAL_DLLPRIVATE Bitmap BlendBitmap(
1544  Bitmap& aBmp,
1545  BitmapReadAccess const * pP,
1546  BitmapReadAccess const * pA,
1547  const sal_Int32 nOffY,
1548  const sal_Int32 nDstHeight,
1549  const sal_Int32 nOffX,
1550  const sal_Int32 nDstWidth,
1551  const tools::Rectangle& aBmpRect,
1552  const Size& aOutSz,
1553  const bool bHMirr,
1554  const bool bVMirr,
1555  const tools::Long* pMapX,
1556  const tools::Long* pMapY );
1557 
1558  SAL_DLLPRIVATE Bitmap BlendBitmapWithAlpha(
1559  Bitmap& aBmp,
1560  BitmapReadAccess const * pP,
1561  BitmapReadAccess const * pA,
1562  const tools::Rectangle& aDstRect,
1563  const sal_Int32 nOffY,
1564  const sal_Int32 nDstHeight,
1565  const sal_Int32 nOffX,
1566  const sal_Int32 nDstWidth,
1567  const tools::Long* pMapX,
1568  const tools::Long* pMapY );
1569 
1575  SAL_DLLPRIVATE Bitmap GetDownsampledBitmap(
1576  const Size& rDstSz,
1577  const Point& rSrcPt,
1578  const Size& rSrcSz,
1579  const Bitmap& rBmp,
1580  tools::Long nMaxBmpDPIX,
1581  tools::Long nMaxBmpDPIY );
1582 
1584 
1585 
1588 
1590 public:
1591 
1603  const GDIMetaFile& rInMtf, GDIMetaFile& rOutMtf,
1604  tools::Long nMaxBmpDPIX, tools::Long nMaxBmpDPIY,
1605  bool bReduceTransparency,
1606  bool bTransparencyAutoMode,
1607  bool bDownsampleBitmaps,
1608  const Color& rBackground = COL_TRANSPARENT );
1609 
1610  SAL_DLLPRIVATE void ImplPrintTransparent (
1611  const Bitmap& rBmp, const Bitmap& rMask,
1612  const Point& rDestPt, const Size& rDestSize,
1613  const Point& rSrcPtPixel, const Size& rSrcSizePixel );
1614 
1615  SAL_DLLPRIVATE Color ImplDrawModeToColor ( const Color& rColor ) const;
1616 
1617 
1618  void DrawTransparent( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent );
1619 
1620  void DrawTransparent(
1621  const basegfx::B2DHomMatrix& rObjectTransform,
1622  const basegfx::B2DPolyPolygon& rB2DPolyPoly,
1623  double fTransparency);
1624 
1625  void DrawTransparent(
1626  const GDIMetaFile& rMtf, const Point& rPos, const Size& rSize,
1627  const Gradient& rTransparenceGradient );
1628 
1629 protected:
1630 
1631  virtual void EmulateDrawTransparent( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent );
1632  void DrawInvisiblePolygon( const tools::PolyPolygon& rPolyPoly );
1633 
1634  virtual void ClipAndDrawGradientMetafile ( const Gradient &rGradient, const tools::PolyPolygon &rPolyPoly );
1635 
1636 private:
1637 
1638  SAL_DLLPRIVATE bool DrawTransparentNatively( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent );
1640 
1641 
1644 
1646 public:
1647 
1648  void DrawMask( const Point& rDestPt,
1649  const Bitmap& rBitmap, const Color& rMaskColor );
1650 
1651  void DrawMask( const Point& rDestPt, const Size& rDestSize,
1652  const Bitmap& rBitmap, const Color& rMaskColor );
1653 
1654  void DrawMask( const Point& rDestPt, const Size& rDestSize,
1655  const Point& rSrcPtPixel, const Size& rSrcSizePixel,
1656  const Bitmap& rBitmap, const Color& rMaskColor,
1657  MetaActionType nAction );
1658 
1659 protected:
1660 
1661  virtual void DrawDeviceMask (
1662  const Bitmap& rMask, const Color& rMaskColor,
1663  const Point& rDestPt, const Size& rDestSize,
1664  const Point& rSrcPtPixel, const Size& rSrcSizePixel );
1666 
1667 
1670 
1672 public:
1673 
1674  void EnableMapMode( bool bEnable = true );
1675  bool IsMapModeEnabled() const { return mbMap; }
1676 
1677  void SetMapMode();
1678  virtual void SetMapMode( const MapMode& rNewMapMode );
1679  void SetRelativeMapMode( const MapMode& rNewMapMode );
1680  virtual void SetMetafileMapMode(const MapMode& rNewMapMode, bool bIsRecord);
1681  const MapMode& GetMapMode() const { return maMapMode; }
1682 
1683 protected:
1684  virtual void ImplInitMapModeObjects();
1685 
1686 public:
1687  // #i75163#
1690 
1691  basegfx::B2DHomMatrix GetViewTransformation( const MapMode& rMapMode ) const;
1693 
1694 
1717  void SetPixelOffset( const Size& rOffset );
1718 
1725  Size GetPixelOffset() const { return Size(mnOutOffOrigX, mnOutOffOrigY);}
1726 
1727  Point LogicToPixel( const Point& rLogicPt ) const;
1728  Size LogicToPixel( const Size& rLogicSize ) const;
1729  tools::Rectangle LogicToPixel( const tools::Rectangle& rLogicRect ) const;
1730  tools::Polygon LogicToPixel( const tools::Polygon& rLogicPoly ) const;
1731  tools::PolyPolygon LogicToPixel( const tools::PolyPolygon& rLogicPolyPoly ) const;
1732  basegfx::B2DPolyPolygon LogicToPixel( const basegfx::B2DPolyPolygon& rLogicPolyPoly ) const;
1733  vcl::Region LogicToPixel( const vcl::Region& rLogicRegion )const;
1734  Point LogicToPixel( const Point& rLogicPt,
1735  const MapMode& rMapMode ) const;
1736  Size LogicToPixel( const Size& rLogicSize,
1737  const MapMode& rMapMode ) const;
1738  tools::Rectangle LogicToPixel( const tools::Rectangle& rLogicRect,
1739  const MapMode& rMapMode ) const;
1740  tools::Polygon LogicToPixel( const tools::Polygon& rLogicPoly,
1741  const MapMode& rMapMode ) const;
1743  const MapMode& rMapMode ) const;
1744 
1745  Point PixelToLogic( const Point& rDevicePt ) const;
1746  Size PixelToLogic( const Size& rDeviceSize ) const;
1747  tools::Rectangle PixelToLogic( const tools::Rectangle& rDeviceRect ) const;
1748  tools::Polygon PixelToLogic( const tools::Polygon& rDevicePoly ) const;
1749  tools::PolyPolygon PixelToLogic( const tools::PolyPolygon& rDevicePolyPoly ) const;
1750  basegfx::B2DPolyPolygon PixelToLogic( const basegfx::B2DPolyPolygon& rDevicePolyPoly ) const;
1751  vcl::Region PixelToLogic( const vcl::Region& rDeviceRegion ) const;
1752  Point PixelToLogic( const Point& rDevicePt,
1753  const MapMode& rMapMode ) const;
1754  Size PixelToLogic( const Size& rDeviceSize,
1755  const MapMode& rMapMode ) const;
1756  tools::Rectangle PixelToLogic( const tools::Rectangle& rDeviceRect,
1757  const MapMode& rMapMode ) const;
1758  tools::Polygon PixelToLogic( const tools::Polygon& rDevicePoly,
1759  const MapMode& rMapMode ) const;
1761  const MapMode& rMapMode ) const;
1763  const MapMode& rMapMode ) const;
1764 
1765  Point LogicToLogic( const Point& rPtSource,
1766  const MapMode* pMapModeSource,
1767  const MapMode* pMapModeDest ) const;
1768  Size LogicToLogic( const Size& rSzSource,
1769  const MapMode* pMapModeSource,
1770  const MapMode* pMapModeDest ) const;
1771  tools::Rectangle LogicToLogic( const tools::Rectangle& rRectSource,
1772  const MapMode* pMapModeSource,
1773  const MapMode* pMapModeDest ) const;
1774  static Point LogicToLogic( const Point& rPtSource,
1775  const MapMode& rMapModeSource,
1776  const MapMode& rMapModeDest );
1777  static Size LogicToLogic( const Size& rSzSource,
1778  const MapMode& rMapModeSource,
1779  const MapMode& rMapModeDest );
1780  static tools::Rectangle LogicToLogic( const tools::Rectangle& rRectSource,
1781  const MapMode& rMapModeSource,
1782  const MapMode& rMapModeDest );
1783  static tools::Long LogicToLogic( tools::Long nLongSource,
1784  MapUnit eUnitSource,
1785  MapUnit eUnitDest );
1786 
1788  const MapMode& rMapModeSource,
1789  const MapMode& rMapModeDest );
1790 
1791  // create a mapping transformation from rMapModeSource to rMapModeDest (the above methods
1792  // for B2DPoly/Polygons use this internally anyway to transform the B2DPolygon)
1793  static basegfx::B2DHomMatrix LogicToLogic(const MapMode& rMapModeSource, const MapMode& rMapModeDest);
1794 
1801  SAL_DLLPRIVATE tools::Rectangle ImplLogicToDevicePixel( const tools::Rectangle& rLogicRect ) const;
1802 
1809  SAL_DLLPRIVATE Point ImplLogicToDevicePixel( const Point& rLogicPt ) const;
1810 
1821  SAL_DLLPRIVATE tools::Long ImplLogicWidthToDevicePixel( tools::Long nWidth ) const;
1822 
1823  SAL_DLLPRIVATE DeviceCoordinate LogicWidthToDeviceCoordinate( tools::Long nWidth ) const;
1824 
1836  SAL_DLLPRIVATE tools::Long ImplLogicXToDevicePixel( tools::Long nX ) const;
1837 
1849  SAL_DLLPRIVATE tools::Long ImplLogicYToDevicePixel( tools::Long nY ) const;
1850 
1861  SAL_DLLPRIVATE tools::Long ImplLogicHeightToDevicePixel( tools::Long nHeight ) const;
1862 
1872  SAL_DLLPRIVATE tools::Long ImplDevicePixelToLogicWidth( tools::Long nWidth ) const;
1873 
1883  SAL_DLLPRIVATE tools::Long ImplDevicePixelToLogicHeight( tools::Long nHeight ) const;
1884 
1894  SAL_DLLPRIVATE float ImplFloatLogicHeightToDevicePixel( float fLogicHeight ) const;
1895 
1902  SAL_DLLPRIVATE Size ImplLogicToDevicePixel( const Size& rLogicSize ) const;
1903 
1910  SAL_DLLPRIVATE tools::Rectangle ImplDevicePixelToLogic( const tools::Rectangle& rPixelRect ) const;
1911 
1918  SAL_DLLPRIVATE tools::Polygon ImplLogicToDevicePixel( const tools::Polygon& rLogicPoly ) const;
1919 
1926  SAL_DLLPRIVATE tools::PolyPolygon ImplLogicToDevicePixel( const tools::PolyPolygon& rLogicPolyPoly ) const;
1927 
1934  SAL_DLLPRIVATE LineInfo ImplLogicToDevicePixel( const LineInfo& rLineInfo ) const;
1935 
1942  SAL_DLLPRIVATE vcl::Region ImplPixelToDevicePixel( const vcl::Region& rRegion ) const;
1943 
1948  SAL_DLLPRIVATE void ImplInvalidateViewTransform();
1949 
1954  SAL_DLLPRIVATE basegfx::B2DHomMatrix ImplGetDeviceTransformation() const;
1956 
1957 
1962 
1964 public:
1965 
1968  bool IsNativeControlSupported( ControlType nType, ControlPart nPart ) const;
1969 
1973  ControlPart nPart,
1974  const tools::Rectangle& rControlRegion,
1975  const Point& aPos,
1976  bool& rIsInside ) const;
1977 
1980  bool DrawNativeControl(
1981  ControlType nType,
1982  ControlPart nPart,
1983  const tools::Rectangle& rControlRegion,
1984  ControlState nState,
1985  const ImplControlValue& aValue,
1986  const OUString& aCaption,
1987  const Color& rBackgroundColor = COL_AUTO );
1988 
1992  ControlType nType,
1993  ControlPart nPart,
1994  const tools::Rectangle& rControlRegion,
1995  ControlState nState,
1996  const ImplControlValue& aValue,
1997  tools::Rectangle &rNativeBoundingRegion,
1998  tools::Rectangle &rNativeContentRegion ) const;
2000 
2003 
2005 public:
2006 
2012  bool DrawEPS(
2013  const Point& rPt, const Size& rSz,
2014  const GfxLink& rGfxLink, GDIMetaFile* pSubst = nullptr );
2016 };
2017 
2018 #endif // INCLUDED_VCL_OUTDEV_HXX
2019 
2020 /* 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:770
VclReferenceBase & operator=(const VclReferenceBase &)=delete
vcl::Region GetClipRegion() const
const Color & GetTextColor() const
Definition: outdev.hxx:1132
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:795
OutDevType GetOutDevType() const
Definition: outdev.hxx:523
sal_Int32 mnDPIScalePercentage
For HiDPI displays, we want to draw elements for a percentage larger.
Definition: outdev.hxx:347
virtual void Flush()
Definition: outdev.hxx:546
void SetDigitLanguage(LanguageType)
SAL_DLLPRIVATE float approximate_char_width() const
Definition: text.cxx:916
VclPtr< OutputDevice > mpNextGraphics
Next output device in list.
Definition: outdev.hxx:316
tools::SvRef< FontCharMap > FontCharMapRef
Definition: outdev.hxx:282
virtual Color GetMonochromeButtonColor()
Definition: outdev.hxx:539
void SetPixelOffset(const Size &rOffset)
Set an offset in pixel.
Definition: map.cxx:1750
SAL_DLLPRIVATE DeviceCoordinate LogicWidthToDeviceCoordinate(tools::Long nWidth) const
Definition: map.cxx:1765
static vcl::Font GetDefaultFont(DefaultFontType nType, LanguageType eLang, GetDefaultFontFlags nFlags, const OutputDevice *pOutDev=nullptr)
const Wallpaper & GetBackground() const
Definition: outdev.hxx:642
bool GetFontCharMap(FontCharMapRef &rxFontCharMap) const
Definition: hatch.hxx:46
virtual tools::Long GetGradientStepCount(tools::Long nMinRect)
void SetRelativeMapMode(const MapMode &rNewMapMode)
Definition: map.cxx:672
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:349
tools::Long mnOutOffLogicX
Additional output offset in logical coordinates, applied in PixelToLogic (used by SetPixelOffset/GetP...
Definition: outdev.hxx:334
SAL_DLLPRIVATE bool ImplIsRecordLayout() const
Definition: outdev.cxx:636
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:137
SAL_DLLPRIVATE tools::Long GetEmphasisAscent() const
Definition: outdev.hxx:1296
tools::Long mnOutOffOrigY
Additional output pixel offset, applied in LogicToPixel (used by SetPixelOffset/GetPixelOffset) ...
Definition: outdev.hxx:336
virtual bool UsePolyPolygonForComplexGradient() override
Definition: window.cxx:3826
sal_uInt32 GetGCStackDepth() const
OutputDevice(const OutputDevice &)=delete
bool mbOutput
Definition: outdev.hxx:376
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:178
Color maTextColor
Definition: outdev.hxx:362
DrawModeFlags
Definition: outdev.hxx:198
const Point & GetRefPoint() const
Definition: outdev.hxx:433
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:1635
void ImplClearFontData(bool bNewFontLists) override
Definition: window3.cxx:42
Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
Definition: map.cxx:1514
virtual void CopyDeviceArea(SalTwoRect &aPosAry, bool bWindowInvalidate) override
Definition: window.cxx:1225
virtual ~OutputDevice() override
Definition: outdev.cxx:131
const Color & GetTextLineColor() const
Definition: outdev.hxx:1141
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:389
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:2069
static SAL_DLLPRIVATE void ImplUpdateFontDataForAllFrames(FontUpdateHandler_t pHdl, bool bNewFontLists)
bool IsBackground() const
Definition: outdev.hxx:645
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:353
Color maLineColor
Definition: outdev.hxx:359
sal_uInt8 GetTransparency() const
sal_uIntPtr sal_uLong
long Long
static void EndFontSubstitution()
TextAlign GetTextAlign() const
Definition: outdev.hxx:1150
static SAL_DLLPRIVATE OUString ImplGetEllipsisString(const OutputDevice &rTargetDevice, const OUString &rStr, tools::Long nMaxWidth, DrawTextFlags nStyle, const vcl::ITextLayout &_rLayout)
Definition: text.cxx:1944
bool IsOutputEnabled() const
Definition: outdev.hxx:599
FontEmphasisMark
SAL_DLLPRIVATE void SetDPIX(sal_Int32 nDPIX)
Definition: outdev.hxx:510
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:1386
bool IsMapModeEnabled() const
Definition: outdev.hxx:1675
bool IsTextLineColor() const
Definition: outdev.hxx:1142
tools::Long GetOutOffXPixel() const
Definition: outdev.hxx:444
vcl::Region maRegion
Definition: outdev.hxx:358
SAL_DLLPRIVATE std::unique_ptr< SalLayout > getFallbackLayout(LogicalFontInstance *pLogicalFont, int nFallbackLevel, ImplLayoutArgs &rLayoutArgs) const
bool mbOutputClipped
Definition: outdev.hxx:378
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:342
SAL_DLLPRIVATE void ImplInitTextColor()
Definition: text.cxx:75
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:320
ComplexTextLayoutFlags GetLayoutMode() const
Definition: outdev.hxx:609
SAL_DLLPRIVATE bool is_double_buffered_window() const
const MapMode & GetMapMode() const
Definition: outdev.hxx:1681
void SetTextFillColor()
Definition: text.cxx:701
sal_Int32 mnDPIY
Definition: outdev.hxx:346
SAL_DLLPRIVATE Color ImplDrawModeToColor(const Color &rColor) const
Definition: transparent.cxx:79
std::vector< VCLXGraphics * > * mpUnoGraphicsList
Definition: outdev.hxx:325
SAL_DLLPRIVATE void DrawLinearGradientToMetafile(const tools::Rectangle &rRect, const Gradient &rGradient)
void SetLayoutMode(ComplexTextLayoutFlags nTextLayoutMode)
std::unique_ptr< ImplDeviceFontSizeList > mpDeviceFontSizeList
Definition: outdev.hxx:322
void IntersectClipRegion(const tools::Rectangle &rRect)
GDIMetaFile * GetConnectMetaFile() const
Definition: outdev.hxx:414
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:345
void ReleaseFontCollection()
SAL_DLLPRIVATE void ImplDrawSpecialText(SalLayout &)
Definition: text.cxx:318
virtual void SetSettings(const AllSettings &rSettings) override
void EnableMapMode(bool bEnable=true)
Definition: map.cxx:538
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:333
bool mbMap
Definition: outdev.hxx:373
SAL_DLLPRIVATE const LogicalFontInstance * GetFontInstance() const
std::vector< VCLXGraphics * > * CreateUnoGraphicsList()
Definition: outdev.cxx:325
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:391
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:546
AntialiasingFlags GetAntialiasing() const
Definition: outdev.hxx:603
tools::Long mnEmphasisDescent
Definition: outdev.hxx:352
tools::Long mnOutOffOrigX
Additional output pixel offset, applied in LogicToPixel (used by SetPixelOffset/GetPixelOffset) ...
Definition: outdev.hxx:332
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:165
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:929
OutDevSupportType
Definition: vclenum.hxx:198
Color GetBackgroundColor() const override
Definition: window.cxx:588
FontAlign GetAlignment() const
Definition: font/font.cxx:669
bool SelectClipRegion(const vcl::Region &, SalGraphics *pGraphics=nullptr)
MapMode maMapMode
Definition: outdev.hxx:368
void SetDrawMode(DrawModeFlags nDrawMode)
void DrawWallpaper(const tools::Rectangle &rRect, const Wallpaper &rWallpaper)
Definition: wallpaper.cxx:42
const Color & GetOverlineColor() const
Definition: outdev.hxx:1146
SAL_DLLPRIVATE void ImplInitFontList() const
void ImplDrawTextBackground(const SalLayout &)
Definition: text.cxx:145
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:1808
Color GetTextFillColor() const
Definition: text.cxx:759
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:459
sal_uInt16 sal_Unicode
static OUString GetNonMnemonicString(const OUString &rStr)
Definition: outdev.hxx:1115
Color maOverlineColor
Definition: outdev.hxx:364
void SetBackground()
void DrawStretchText(const Point &rStartPt, sal_uLong nWidth, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1)
Definition: text.cxx:1126
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:242
void SetOutOffYPixel(tools::Long nOutOffY)
Definition: outdev.cxx:314
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:599
SAL_DLLPRIVATE tools::Long ImplLogicXToDevicePixel(tools::Long nX) const
Convert a logical X coordinate to a device pixel's X coordinate.
Definition: map.cxx:326
SAL_DLLPRIVATE void DrawLinearGradient(const tools::Rectangle &rRect, const Gradient &rGradient, const tools::PolyPolygon *pClipPolyPoly)
const vcl::Font & GetFont() const
Definition: outdev.hxx:648
RasterOp
Definition: vclenum.hxx:194
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:357
OUString GetEllipsisString(const OUString &rStr, tools::Long nMaxWidth, DrawTextFlags nStyle=DrawTextFlags::EndEllipsis) const
Definition: text.cxx:1937
void RefreshFontData(const bool bNewFontLists)
SAL_DLLPRIVATE void BlendBitmap(const SalTwoRect &rPosAry, const Bitmap &rBmp)
AntialiasingFlags mnAntialiasing
Definition: outdev.hxx:370
bool mbBackground
Definition: outdev.hxx:375
bool GetTextOutline(tools::PolyPolygon &, const OUString &rStr) const
Definition: text.cxx:2436
virtual Bitmap GetBitmap(const Point &rSrcPt, const Size &rSize) const
PushFlags
Definition: outdevstate.hxx:38
FontMetric GetFontMetric() const
MetaActionType
tools::Long GetCtrlTextWidth(const OUString &rStr, const SalLayoutGlyphs *pLayoutCache=nullptr) const
Definition: text.cxx:2212
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:386
SystemGraphicsData GetSystemGfxData() const
Definition: outdev.cxx:216
void SetFontCollectionFromSVData()
Color maFillColor
Definition: outdev.hxx:360
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()
GetDefaultFontFlags
Definition: outdev.hxx:254
bool AddTempDevFont(const OUString &rFileURL, const OUString &rFontName)
void SetTextLineColor()
Definition: textline.cxx:800
virtual void DrawOutDevDirectProcess(const OutputDevice *pSrcDev, SalTwoRect &rPosAry, SalGraphics *pSrcGraphics) override
Definition: window.cxx:1266
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:367
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:2415
SalGraphics * mpGraphics
Graphics context to draw on.
Definition: outdev.hxx:314
void DrawShadowBitmapEx(const BitmapEx &rBitmapEx,::Color aShadowColor)
SAL_DLLPRIVATE bool DrawTransparentNatively(const tools::PolyPolygon &rPolyPoly, sal_uInt16 nTransparencePercent)
SAL_DLLPRIVATE basegfx::B2DHomMatrix ImplGetDeviceTransformation() const
Get device transformation.
Definition: map.cxx:819
std::shared_ptr< Surface > SurfaceSharedPtr
Definition: cairo.hxx:36
static SAL_DLLPRIVATE void ImplDrawWavePixel(tools::Long nOriginX, tools::Long nOriginY, tools::Long nCurX, tools::Long nCurY, Degree10 nOrientation, SalGraphics *pGraphics, OutputDevice const *pOutDev, bool bDrawPixAsRect, tools::Long nPixWidth, tools::Long nPixHeight)
Definition: textline.cxx:50
std::vector< OutDevState > maOutDevStateStack
Definition: outdev.hxx:323
virtual void CopyArea(const Point &rDestPt, const Point &rSrcPt, const Size &rSrcSize, bool bWindowInvalidate=false)
Definition: outdev.cxx:461
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
FontMetric GetDevFont(int nDevFontIndex) const
Definition: outdev/font.cxx:47
bool IsTextFillColor() const
Definition: outdev.hxx:1137
SAL_DLLPRIVATE void ImplInvalidateViewTransform()
Invalidate the view transformation.
Definition: map.cxx:254
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:273
void SetConnectMetaFile(GDIMetaFile *pMtf)
Definition: outdev.cxx:203
bool IsRTLEnabled() const
Definition: outdev.hxx:1360
static std::shared_ptr< vcl::TextLayoutCache > CreateTextLayoutCache(OUString const &)
Definition: text.cxx:1369
Wallpaper maBackground
Definition: outdev.hxx:366
virtual tools::Rectangle GetBackgroundComponentBounds() const
Definition: outdev.cxx:568
SAL_DLLPRIVATE float ImplFloatLogicHeightToDevicePixel(float fLogicHeight) const
Convert logical height to device pixels, with exact sub-pixel value.
Definition: map.cxx:360
bool IsClipRegion() const
Definition: outdev.hxx:674
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:443
OutDevType
Definition: outdev.hxx:276
bool IsLineColor() const
Definition: outdev.hxx:630
SAL_DLLPRIVATE void DrawHatchLine(const tools::Line &rLine, const tools::PolyPolygon &rPolyPoly, Point *pPtBuffer, bool bMtf)
float approximate_digit_width() const
Definition: text.cxx:924
ComplexTextLayoutFlags
Definition: outdevstate.hxx:66
std::unique_ptr< ImplDeviceFontList > mpDeviceFontList
Definition: outdev.hxx:321
void DrawTransparent(const tools::PolyPolygon &rPolyPoly, sal_uInt16 nTransparencePercent)
SAL_DLLPRIVATE void ImplDrawTextDirect(SalLayout &, bool bTextLines)
Definition: text.cxx:275
SAL_DLLPRIVATE bool ImplIsAntiparallel() const
Definition: outdev.cxx:583
SAL_DLLPRIVATE void ImplInitAboveTextLineSize()
Definition: textline.cxx:45
Size GetOutputSize() const
Definition: outdev.hxx:449
virtual void SetFontOrientation(LogicalFontInstance *const pFontInstance) const
bool mbInitLineColor
Definition: outdev.hxx:381
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:86
const OutDevType meOutDevType
Definition: outdev.hxx:356
void SetFillColor()
tools::Long mnOutHeight
Definition: outdev.hxx:344
bool mbNewFont
Definition: outdev.hxx:387
AntialiasingFlags
Definition: outdev.hxx:229
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:302
const Color & GetLineColor() const
Definition: outdev.hxx:629
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:344
virtual void ClipToPaintRegion(tools::Rectangle &rDstRect) override
bool mbTextLines
Definition: outdev.hxx:388
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:666
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:37
void(OutputDevice::* FontUpdateHandler_t)(bool)
Definition: outdev.hxx:1312
std::vector< tools::PolyPolygon > PolyPolyVector
VCL_DLLPUBLIC void DrawFocusRect(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect)
Definition: window2.cxx:1989
vcl::Font maFont
Definition: outdev.hxx:361
void AddGradientActions(const tools::Rectangle &rRect, const Gradient &rGradient, GDIMetaFile &rMtf)
bool ImplDrawRotateText(SalLayout &)
Definition: text.cxx:203
bool mbLineColor
Definition: outdev.hxx:379
constexpr double deg2rad(double v)
void SetOverlineColor()
Definition: textline.cxx:849
virtual const OutputDevice * DrawOutDevDirectCheck(const OutputDevice *pSrcDev) const override
Definition: window.cxx:1251
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:365
const AllSettings & GetSettings() const
Definition: outdev.hxx:417
Size GetOutputSizePixel() const
Definition: outdev.hxx:440
DrawTextFlags
Definition: outdev.hxx:142
void MoveClipRegion(tools::Long nHorzMove, tools::Long nVertMove)
bool mbInitTextColor
Definition: outdev.hxx:384
css::uno::Any GetSystemGfxDataAny() const
Definition: outdev.cxx:264
Color maTextLineColor
Definition: outdev.hxx:363
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:662
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:300
DrawModeFlags GetDrawMode() const
Definition: outdev.hxx:606
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:185
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:351
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:1253
virtual void DrawHatchLine_DrawLine(const Point &rStartPoint, const Point &rEndPoint)
TextAlign
bool mbRefPoint
Definition: outdev.hxx:390
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:151
float GetDPIScaleFactor() const
Definition: outdev.hxx:513
tools::Long GetOutOffYPixel() const
Definition: outdev.hxx:445
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)
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:454
SAL_DLLPRIVATE void SetGrayscaleColors(Gradient &rGradient)
void GetCaretPositions(const OUString &, tools::Long *pCaretXArray, sal_Int32 nIndex, sal_Int32 nLen, const SalLayoutGlyphs *pGlyphs=nullptr) const
Definition: text.cxx:1071
Point PixelToLogic(const Point &rDevicePt) const
Definition: map.cxx:1049
Point LogicToPixel(const Point &rLogicPt) const
Definition: map.cxx:828
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:315
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:1153
SalLayoutFlags
Definition: outdev.hxx:119
bool mbFillColor
Definition: outdev.hxx:380
VclPtr< VirtualDevice > mpAlphaVDev
Definition: outdev.hxx:329
SAL_DLLPRIVATE tools::Long GetEmphasisDescent() const
Definition: outdev.hxx:1297
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:528
bool IsRefPoint() const
Definition: outdev.hxx:434
ImplMapRes maMapRes
Definition: outdev.hxx:355
bool mbClipRegion
Definition: outdev.hxx:374
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
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:532
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:290
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:612
virtual void EnableRTL(bool bEnable=true) override
OutDevViewType GetOutDevViewType() const
Definition: outdev.hxx:625
bool mbInitClipRegion
Definition: outdev.hxx:385
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:903
static void ImplDrawText(OutputDevice &rTargetDevice, const tools::Rectangle &rRect, const OUString &rOrigStr, DrawTextFlags nStyle, MetricVector *pVector, OUString *pDisplayText, vcl::ITextLayout &_rLayout)
Definition: text.cxx:1472
SAL_DLLPRIVATE void ImplDrawEmphasisMarks(SalLayout &)
SAL_DLLPRIVATE void ImplUpdateFontData()
bool IsTransparent() const
Definition: font/font.cxx:667
void SetRasterOp(RasterOp eRasterOp)
void SetOutOffXPixel(tools::Long nOutOffX)
Definition: outdev.cxx:309
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:646
SalGraphics const * GetGraphics() const
Get the graphic context that the output device uses to draw on.
Definition: outdev.cxx:193
virtual void ScaleBitmap(Bitmap &rBmp, SalTwoRect &rPosAry)
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:892
css::uno::Reference< css::awt::XGraphics > CreateUnoGraphics()
Definition: outdev.cxx:319
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:265
sal_Int32 GetDPIScalePercentage() const
Definition: outdev.hxx:518
void AddHatchActions(const tools::PolyPolygon &rPolyPoly, const Hatch &rHatch, GDIMetaFile &rMtf)
virtual Size GetButtonBorderSize()
Definition: outdev.hxx:538
SAL_DLLPRIVATE void SetDPIY(sal_Int32 nDPIY)
Definition: outdev.hxx:511
bool mbInitFont
Definition: outdev.hxx:383
RasterOp GetRasterOp() const
Definition: outdev.hxx:615
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:343
bool GetTextIsRTL(const OUString &, sal_Int32 nIndex, sal_Int32 nLen) const
Definition: text.cxx:1375
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:318
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:1730
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:382
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:343
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:2264
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:406
ComplexTextLayoutFlags mnTextLayoutMode
Definition: outdev.hxx:354
bool mbDevOutput
Definition: outdev.hxx:377
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:1725
void SetOutDevViewType(OutDevViewType eOutDevViewType)
If this OutputDevice is used for displaying a Print Preview the OutDevViewType should be set to 'OutD...
Definition: outdev.hxx:624
std::shared_ptr< ImplFontCache > mxFontCache
Definition: outdev.hxx:319
MapUnit
tools::Long mnOutOffX
Output offset for device output in pixel (pseudo window offset within window system's frames) ...
Definition: outdev.hxx:340
std::unique_ptr< ImplOutDevData > mpOutDevData
Definition: outdev.hxx:324
vcl::ExtOutDevData * GetExtOutDevData() const
Definition: outdev.hxx:533
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:507
SAL_DLLPRIVATE tools::Long ImplLogicYToDevicePixel(tools::Long nY) const
Convert a logical Y coordinate to a device pixel's Y coordinate.
Definition: map.cxx:335
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:326
virtual bool DrawTransformBitmapExDirect(const basegfx::B2DHomMatrix &aFullTransform, const BitmapEx &rBitmapEx)
Transform and draw a bitmap directly.
bool IsFillColor() const
Definition: outdev.hxx:635
virtual bool AcquireGraphics() const override
Acquire a graphics device that the output device uses to draw on.
Definition: window.cxx:820
tools::Long mnOutOffLogicY
Additional output offset in logical coordinates, applied in PixelToLogic (used by SetPixelOffset/GetP...
Definition: outdev.hxx:338
bool IsOverlineColor() const
Definition: outdev.hxx:1147
virtual size_t GetSyncCount() const
Definition: outdev.hxx:457
OutDevViewType
Definition: outdev.hxx:278
Color GetPixel(const Point &rPt) const
Definition: pixel.cxx:29
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:368
static SAL_DLLPRIVATE void ImplClearAllFontData(bool bNewFontLists)
static OUString GetNonMnemonicString(const OUString &rStr, sal_Int32 &rMnemonicPos)
Definition: text.cxx:2229
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:600
void Push(PushFlags nFlags=PushFlags::ALL)
Definition: outdevstate.cxx:60
Point maRefPoint
Definition: outdev.hxx:369
void DrawGradient(const tools::Rectangle &rRect, const Gradient &rGradient)
virtual void ImplReleaseFonts()
basegfx::B2DHomMatrix GetViewTransformation() const
Definition: map.cxx:742
SAL_DLLPRIVATE tools::Long ImplLogicHeightToDevicePixel(tools::Long nHeight) const
Convert a logical height to a height in units of device pixels.
Definition: map.cxx:352
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:962
SAL_DLLPRIVATE sal_Int32 GetDPIY() const
Get the output device's DPI y-axis value.
Definition: outdev.hxx:508
SAL_DLLPRIVATE tools::Long ImplDevicePixelToLogicHeight(tools::Long nHeight) const
Convert device pixels to a height in logical units.
Definition: map.cxx:376
virtual void ClipAndDrawGradientMetafile(const Gradient &rGradient, const tools::PolyPolygon &rPolyPoly)
DrawImageFlags
Definition: outdev.hxx:170
tools::Long GetOutputWidthPixel() const
Definition: outdev.hxx:442
tools::Long mnTextOffY
Definition: outdev.hxx:350
FontStrikeout
SAL_DLLPRIVATE sal_Int32 GetDPIX() const
Get the output device's DPI x-axis value.
Definition: outdev.hxx:502
void SetTextAlign(TextAlign eAlign)
Definition: text.cxx:767
virtual bool IsScreenComp() const
Definition: outdev.hxx:436
virtual void ReleaseGraphics(bool bRelease=true) override
Release the graphics device, and remove it from the graphics device list.
Definition: window.cxx:884
virtual vcl::Region GetOutputBoundsClipRegion() const override
bool HasMirroredGraphics() const override
const Color & GetFillColor() const
Definition: outdev.hxx:634
GDIMetaFile * mpMetaFile
Definition: outdev.hxx:317
SAL_DLLPRIVATE void drawOutDevDirect(const OutputDevice *pSrcDev, SalTwoRect &rPosAry)
Definition: outdev.cxx:520
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:371
typedef void(CALLTYPE *GetFuncDataPtr)(sal_uInt16 &nNo