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  EnableB2dDraw = 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, long nNewWidth, 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 
340  long mnOutOffX;
342  long mnOutOffY;
345  sal_Int32 mnDPIX;
346  sal_Int32 mnDPIY;
348  mutable long mnTextOffX;
350  mutable long mnTextOffY;
351  mutable long mnEmphasisAscent;
352  mutable long mnEmphasisDescent;
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 ); }
443  long GetOutputWidthPixel() const { return mnOutWidth; }
444  long GetOutputHeightPixel() const { return mnOutHeight; }
445  long GetOutOffXPixel() const { return mnOutOffX; }
446  long GetOutOffYPixel() const { return mnOutOffY; }
447  void SetOutOffXPixel(long nOutOffX);
448  void SetOutOffYPixel(long nOutOffY);
449 
451  { return PixelToLogic( GetOutputSizePixel() ); }
452 
453  css::uno::Reference< css::awt::XGraphics >
455  std::vector< VCLXGraphics* > *GetUnoGraphicsList() const { return mpUnoGraphicsList; }
456  std::vector< VCLXGraphics* > *CreateUnoGraphicsList();
457 
458  virtual size_t GetSyncCount() const { return 0xffffffff; }
459 
460 protected:
461 
481  virtual bool AcquireGraphics() const = 0;
482 
489  virtual void ReleaseGraphics( bool bRelease = true ) = 0;
491 
492 
495 
497 public:
498 
503  SAL_DLLPRIVATE sal_Int32 GetDPIX() const { return mnDPIX; }
504 
509  SAL_DLLPRIVATE sal_Int32 GetDPIY() const { return mnDPIY; }
510 
511  SAL_DLLPRIVATE void SetDPIX( sal_Int32 nDPIX ) { mnDPIX = nDPIX; }
512  SAL_DLLPRIVATE void SetDPIY( sal_Int32 nDPIY ) { mnDPIY = nDPIY; }
513 
514  float GetDPIScaleFactor() const
515  {
516  return mnDPIScalePercentage / 100.0f;
517  }
518 
519  sal_Int32 GetDPIScalePercentage() const
520  {
521  return mnDPIScalePercentage;
522  }
523 
525  virtual bool IsVirtual() const;
526 
531  bool SupportsOperation( OutDevSupportType ) const;
532 
533  void SetExtOutDevData( vcl::ExtOutDevData* pExtOutDevData ) { mpExtOutDevData = pExtOutDevData; }
535 
537 
538 public:
539  virtual Size GetButtonBorderSize() { return Size(1, 1); };
541 
544 
546 public:
547  virtual void Flush() {}
548 
549  virtual void DrawOutDev(
550  const Point& rDestPt, const Size& rDestSize,
551  const Point& rSrcPt, const Size& rSrcSize );
552 
553  virtual void DrawOutDev(
554  const Point& rDestPt, const Size& rDestSize,
555  const Point& rSrcPt, const Size& rSrcSize,
556  const OutputDevice& rOutDev );
557 
558  virtual void CopyArea(
559  const Point& rDestPt,
560  const Point& rSrcPt, const Size& rSrcSize,
561  bool bWindowInvalidate = false );
562 
563 protected:
564 
565  virtual void CopyDeviceArea( SalTwoRect& aPosAry, bool bWindowInvalidate);
566 
568 
569  virtual const OutputDevice* DrawOutDevDirectCheck(const OutputDevice* pSrcDev) const;
570 
571  virtual void DrawOutDevDirectProcess( const OutputDevice* pSrcDev, SalTwoRect& rPosAry, SalGraphics* pSrcGraphics );
572 
573  SAL_DLLPRIVATE void drawOutDevDirect ( const OutputDevice* pSrcDev, SalTwoRect& rPosAry );
574 
575  SAL_DLLPRIVATE bool is_double_buffered_window() const;
576 
577 private:
578 
579  // not implemented; to detect misuses of DrawOutDev(...OutputDevice&);
580  SAL_DLLPRIVATE void DrawOutDev( const Point&, const Size&, const Point&, const Size&, const Printer&) = delete;
582 
583 
586 
588 public:
589 
590  void Push( PushFlags nFlags = PushFlags::ALL );
591  void Pop();
592 
593  // returns the current stack depth; that is the number of Push() calls minus the number of Pop() calls
594  // this should not normally be used since Push and Pop must always be used symmetrically
595  // however this may be e.g. a help when debugging code in which this somehow is not the case
596  sal_uInt32 GetGCStackDepth() const;
597  void ClearStack();
598 
599  void EnableOutput( bool bEnable = true );
600  bool IsOutputEnabled() const { return mbOutput; }
601  bool IsDeviceOutputNecessary() const { return (mbOutput && mbDevOutput); }
602 
603  void SetAntialiasing( AntialiasingFlags nMode );
605 
606  void SetDrawMode( DrawModeFlags nDrawMode );
608 
609  void SetLayoutMode( ComplexTextLayoutFlags nTextLayoutMode );
611 
614 
615  void SetRasterOp( RasterOp eRasterOp );
616  RasterOp GetRasterOp() const { return meRasterOp; }
617 
625  void SetOutDevViewType( OutDevViewType eOutDevViewType ) { meOutDevViewType=eOutDevViewType; }
627 
628  void SetLineColor();
629  void SetLineColor( const Color& rColor );
630  const Color& GetLineColor() const { return maLineColor; }
631  bool IsLineColor() const { return mbLineColor; }
632 
633  void SetFillColor();
634  void SetFillColor( const Color& rColor );
635  const Color& GetFillColor() const { return maFillColor; }
636  bool IsFillColor() const { return mbFillColor; }
637 
638  void SetBackground();
639  void SetBackground( const Wallpaper& rBackground );
640  virtual void SaveBackground(VirtualDevice& rSaveDevice,
641  const Point& rPos, const Size& rSize, const Size& rBackgroundSize) const;
642 
643  const Wallpaper& GetBackground() const { return maBackground; }
644  virtual Color GetBackgroundColor() const;
645  virtual Color GetReadableFontColor(const Color& rFontColor, const Color& rBgColor) const;
646  bool IsBackground() const { return mbBackground; }
647 
648  void SetFont( const vcl::Font& rNewFont );
649  const vcl::Font& GetFont() const { return maFont; }
650 
651 protected:
652 
653  virtual void ImplReleaseFonts();
654 
655 private:
656 
657  SAL_DLLPRIVATE void InitLineColor();
658 
659  SAL_DLLPRIVATE void InitFillColor();
660 
662 
663 
666 
668 public:
669 
670  vcl::Region GetClipRegion() const;
671  void SetClipRegion();
672  void SetClipRegion( const vcl::Region& rRegion );
673  bool SelectClipRegion( const vcl::Region&, SalGraphics* pGraphics = nullptr );
674 
675  bool IsClipRegion() const { return mbClipRegion; }
676 
677  void MoveClipRegion( long nHorzMove, long nVertMove );
678  void IntersectClipRegion( const tools::Rectangle& rRect );
679  void IntersectClipRegion( const vcl::Region& rRegion );
680 
681  virtual vcl::Region GetActiveClipRegion() const;
682  virtual vcl::Region GetOutputBoundsClipRegion() const;
683 
684 protected:
685 
686  virtual void InitClipRegion();
687 
694  virtual vcl::Region ClipToDeviceBounds(vcl::Region aRegion) const;
695  virtual void ClipToPaintRegion ( tools::Rectangle& rDstRect );
696 
697 private:
698 
699  SAL_DLLPRIVATE void SetDeviceClipRegion( const vcl::Region* pRegion );
701 
702 public:
703  virtual void DrawBorder(tools::Rectangle aBorderRect);
704 
705 
708 
710 public:
711 
712  void DrawPixel( const Point& rPt );
713  void DrawPixel( const Point& rPt, const Color& rColor );
714 
715  Color GetPixel( const Point& rPt ) const;
717 
718 
721 
723 public:
724 
725  void DrawRect( const tools::Rectangle& rRect );
726  void DrawRect( const tools::Rectangle& rRect,
727  sal_uLong nHorzRount, sal_uLong nVertRound );
728 
730  void DrawCheckered(
731  const Point& rPos,
732  const Size& rSize,
733  sal_uInt32 nLen = 8,
734  Color aStart = COL_WHITE,
735  Color aEnd = COL_BLACK);
736 
737  void DrawGrid( const tools::Rectangle& rRect, const Size& rDist, DrawGridFlags nFlags );
738 
740 
743 public:
745  void Invert( const tools::Rectangle& rRect, InvertFlags nFlags = InvertFlags::NONE );
746  void Invert( const tools::Polygon& rPoly, InvertFlags nFlags = InvertFlags::NONE );
748 
751 
753 public:
754 
755  void DrawLine( const Point& rStartPt, const Point& rEndPt );
756 
757  void DrawLine( const Point& rStartPt, const Point& rEndPt,
758  const LineInfo& rLineInfo );
759 
760 protected:
761  virtual void DrawHatchLine_DrawLine(const Point& rStartPoint, const Point& rEndPoint);
762 
763 private:
764 
767  SAL_DLLPRIVATE void drawLine( basegfx::B2DPolyPolygon aLinePolyPolygon, const LineInfo& rInfo );
769 
770 
773 
775 public:
776 
785  void DrawPolyLine( const tools::Polygon& rPoly );
786 
787  void DrawPolyLine(
788  const basegfx::B2DPolygon&,
789  double fLineWidth = 0.0,
791  css::drawing::LineCap eLineCap = css::drawing::LineCap_BUTT,
792  double fMiterMinimumAngle = basegfx::deg2rad(15.0));
793 
804  void DrawPolyLine( const tools::Polygon& rPoly,
805  const LineInfo& rLineInfo );
806 
807  // #i101491#
808  // Helper who tries to use SalGDI's DrawPolyLine direct and returns it's bool.
809  bool DrawPolyLineDirect(
810  const basegfx::B2DHomMatrix& rObjectTransform,
811  const basegfx::B2DPolygon& rB2DPolygon,
812  double fLineWidth = 0.0,
813  double fTransparency = 0.0,
814  const std::vector< double >* = nullptr, // MM01
816  css::drawing::LineCap eLineCap = css::drawing::LineCap_BUTT,
817  double fMiterMinimumAngle = basegfx::deg2rad(15.0),
818  bool bBypassAACheck = false);
819 
820 private:
821 
822  // #i101491#
823  // Helper which holds the old line geometry creation and is extended to use AA when
824  // switched on. Advantage is that line geometry is only temporarily used for paint
825  SAL_DLLPRIVATE void drawPolyLine(const tools::Polygon& rPoly, const LineInfo& rLineInfo);
826 
828 
829 
832 
834 public:
835 
846  void DrawPolygon( const tools::Polygon& rPoly );
847  void DrawPolygon( const basegfx::B2DPolygon& );
848 
859  void DrawPolyPolygon( const tools::PolyPolygon& rPolyPoly );
861 
862 private:
863 
864  SAL_DLLPRIVATE void ImplDrawPolygon( const tools::Polygon& rPoly, const tools::PolyPolygon* pClipPolyPoly = nullptr );
865  SAL_DLLPRIVATE void ImplDrawPolyPolygon( const tools::PolyPolygon& rPolyPoly, const tools::PolyPolygon* pClipPolyPoly );
866  SAL_DLLPRIVATE void ImplDrawPolyPolygon( sal_uInt16 nPoly, const tools::PolyPolygon& rPolyPoly );
867  // #i101491#
868  // Helper who implements the DrawPolyPolygon functionality for basegfx::B2DPolyPolygon
869  // without MetaFile processing
870  SAL_DLLPRIVATE void ImplDrawPolyPolygonWithB2DPolyPolygon(const basegfx::B2DPolyPolygon& rB2DPolyPoly);
872 
873 
876 
878 public:
879 
880  void DrawEllipse( const tools::Rectangle& rRect );
881 
882  void DrawArc(
883  const tools::Rectangle& rRect,
884  const Point& rStartPt, const Point& rEndPt );
885 
886  void DrawPie(
887  const tools::Rectangle& rRect,
888  const Point& rStartPt, const Point& rEndPt );
889 
890  void DrawChord(
891  const tools::Rectangle& rRect,
892  const Point& rStartPt, const Point& rEndPt );
893 
895 
896 
899 
901 public:
902  void DrawGradient( const tools::Rectangle& rRect, const Gradient& rGradient );
903  void DrawGradient( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient );
904 
905  void AddGradientActions(
906  const tools::Rectangle& rRect,
907  const Gradient& rGradient,
908  GDIMetaFile& rMtf );
909 
910 protected:
911 
912  virtual bool UsePolyPolygonForComplexGradient() = 0;
913 
914  virtual long GetGradientStepCount( long nMinRect );
915 
916 private:
917 
918  SAL_DLLPRIVATE void DrawLinearGradient( const tools::Rectangle& rRect, const Gradient& rGradient, const tools::PolyPolygon* pClipPolyPoly );
919  SAL_DLLPRIVATE void DrawComplexGradient( const tools::Rectangle& rRect, const Gradient& rGradient, const tools::PolyPolygon* pClipPolyPoly );
920 
921  SAL_DLLPRIVATE void DrawGradientToMetafile( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient );
922  SAL_DLLPRIVATE void DrawLinearGradientToMetafile( const tools::Rectangle& rRect, const Gradient& rGradient );
923  SAL_DLLPRIVATE void DrawComplexGradientToMetafile( const tools::Rectangle& rRect, const Gradient& rGradient );
924 
925  SAL_DLLPRIVATE long GetGradientSteps( const Gradient& rGradient, const tools::Rectangle& rRect, bool bMtf, bool bComplex=false );
926 
927  SAL_DLLPRIVATE Color GetSingleColorGradientFill();
928  SAL_DLLPRIVATE void SetGrayscaleColors( Gradient &rGradient );
930 
931 
934 
936 public:
937 
938 #ifdef _MSC_VER
939  void DrawHatch( const tools::PolyPolygon& rPolyPoly, const ::Hatch& rHatch );
940  void AddHatchActions( const tools::PolyPolygon& rPolyPoly,
941  const ::Hatch& rHatch,
942  GDIMetaFile& rMtf );
943 #else
944  void DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch& rHatch );
945  void AddHatchActions( const tools::PolyPolygon& rPolyPoly,
946  const Hatch& rHatch,
947  GDIMetaFile& rMtf );
948 #endif
949 
950  void DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch& rHatch, bool bMtf );
951 
952 private:
953 
954  SAL_DLLPRIVATE void CalcHatchValues( const tools::Rectangle& rRect, long nDist, sal_uInt16 nAngle10, Point& rPt1, Point& rPt2, Size& rInc, Point& rEndPt1 );
955  SAL_DLLPRIVATE void DrawHatchLine( const tools::Line& rLine, const tools::PolyPolygon& rPolyPoly, Point* pPtBuffer, bool bMtf );
957 
958 
961 
963 public:
964  void DrawWallpaper( const tools::Rectangle& rRect, const Wallpaper& rWallpaper );
965 
966  void Erase();
967  void Erase(const tools::Rectangle& rRect);
968 
969 protected:
970  void DrawGradientWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper );
971 
972 private:
973  SAL_DLLPRIVATE void DrawWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper );
974  SAL_DLLPRIVATE void DrawColorWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper );
975  SAL_DLLPRIVATE void DrawBitmapWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper );
977 
978 
981 
983 public:
984 
985  void DrawText( const Point& rStartPt, const OUString& rStr,
986  sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
987  MetricVector* pVector = nullptr, OUString* pDisplayText = nullptr,
988  const SalLayoutGlyphs* pLayoutCache = nullptr );
989 
990  void DrawText( const tools::Rectangle& rRect,
991  const OUString& rStr, DrawTextFlags nStyle = DrawTextFlags::NONE,
992  MetricVector* pVector = nullptr, OUString* pDisplayText = nullptr,
993  vcl::ITextLayout* _pTextLayout = nullptr );
994 
995  static void ImplDrawText( OutputDevice& rTargetDevice, const tools::Rectangle& rRect,
996  const OUString& rOrigStr, DrawTextFlags nStyle,
997  MetricVector* pVector, OUString* pDisplayText, vcl::ITextLayout& _rLayout );
998 
999  void ImplDrawText( SalLayout& );
1000 
1001  void ImplDrawTextBackground( const SalLayout& );
1002 
1003  void DrawCtrlText( const Point& rPos, const OUString& rStr,
1004  sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
1005  DrawTextFlags nStyle = DrawTextFlags::Mnemonic, MetricVector* pVector = nullptr, OUString* pDisplayText = nullptr,
1006  const SalLayoutGlyphs* pGlyphs = nullptr);
1007 
1008  void DrawTextLine( const Point& rPos, long nWidth,
1009  FontStrikeout eStrikeout,
1010  FontLineStyle eUnderline,
1011  FontLineStyle eOverline,
1012  bool bUnderlineAbove = false );
1013 
1014  void ImplDrawTextLine( long nBaseX, long nX, long nY, DeviceCoordinate nWidth,
1015  FontStrikeout eStrikeout, FontLineStyle eUnderline,
1016  FontLineStyle eOverline, bool bUnderlineAbove );
1017 
1018  void ImplDrawTextLines( SalLayout&, FontStrikeout eStrikeout, FontLineStyle eUnderline,
1019  FontLineStyle eOverline, bool bWordLine, bool bUnderlineAbove );
1020 
1021  void DrawWaveLine( const Point& rStartPos, const Point& rEndPos, long nLineWidth = 1 );
1022 
1023  bool ImplDrawRotateText( SalLayout& );
1024 
1026  const OUString& rStr, DrawTextFlags nStyle = DrawTextFlags::WordBreak,
1027  TextRectInfo* pInfo = nullptr,
1028  const vcl::ITextLayout* _pTextLayout = nullptr ) const;
1029 
1079  bool GetTextBoundRect( tools::Rectangle& rRect,
1080  const OUString& rStr, sal_Int32 nBase = 0, sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
1081  sal_uLong nLayoutWidth = 0, const long* pDXArray = nullptr,
1082  const SalLayoutGlyphs* pGlyphs = nullptr ) const;
1083 
1085 
1087  const OUString& rStr ) const;
1088 
1090  const OUString& rStr, sal_Int32 nBase = 0, sal_Int32 nIndex = 0,
1091  sal_Int32 nLen = -1,
1092  sal_uLong nLayoutWidth = 0, const long* pDXArray = nullptr ) const;
1093 
1095  const OUString& rStr, sal_Int32 nBase, sal_Int32 nIndex = 0,
1096  sal_Int32 nLen = -1,
1097  sal_uLong nLayoutWidth = 0, const long* pDXArray = nullptr ) const;
1098 
1099 
1100  OUString GetEllipsisString( const OUString& rStr, long nMaxWidth,
1101  DrawTextFlags nStyle = DrawTextFlags::EndEllipsis ) const;
1102 
1103  long GetCtrlTextWidth( const OUString& rStr,
1104  const SalLayoutGlyphs* pLayoutCache = nullptr ) const;
1105 
1106  static OUString GetNonMnemonicString( const OUString& rStr, sal_Int32& rMnemonicPos );
1107 
1108  static OUString GetNonMnemonicString( const OUString& rStr )
1109  { sal_Int32 nDummy; return GetNonMnemonicString( rStr, nDummy ); }
1110 
1119  void AddTextRectActions( const tools::Rectangle& rRect,
1120  const OUString& rOrigStr,
1121  DrawTextFlags nStyle,
1122  GDIMetaFile& rMtf );
1123 
1124  void SetTextColor( const Color& rColor );
1125  const Color& GetTextColor() const { return maTextColor; }
1126 
1127  void SetTextFillColor();
1128  void SetTextFillColor( const Color& rColor );
1129  Color GetTextFillColor() const;
1130  bool IsTextFillColor() const { return !maFont.IsTransparent(); }
1131 
1132  void SetTextLineColor();
1133  void SetTextLineColor( const Color& rColor );
1134  const Color& GetTextLineColor() const { return maTextLineColor; }
1135  bool IsTextLineColor() const { return (maTextLineColor.GetTransparency() == 0); }
1136 
1137  void SetOverlineColor();
1138  void SetOverlineColor( const Color& rColor );
1139  const Color& GetOverlineColor() const { return maOverlineColor; }
1140  bool IsOverlineColor() const { return (maOverlineColor.GetTransparency() == 0); }
1141 
1142  void SetTextAlign( TextAlign eAlign );
1143  TextAlign GetTextAlign() const { return maFont.GetAlignment(); }
1144 
1149  long GetTextWidth( const OUString& rStr, sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
1150  vcl::TextLayoutCache const* = nullptr,
1151  SalLayoutGlyphs const*const pLayoutCache = nullptr) const;
1152 
1157  long GetTextHeight() const;
1158  float approximate_digit_width() const;
1159 
1160  void DrawTextArray( const Point& rStartPt, const OUString& rStr,
1161  const long* pDXAry,
1162  sal_Int32 nIndex = 0,
1163  sal_Int32 nLen = -1,
1165  const SalLayoutGlyphs* pLayoutCache = nullptr);
1166  long GetTextArray( const OUString& rStr, long* pDXAry,
1167  sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
1168  vcl::TextLayoutCache const* = nullptr,
1169  SalLayoutGlyphs const*const pLayoutCache = nullptr) const;
1170 
1171  void GetCaretPositions( const OUString&, long* pCaretXArray,
1172  sal_Int32 nIndex, sal_Int32 nLen,
1173  const SalLayoutGlyphs* pGlyphs = nullptr ) const;
1174  void DrawStretchText( const Point& rStartPt, sal_uLong nWidth,
1175  const OUString& rStr,
1176  sal_Int32 nIndex = 0, sal_Int32 nLen = -1);
1177  sal_Int32 GetTextBreak( const OUString& rStr, long nTextWidth,
1178  sal_Int32 nIndex, sal_Int32 nLen = -1,
1179  long nCharExtra = 0,
1180  vcl::TextLayoutCache const* = nullptr,
1181  const SalLayoutGlyphs* pGlyphs = nullptr) const;
1182  sal_Int32 GetTextBreak( const OUString& rStr, long nTextWidth,
1183  sal_Unicode nExtraChar, sal_Int32& rExtraCharPos,
1184  sal_Int32 nIndex, sal_Int32 nLen,
1185  long nCharExtra,
1186  vcl::TextLayoutCache const* = nullptr) const;
1187  static std::shared_ptr<vcl::TextLayoutCache> CreateTextLayoutCache(OUString const&);
1188 
1189 protected:
1190  SAL_DLLPRIVATE void ImplInitTextLineSize();
1191  SAL_DLLPRIVATE void ImplInitAboveTextLineSize();
1192  static
1193  SAL_DLLPRIVATE long ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo, long nWidth, const OUString& rStr, DrawTextFlags nStyle, const vcl::ITextLayout& _rLayout );
1194  SAL_DLLPRIVATE float approximate_char_width() const;
1195 private:
1196  SAL_DLLPRIVATE void ImplInitTextColor();
1197 
1198  SAL_DLLPRIVATE void ImplDrawTextDirect( SalLayout&, bool bTextLines);
1199  SAL_DLLPRIVATE void ImplDrawSpecialText( SalLayout& );
1200  SAL_DLLPRIVATE void ImplDrawTextRect( long nBaseX, long nBaseY, long nX, long nY, long nWidth, long nHeight );
1201 
1202  SAL_DLLPRIVATE static void ImplDrawWavePixel( long nOriginX, long nOriginY, long nCurX, long nCurY, short nOrientation, SalGraphics* pGraphics, OutputDevice const * pOutDev,
1203  bool bDrawPixAsRect, long nPixWidth, long nPixHeight );
1204  SAL_DLLPRIVATE void ImplDrawWaveLine( long nBaseX, long nBaseY, long nStartX, long nStartY, long nWidth, long nHeight, long nLineWidth, short nOrientation, const Color& rColor );
1205  SAL_DLLPRIVATE void ImplDrawWaveTextLine( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontLineStyle eTextLine, Color aColor, bool bIsAbove );
1206  SAL_DLLPRIVATE void ImplDrawStraightTextLine( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontLineStyle eTextLine, Color aColor, bool bIsAbove );
1207  SAL_DLLPRIVATE void ImplDrawStrikeoutLine( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontStrikeout eStrikeout, Color aColor );
1208  SAL_DLLPRIVATE void ImplDrawStrikeoutChar( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontStrikeout eStrikeout, Color aColor );
1209  SAL_DLLPRIVATE void ImplDrawMnemonicLine( long nX, long nY, long nWidth );
1210 
1211 
1213 
1214 
1217 
1219 public:
1220 
1221  FontMetric GetDevFont( int nDevFontIndex ) const;
1222  int GetDevFontCount() const;
1223 
1224  bool IsFontAvailable( const OUString& rFontName ) const;
1225 
1226  Size GetDevFontSize( const vcl::Font& rFont, int nSizeIndex ) const;
1227  int GetDevFontSizeCount( const vcl::Font& ) const;
1228 
1229  bool AddTempDevFont( const OUString& rFileURL, const OUString& rFontName );
1230  void RefreshFontData( const bool bNewFontLists );
1231 
1232  FontMetric GetFontMetric() const;
1233  FontMetric GetFontMetric( const vcl::Font& rFont ) const;
1234 
1235  bool GetFontCharMap( FontCharMapRef& rxFontCharMap ) const;
1236  bool GetFontCapabilities( vcl::FontCapabilities& rFontCapabilities ) const;
1237 
1238  bool GetFontFeatures(std::vector<vcl::font::Feature>& rFontFeatures) const;
1239 
1240  SAL_DLLPRIVATE void ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPolyLine, tools::Rectangle& rRect1, tools::Rectangle& rRect2,
1241  long& rYOff, long& rWidth, FontEmphasisMark eEmphasis, long nHeight );
1242  SAL_DLLPRIVATE static FontEmphasisMark
1243  ImplGetEmphasisMarkStyle( const vcl::Font& rFont );
1244 
1245  bool GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, int nIndex,
1246  int nLen, MetricVector& rVector );
1247 
1248  sal_Int32 HasGlyphs( const vcl::Font& rFont, const OUString& rStr,
1249  sal_Int32 nIndex = 0, sal_Int32 nLen = -1 ) const;
1250 
1251  long GetMinKashida() const;
1252 
1253  // i60594
1254  // validate kashida positions against the current font
1255  // returns count of invalid kashida positions
1256  sal_Int32 ValidateKashidas( const OUString& rTxt, sal_Int32 nIdx, sal_Int32 nLen,
1257  sal_Int32 nKashCount, // number of suggested kashida positions (in)
1258  const sal_Int32* pKashidaPos, // suggested kashida positions (in)
1259  sal_Int32* pKashidaPosDropped // invalid kashida positions (out)
1260  ) const;
1261 
1262  static void BeginFontSubstitution();
1263  static void EndFontSubstitution();
1264  static void AddFontSubstitute( const OUString& rFontName,
1265  const OUString& rReplaceFontName,
1266  AddFontSubstituteFlags nFlags );
1267  static void RemoveFontsSubstitute();
1268 
1270  LanguageType eLang,
1271  GetDefaultFontFlags nFlags,
1272  const OutputDevice* pOutDev = nullptr );
1273 
1274  SAL_DLLPRIVATE void ImplInitFontList() const;
1275  SAL_DLLPRIVATE void ImplUpdateFontData();
1276 
1277  //drop font data for all outputdevices.
1278  //If bNewFontLists is true then empty lists of system fonts
1279  SAL_DLLPRIVATE static void ImplClearAllFontData( bool bNewFontLists );
1280  //fetch font data for all outputdevices
1281  //If bNewFontLists is true then fetch lists of system fonts
1282  SAL_DLLPRIVATE static void ImplRefreshAllFontData( bool bNewFontLists );
1283  //drop and fetch font data for all outputdevices
1284  //If bNewFontLists is true then drop and refetch lists of system fonts
1285  SAL_DLLPRIVATE static void ImplUpdateAllFontData( bool bNewFontLists );
1286 
1287  // Lock font updates for all output devices
1288  static void LockFontUpdates(bool bLock);
1289 
1290 protected:
1291  SAL_DLLPRIVATE const LogicalFontInstance* GetFontInstance() const;
1292  SAL_DLLPRIVATE long GetEmphasisAscent() const { return mnEmphasisAscent; }
1293  SAL_DLLPRIVATE long GetEmphasisDescent() const { return mnEmphasisDescent; }
1294 
1295  SAL_DLLPRIVATE bool InitFont() const;
1296  virtual void SetFontOrientation( LogicalFontInstance* const pFontInstance ) const;
1297  virtual long GetFontExtLeading() const;
1298 
1299  virtual void ImplClearFontData(bool bNewFontLists);
1300  virtual void ImplRefreshFontData(bool bNewFontLists);
1301  void ReleaseFontCache();
1302  void ReleaseFontCollection();
1304  void ResetNewFontCache();
1305 
1306 private:
1307 
1308  typedef void ( OutputDevice::* FontUpdateHandler_t )( bool );
1309 
1310  SAL_DLLPRIVATE bool ImplNewFont() const;
1311 
1312  SAL_DLLPRIVATE static void ImplUpdateFontDataForAllFrames( FontUpdateHandler_t pHdl, bool bNewFontLists );
1313 
1314  static
1315  SAL_DLLPRIVATE OUString ImplGetEllipsisString( const OutputDevice& rTargetDevice, const OUString& rStr,
1316  long nMaxWidth, DrawTextFlags nStyle, const vcl::ITextLayout& _rLayout );
1317 
1318  SAL_DLLPRIVATE void ImplDrawEmphasisMark( long nBaseX, long nX, long nY, const tools::PolyPolygon& rPolyPoly, bool bPolyLine, const tools::Rectangle& rRect1, const tools::Rectangle& rRect2 );
1319  SAL_DLLPRIVATE void ImplDrawEmphasisMarks( SalLayout& );
1321 
1322 
1325 
1327 public:
1328 
1329  // tells whether this output device is RTL in an LTR UI or LTR in a RTL UI
1330  SAL_DLLPRIVATE bool ImplIsAntiparallel() const ;
1331  SAL_DLLPRIVATE void ReMirror( Point &rPoint ) const;
1332  SAL_DLLPRIVATE void ReMirror( tools::Rectangle &rRect ) const;
1333  SAL_DLLPRIVATE void ReMirror( vcl::Region &rRegion ) const;
1334  SAL_DLLPRIVATE bool ImplIsRecordLayout() const;
1335  virtual bool HasMirroredGraphics() const;
1336  std::unique_ptr<SalLayout>
1337  ImplLayout( const OUString&, sal_Int32 nIndex, sal_Int32 nLen,
1338  const Point& rLogicPos = Point(0,0), long nLogicWidth=0,
1339  const long* pLogicDXArray=nullptr, SalLayoutFlags flags = SalLayoutFlags::NONE,
1340  vcl::TextLayoutCache const* = nullptr,
1341  const SalLayoutGlyphs* pGlyphs = nullptr) const;
1342  SAL_DLLPRIVATE ImplLayoutArgs ImplPrepareLayoutArgs( OUString&, const sal_Int32 nIndex, const sal_Int32 nLen,
1343  DeviceCoordinate nPixelWidth, const DeviceCoordinate* pPixelDXArray,
1345  vcl::TextLayoutCache const* = nullptr) const;
1346  SAL_DLLPRIVATE std::unique_ptr<SalLayout>
1347  ImplGlyphFallbackLayout( std::unique_ptr<SalLayout>, ImplLayoutArgs& ) const;
1348  SAL_DLLPRIVATE std::unique_ptr<SalLayout>
1350  LogicalFontInstance* pLogicalFont, int nFallbackLevel,
1351  ImplLayoutArgs& rLayoutArgs) const;
1352 
1353 
1354  // Enabling/disabling RTL only makes sense for OutputDevices that use a mirroring SalGraphicsLayout
1355  virtual void EnableRTL( bool bEnable = true);
1356  bool IsRTLEnabled() const { return mbEnableRTL; }
1357 
1358  bool GetTextIsRTL( const OUString&, sal_Int32 nIndex, sal_Int32 nLen ) const;
1359 
1361 
1362 
1365 
1367 public:
1368 
1378  void DrawBitmap(
1379  const Point& rDestPt,
1380  const Bitmap& rBitmap );
1381 
1391  void DrawBitmap(
1392  const Point& rDestPt,
1393  const Size& rDestSize,
1394  const Bitmap& rBitmap );
1395 
1396  void DrawBitmap(
1397  const Point& rDestPt,
1398  const Size& rDestSize,
1399  const Point& rSrcPtPixel,
1400  const Size& rSrcSizePixel,
1401  const Bitmap& rBitmap,
1403 
1413  void DrawBitmapEx(
1414  const Point& rDestPt,
1415  const BitmapEx& rBitmapEx );
1416 
1417 
1427  void DrawBitmapEx(
1428  const Point& rDestPt,
1429  const Size& rDestSize,
1430  const BitmapEx& rBitmapEx );
1431 
1432  void DrawBitmapEx(
1433  const Point& rDestPt,
1434  const Size& rDestSize,
1435  const Point& rSrcPtPixel,
1436  const Size& rSrcSizePixel,
1437  const BitmapEx& rBitmapEx,
1439 
1447  void DrawImage(
1448  const Point& rPos,
1449  const Image& rImage,
1451 
1452  void DrawImage(
1453  const Point& rPos,
1454  const Size& rSize,
1455  const Image& rImage,
1457 
1458 
1459  virtual Bitmap GetBitmap( const Point& rSrcPt, const Size& rSize ) const;
1460 
1463  BitmapEx GetBitmapEx( const Point& rSrcPt, const Size& rSize ) const;
1464 
1465 
1477  const basegfx::B2DHomMatrix& rTransformation,
1478  const BitmapEx& rBitmapEx);
1479 
1480  void DrawShadowBitmapEx(
1481  const BitmapEx& rBitmapEx,
1482  ::Color aShadowColor);
1483 protected:
1484 
1485  virtual void DrawDeviceBitmap(
1486  const Point& rDestPt, const Size& rDestSize,
1487  const Point& rSrcPtPixel, const Size& rSrcSizePixel,
1488  BitmapEx& rBitmapEx );
1489 
1490  virtual void ScaleBitmap ( Bitmap &rBmp, SalTwoRect &rPosAry );
1491 
1499  virtual bool DrawTransformBitmapExDirect(
1500  const basegfx::B2DHomMatrix& aFullTransform,
1501  const BitmapEx& rBitmapEx);
1502 
1515  const basegfx::B2DHomMatrix& aFullTransform,
1516  basegfx::B2DRange &aVisibleRange,
1517  double &fMaximumArea);
1518 
1519 private:
1520 
1521  SAL_DLLPRIVATE void DrawDeviceAlphaBitmap(
1522  const Bitmap& rBmp,
1523  const AlphaMask& rAlpha,
1524  const Point& rDestPt,
1525  const Size& rDestSize,
1526  const Point& rSrcPtPixel,
1527  const Size& rSrcSizePixel );
1528 
1529  SAL_DLLPRIVATE void DrawDeviceAlphaBitmapSlowPath(
1530  const Bitmap& rBitmap, const AlphaMask& rAlpha,
1531  tools::Rectangle aDstRect, tools::Rectangle aBmpRect,
1532  Size const & aOutSz, Point const & aOutPt);
1533 
1534 
1535  SAL_DLLPRIVATE void BlendBitmap(
1536  const SalTwoRect& rPosAry,
1537  const Bitmap& rBmp );
1538 
1539  SAL_DLLPRIVATE Bitmap BlendBitmap(
1540  Bitmap& aBmp,
1541  BitmapReadAccess const * pP,
1542  BitmapReadAccess const * pA,
1543  const sal_Int32 nOffY,
1544  const sal_Int32 nDstHeight,
1545  const sal_Int32 nOffX,
1546  const sal_Int32 nDstWidth,
1547  const tools::Rectangle& aBmpRect,
1548  const Size& aOutSz,
1549  const bool bHMirr,
1550  const bool bVMirr,
1551  const long* pMapX,
1552  const long* pMapY );
1553 
1554  SAL_DLLPRIVATE Bitmap BlendBitmapWithAlpha(
1555  Bitmap& aBmp,
1556  BitmapReadAccess const * pP,
1557  BitmapReadAccess const * pA,
1558  const tools::Rectangle& aDstRect,
1559  const sal_Int32 nOffY,
1560  const sal_Int32 nDstHeight,
1561  const sal_Int32 nOffX,
1562  const sal_Int32 nDstWidth,
1563  const long* pMapX,
1564  const long* pMapY );
1565 
1571  SAL_DLLPRIVATE Bitmap GetDownsampledBitmap(
1572  const Size& rDstSz,
1573  const Point& rSrcPt,
1574  const Size& rSrcSz,
1575  const Bitmap& rBmp,
1576  long nMaxBmpDPIX,
1577  long nMaxBmpDPIY );
1578 
1580 
1581 
1584 
1586 public:
1587 
1599  const GDIMetaFile& rInMtf, GDIMetaFile& rOutMtf,
1600  long nMaxBmpDPIX, long nMaxBmpDPIY,
1601  bool bReduceTransparency,
1602  bool bTransparencyAutoMode,
1603  bool bDownsampleBitmaps,
1604  const Color& rBackground = COL_TRANSPARENT );
1605 
1606  SAL_DLLPRIVATE void ImplPrintTransparent (
1607  const Bitmap& rBmp, const Bitmap& rMask,
1608  const Point& rDestPt, const Size& rDestSize,
1609  const Point& rSrcPtPixel, const Size& rSrcSizePixel );
1610 
1611  SAL_DLLPRIVATE Color ImplDrawModeToColor ( const Color& rColor ) const;
1612 
1613 
1614  void DrawTransparent( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent );
1615 
1616  void DrawTransparent(
1617  const basegfx::B2DHomMatrix& rObjectTransform,
1618  const basegfx::B2DPolyPolygon& rB2DPolyPoly,
1619  double fTransparency);
1620 
1621  void DrawTransparent(
1622  const GDIMetaFile& rMtf, const Point& rPos, const Size& rSize,
1623  const Gradient& rTransparenceGradient );
1624 
1625 protected:
1626 
1627  virtual void EmulateDrawTransparent( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent );
1628  void DrawInvisiblePolygon( const tools::PolyPolygon& rPolyPoly );
1629 
1630  virtual void ClipAndDrawGradientMetafile ( const Gradient &rGradient, const tools::PolyPolygon &rPolyPoly );
1631 
1632 private:
1633 
1634  SAL_DLLPRIVATE bool DrawTransparentNatively( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent );
1636 
1637 
1640 
1642 public:
1643 
1644  void DrawMask( const Point& rDestPt,
1645  const Bitmap& rBitmap, const Color& rMaskColor );
1646 
1647  void DrawMask( const Point& rDestPt, const Size& rDestSize,
1648  const Bitmap& rBitmap, const Color& rMaskColor );
1649 
1650  void DrawMask( const Point& rDestPt, const Size& rDestSize,
1651  const Point& rSrcPtPixel, const Size& rSrcSizePixel,
1652  const Bitmap& rBitmap, const Color& rMaskColor,
1653  MetaActionType nAction );
1654 
1655 protected:
1656 
1657  virtual void DrawDeviceMask (
1658  const Bitmap& rMask, const Color& rMaskColor,
1659  const Point& rDestPt, const Size& rDestSize,
1660  const Point& rSrcPtPixel, const Size& rSrcSizePixel );
1662 
1663 
1666 
1668 public:
1669 
1670  void EnableMapMode( bool bEnable = true );
1671  bool IsMapModeEnabled() const { return mbMap; }
1672 
1673  void SetMapMode();
1674  virtual void SetMapMode( const MapMode& rNewMapMode );
1675  void SetRelativeMapMode( const MapMode& rNewMapMode );
1676  virtual void SetMetafileMapMode(const MapMode& rNewMapMode, bool bIsRecord);
1677  const MapMode& GetMapMode() const { return maMapMode; }
1678 
1679 protected:
1680  virtual void ImplInitMapModeObjects();
1681 
1682 public:
1683  // #i75163#
1686 
1687  basegfx::B2DHomMatrix GetViewTransformation( const MapMode& rMapMode ) const;
1689 
1690 
1713  void SetPixelOffset( const Size& rOffset );
1714 
1721  Size GetPixelOffset() const { return Size(mnOutOffOrigX, mnOutOffOrigY);}
1722 
1723  Point LogicToPixel( const Point& rLogicPt ) const;
1724  Size LogicToPixel( const Size& rLogicSize ) const;
1725  tools::Rectangle LogicToPixel( const tools::Rectangle& rLogicRect ) const;
1726  tools::Polygon LogicToPixel( const tools::Polygon& rLogicPoly ) const;
1727  tools::PolyPolygon LogicToPixel( const tools::PolyPolygon& rLogicPolyPoly ) const;
1728  basegfx::B2DPolyPolygon LogicToPixel( const basegfx::B2DPolyPolygon& rLogicPolyPoly ) const;
1729  vcl::Region LogicToPixel( const vcl::Region& rLogicRegion )const;
1730  Point LogicToPixel( const Point& rLogicPt,
1731  const MapMode& rMapMode ) const;
1732  Size LogicToPixel( const Size& rLogicSize,
1733  const MapMode& rMapMode ) const;
1734  tools::Rectangle LogicToPixel( const tools::Rectangle& rLogicRect,
1735  const MapMode& rMapMode ) const;
1736  tools::Polygon LogicToPixel( const tools::Polygon& rLogicPoly,
1737  const MapMode& rMapMode ) const;
1739  const MapMode& rMapMode ) const;
1740 
1741  Point PixelToLogic( const Point& rDevicePt ) const;
1742  Size PixelToLogic( const Size& rDeviceSize ) const;
1743  tools::Rectangle PixelToLogic( const tools::Rectangle& rDeviceRect ) const;
1744  tools::Polygon PixelToLogic( const tools::Polygon& rDevicePoly ) const;
1745  tools::PolyPolygon PixelToLogic( const tools::PolyPolygon& rDevicePolyPoly ) const;
1746  basegfx::B2DPolyPolygon PixelToLogic( const basegfx::B2DPolyPolygon& rDevicePolyPoly ) const;
1747  vcl::Region PixelToLogic( const vcl::Region& rDeviceRegion ) const;
1748  Point PixelToLogic( const Point& rDevicePt,
1749  const MapMode& rMapMode ) const;
1750  Size PixelToLogic( const Size& rDeviceSize,
1751  const MapMode& rMapMode ) const;
1752  tools::Rectangle PixelToLogic( const tools::Rectangle& rDeviceRect,
1753  const MapMode& rMapMode ) const;
1754  tools::Polygon PixelToLogic( const tools::Polygon& rDevicePoly,
1755  const MapMode& rMapMode ) const;
1757  const MapMode& rMapMode ) const;
1759  const MapMode& rMapMode ) const;
1760 
1761  Point LogicToLogic( const Point& rPtSource,
1762  const MapMode* pMapModeSource,
1763  const MapMode* pMapModeDest ) const;
1764  Size LogicToLogic( const Size& rSzSource,
1765  const MapMode* pMapModeSource,
1766  const MapMode* pMapModeDest ) const;
1767  tools::Rectangle LogicToLogic( const tools::Rectangle& rRectSource,
1768  const MapMode* pMapModeSource,
1769  const MapMode* pMapModeDest ) const;
1770  static Point LogicToLogic( const Point& rPtSource,
1771  const MapMode& rMapModeSource,
1772  const MapMode& rMapModeDest );
1773  static Size LogicToLogic( const Size& rSzSource,
1774  const MapMode& rMapModeSource,
1775  const MapMode& rMapModeDest );
1776  static tools::Rectangle LogicToLogic( const tools::Rectangle& rRectSource,
1777  const MapMode& rMapModeSource,
1778  const MapMode& rMapModeDest );
1779  static long LogicToLogic( long nLongSource,
1780  MapUnit eUnitSource,
1781  MapUnit eUnitDest );
1782 
1784  const MapMode& rMapModeSource,
1785  const MapMode& rMapModeDest );
1786 
1787  // create a mapping transformation from rMapModeSource to rMapModeDest (the above methods
1788  // for B2DPoly/Polygons use this internally anyway to transform the B2DPolygon)
1789  static basegfx::B2DHomMatrix LogicToLogic(const MapMode& rMapModeSource, const MapMode& rMapModeDest);
1790 
1797  SAL_DLLPRIVATE tools::Rectangle ImplLogicToDevicePixel( const tools::Rectangle& rLogicRect ) const;
1798 
1805  SAL_DLLPRIVATE Point ImplLogicToDevicePixel( const Point& rLogicPt ) const;
1806 
1817  SAL_DLLPRIVATE long ImplLogicWidthToDevicePixel( long nWidth ) const;
1818 
1819  SAL_DLLPRIVATE DeviceCoordinate LogicWidthToDeviceCoordinate( long nWidth ) const;
1820 
1832  SAL_DLLPRIVATE long ImplLogicXToDevicePixel( long nX ) const;
1833 
1845  SAL_DLLPRIVATE long ImplLogicYToDevicePixel( long nY ) const;
1846 
1857  SAL_DLLPRIVATE long ImplLogicHeightToDevicePixel( long nHeight ) const;
1858 
1868  SAL_DLLPRIVATE long ImplDevicePixelToLogicWidth( long nWidth ) const;
1869 
1879  SAL_DLLPRIVATE long ImplDevicePixelToLogicHeight( long nHeight ) const;
1880 
1890  SAL_DLLPRIVATE float ImplFloatLogicHeightToDevicePixel( float fLogicHeight ) const;
1891 
1898  SAL_DLLPRIVATE Size ImplLogicToDevicePixel( const Size& rLogicSize ) const;
1899 
1906  SAL_DLLPRIVATE tools::Rectangle ImplDevicePixelToLogic( const tools::Rectangle& rPixelRect ) const;
1907 
1914  SAL_DLLPRIVATE tools::Polygon ImplLogicToDevicePixel( const tools::Polygon& rLogicPoly ) const;
1915 
1922  SAL_DLLPRIVATE tools::PolyPolygon ImplLogicToDevicePixel( const tools::PolyPolygon& rLogicPolyPoly ) const;
1923 
1930  SAL_DLLPRIVATE LineInfo ImplLogicToDevicePixel( const LineInfo& rLineInfo ) const;
1931 
1938  SAL_DLLPRIVATE vcl::Region ImplPixelToDevicePixel( const vcl::Region& rRegion ) const;
1939 
1944  SAL_DLLPRIVATE void ImplInvalidateViewTransform();
1945 
1950  SAL_DLLPRIVATE basegfx::B2DHomMatrix ImplGetDeviceTransformation() const;
1952 
1953 
1958 
1960 public:
1961 
1964  bool IsNativeControlSupported( ControlType nType, ControlPart nPart ) const;
1965 
1969  ControlPart nPart,
1970  const tools::Rectangle& rControlRegion,
1971  const Point& aPos,
1972  bool& rIsInside ) const;
1973 
1976  bool DrawNativeControl(
1977  ControlType nType,
1978  ControlPart nPart,
1979  const tools::Rectangle& rControlRegion,
1980  ControlState nState,
1981  const ImplControlValue& aValue,
1982  const OUString& aCaption,
1983  const Color& rBackgroundColor = COL_AUTO );
1984 
1988  ControlType nType,
1989  ControlPart nPart,
1990  const tools::Rectangle& rControlRegion,
1991  ControlState nState,
1992  const ImplControlValue& aValue,
1993  tools::Rectangle &rNativeBoundingRegion,
1994  tools::Rectangle &rNativeContentRegion ) const;
1996 
1999 
2001 public:
2002 
2008  bool DrawEPS(
2009  const Point& rPt, const Size& rSz,
2010  const GfxLink& rGfxLink, GDIMetaFile* pSubst = nullptr );
2012 };
2013 
2014 #endif // INCLUDED_VCL_OUTDEV_HXX
2015 
2016 /* 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:882
VclReferenceBase & operator=(const VclReferenceBase &)=delete
SAL_DLLPRIVATE void ImplDrawStrikeoutChar(long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontStrikeout eStrikeout, Color aColor)
Definition: textline.cxx:568
vcl::Region GetClipRegion() const
const Color & GetTextColor() const
Definition: outdev.hxx:1125
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:524
long mnOutOffX
Output offset for device output in pixel (pseudo window offset within window system's frames) ...
Definition: outdev.hxx:340
sal_Int32 mnDPIScalePercentage
For HiDPI displays, we want to draw elements for a percentage larger.
Definition: outdev.hxx:347
OUString GetEllipsisString(const OUString &rStr, long nMaxWidth, DrawTextFlags nStyle=DrawTextFlags::EndEllipsis) const
Definition: text.cxx:1938
virtual void Flush()
Definition: outdev.hxx:547
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:540
void SetPixelOffset(const Size &rOffset)
Set an offset in pixel.
Definition: map.cxx:1911
static vcl::Font GetDefaultFont(DefaultFontType nType, LanguageType eLang, GetDefaultFontFlags nFlags, const OutputDevice *pOutDev=nullptr)
const Wallpaper & GetBackground() const
Definition: outdev.hxx:643
bool GetFontCharMap(FontCharMapRef &rxFontCharMap) const
Definition: hatch.hxx:44
void SetRelativeMapMode(const MapMode &rNewMapMode)
Definition: map.cxx:782
B2IVector B2ISize
static void AddFontSubstitute(const OUString &rFontName, const OUString &rReplaceFontName, AddFontSubstituteFlags nFlags)
SAL_DLLPRIVATE bool ImplIsRecordLayout() const
Definition: outdev.cxx:641
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
virtual bool UsePolyPolygonForComplexGradient() override
Definition: window.cxx:3775
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)
virtual bool IsVirtual() const
Definition: outdev.cxx:183
Color maTextColor
Definition: outdev.hxx:363
DrawModeFlags
Definition: outdev.hxx:198
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)
void DrawWaveLine(const Point &rStartPos, const Point &rEndPos, long nLineWidth=1)
Definition: textline.cxx:939
bool SupportsCairo() const
SAL_DLLPRIVATE void SetDeviceClipRegion(const vcl::Region *pRegion)
void ImplClearFontData(bool bNewFontLists) override
Definition: window3.cxx:45
Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
Definition: map.cxx:1675
long mnEmphasisAscent
Definition: outdev.hxx:351
virtual void CopyDeviceArea(SalTwoRect &aPosAry, bool bWindowInvalidate) override
Definition: window.cxx:1223
ImplThresholdRes maThresRes
Definition: outdev.hxx:356
virtual ~OutputDevice() override
Definition: outdev.cxx:136
long mnOutOffY
Output offset for device output in pixel (pseudo window offset within window system's frames) ...
Definition: outdev.hxx:342
const Color & GetTextLineColor() const
Definition: outdev.hxx:1134
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:2070
static SAL_DLLPRIVATE void ImplUpdateFontDataForAllFrames(FontUpdateHandler_t pHdl, bool bNewFontLists)
bool IsBackground() const
Definition: outdev.hxx:646
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
DrawModeFlags mnDrawMode
Definition: outdev.hxx:353
Color maLineColor
Definition: outdev.hxx:360
long GetOutOffXPixel() const
Definition: outdev.hxx:445
sal_uInt8 GetTransparency() const
sal_uIntPtr sal_uLong
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), bool bBypassAACheck=false)
Definition: polyline.cxx:303
static void EndFontSubstitution()
TextAlign GetTextAlign() const
Definition: outdev.hxx:1143
bool IsOutputEnabled() const
Definition: outdev.hxx:600
FontEmphasisMark
SAL_DLLPRIVATE void SetDPIX(sal_Int32 nDPIX)
Definition: outdev.hxx:511
bool IsMapModeEnabled() const
Definition: outdev.hxx:1671
bool IsTextLineColor() const
Definition: outdev.hxx:1135
vcl::Region maRegion
Definition: outdev.hxx:359
SAL_DLLPRIVATE Bitmap GetDownsampledBitmap(const Size &rDstSz, const Point &rSrcPt, const Size &rSrcSz, const Bitmap &rBmp, long nMaxBmpDPIX, long nMaxBmpDPIY)
Retrieve downsampled and cropped bitmap.
SAL_DLLPRIVATE std::unique_ptr< SalLayout > getFallbackLayout(LogicalFontInstance *pLogicalFont, int nFallbackLevel, ImplLayoutArgs &rLayoutArgs) const
bool mbOutputClipped
Definition: outdev.hxx:379
static SAL_DLLPRIVATE void ImplDrawWavePixel(long nOriginX, long nOriginY, long nCurX, long nCurY, short nOrientation, SalGraphics *pGraphics, OutputDevice const *pOutDev, bool bDrawPixAsRect, long nPixWidth, long nPixHeight)
Definition: textline.cxx:50
void DrawChord(const tools::Rectangle &rRect, const Point &rStartPt, const Point &rEndPt)
void ImplDrawTextLine(long nBaseX, long nX, long nY, DeviceCoordinate nWidth, FontStrikeout eStrikeout, FontLineStyle eUnderline, FontLineStyle eOverline, bool bUnderlineAbove)
Definition: textline.cxx:660
SAL_DLLPRIVATE void ImplInitTextColor()
Definition: text.cxx: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:610
SAL_DLLPRIVATE bool is_double_buffered_window() const
const MapMode & GetMapMode() const
Definition: outdev.hxx:1677
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)
bool RemoveTransparenciesFromMetaFile(const GDIMetaFile &rInMtf, GDIMetaFile &rOutMtf, long nMaxBmpDPIX, long nMaxBmpDPIY, bool bReduceTransparency, bool bTransparencyAutoMode, bool bDownsampleBitmaps, const Color &rBackground=COL_TRANSPARENT)
helper method removing transparencies from a metafile (e.g.
Definition: print2.cxx:627
std::unique_ptr< ImplDeviceFontSizeList > mpDeviceFontSizeList
Definition: outdev.hxx:322
void IntersectClipRegion(const tools::Rectangle &rRect)
GDIMetaFile * GetConnectMetaFile() const
Definition: outdev.hxx:415
static void LockFontUpdates(bool bLock)
cairo::SurfaceSharedPtr CreateBitmapSurface(const BitmapSystemData &rData, const Size &rSize) const
Create Surface for given bitmap data.
sal_Int32 mnDPIX
Definition: outdev.hxx: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:646
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:338
bool mbMap
Definition: outdev.hxx:374
SAL_DLLPRIVATE const LogicalFontInstance * GetFontInstance() const
std::vector< VCLXGraphics * > * CreateUnoGraphicsList()
Definition: outdev.cxx:330
static SAL_DLLPRIVATE OUString ImplGetEllipsisString(const OutputDevice &rTargetDevice, const OUString &rStr, long nMaxWidth, DrawTextFlags nStyle, const vcl::ITextLayout &_rLayout)
Definition: text.cxx:1945
SAL_DLLPRIVATE Color GetSingleColorGradientFill()
bool mbEnableRTL
Definition: outdev.hxx:392
long mnOutOffOrigX
Additional output pixel offset, applied in LogicToPixel (used by SetPixelOffset/GetPixelOffset) ...
Definition: outdev.hxx:332
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:654
AntialiasingFlags GetAntialiasing() const
Definition: outdev.hxx:604
tools::Rectangle ImplGetTextBoundRect(const SalLayout &)
Definition: text.cxx:165
OutDevSupportType
Definition: vclenum.hxx:198
Color GetBackgroundColor() const override
Definition: window.cxx:586
bool GetTextBoundRect(tools::Rectangle &rRect, const OUString &rStr, sal_Int32 nBase=0, sal_Int32 nIndex=0, sal_Int32 nLen=-1, sal_uLong nLayoutWidth=0, const long *pDXArray=nullptr, const SalLayoutGlyphs *pGlyphs=nullptr) const
Return the exact bounding rectangle of rStr.
Definition: text.cxx:2265
FontAlign GetAlignment() const
Definition: font/font.cxx:668
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:1139
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:1809
Color GetTextFillColor() const
Definition: text.cxx:759
SAL_DLLPRIVATE void InitLineColor()
sal_uInt16 sal_Unicode
static OUString GetNonMnemonicString(const OUString &rStr)
Definition: outdev.hxx:1108
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: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
SAL_DLLPRIVATE void ReMirror(Point &rPoint) const
Definition: outdev.cxx:604
SAL_DLLPRIVATE void DrawLinearGradient(const tools::Rectangle &rRect, const Gradient &rGradient, const tools::PolyPolygon *pClipPolyPoly)
const vcl::Font & GetFont() const
Definition: outdev.hxx:649
RasterOp
Definition: vclenum.hxx:194
void ImplRefreshFontData(bool bNewFontLists) override
Definition: window3.cxx:52
OutDevViewType meOutDevViewType
Definition: outdev.hxx:358
void RefreshFontData(const bool bNewFontLists)
SAL_DLLPRIVATE void BlendBitmap(const SalTwoRect &rPosAry, const Bitmap &rBmp)
AntialiasingFlags mnAntialiasing
Definition: outdev.hxx:371
long DeviceCoordinate
bool mbBackground
Definition: outdev.hxx:376
bool GetTextOutline(tools::PolyPolygon &, const OUString &rStr) const
Definition: text.cxx:2437
virtual Bitmap GetBitmap(const Point &rSrcPt, const Size &rSize) const
PushFlags
Definition: outdevstate.hxx:38
FontMetric GetFontMetric() const
MetaActionType
void DrawInvisiblePolygon(const tools::PolyPolygon &rPolyPoly)
SAL_DLLPRIVATE void CalcHatchValues(const tools::Rectangle &rRect, long nDist, sal_uInt16 nAngle10, Point &rPt1, Point &rPt2, Size &rInc, Point &rEndPt1)
SAL_DLLPRIVATE bool ImplNewFont() const
void ClearStack()
bool mbClipRegionSet
Definition: outdev.hxx:387
SystemGraphicsData GetSystemGfxData() const
Definition: outdev.cxx:221
void SetFontCollectionFromSVData()
Color maFillColor
Definition: outdev.hxx:361
bool GetFontFeatures(std::vector< vcl::font::Feature > &rFontFeatures) const
SAL_DLLPRIVATE void ImplPrintTransparent(const Bitmap &rBmp, const Bitmap &rMask, const Point &rDestPt, const Size &rDestSize, const Point &rSrcPtPixel, const Size &rSrcSizePixel)
void ReleaseFontCache()
static void BeginFontSubstitution()
SAL_DLLPRIVATE long ImplLogicXToDevicePixel(long nX) const
Convert a logical X coordinate to a device pixel's X coordinate.
Definition: map.cxx:410
virtual long GetGradientStepCount(long nMinRect)
GetDefaultFontFlags
Definition: outdev.hxx: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:1264
std::unique_ptr< AllSettings > mxSettings
Definition: outdev.hxx:368
SalGraphics * mpGraphics
Graphics context to draw on.
Definition: outdev.hxx:314
void DrawShadowBitmapEx(const BitmapEx &rBitmapEx,::Color aShadowColor)
static SAL_DLLPRIVATE long ImplGetTextLines(ImplMultiTextLineInfo &rLineInfo, long nWidth, const OUString &rStr, DrawTextFlags nStyle, const vcl::ITextLayout &_rLayout)
Definition: text.cxx:459
SAL_DLLPRIVATE long GetGradientSteps(const Gradient &rGradient, const tools::Rectangle &rRect, bool bMtf, bool bComplex=false)
SAL_DLLPRIVATE bool DrawTransparentNatively(const tools::PolyPolygon &rPolyPoly, sal_uInt16 nTransparencePercent)
SAL_DLLPRIVATE basegfx::B2DHomMatrix ImplGetDeviceTransformation() const
Get device transformation.
Definition: map.cxx:932
std::shared_ptr< Surface > SurfaceSharedPtr
Definition: cairo.hxx:36
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:466
FontMetric GetDevFont(int nDevFontIndex) const
Definition: outdev/font.cxx:47
bool IsTextFillColor() const
Definition: outdev.hxx:1130
SAL_DLLPRIVATE void ImplInvalidateViewTransform()
Invalidate the view transformation.
Definition: map.cxx:329
void DrawTextArray(const Point &rStartPt, const OUString &rStr, const long *pDXAry, sal_Int32 nIndex=0, sal_Int32 nLen=-1, SalLayoutFlags flags=SalLayoutFlags::NONE, const SalLayoutGlyphs *pLayoutCache=nullptr)
Definition: text.cxx:929
SAL_DLLPRIVATE void ImplDrawWaveTextLine(long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontLineStyle eTextLine, Color aColor, bool bIsAbove)
Definition: textline.cxx:195
SAL_DLLPRIVATE void ImplDrawWaveLine(long nBaseX, long nBaseY, long nStartX, long nStartY, long nWidth, long nHeight, long nLineWidth, short nOrientation, const Color &rColor)
Definition: textline.cxx:75
static SAL_DLLPRIVATE void ImplRefreshAllFontData(bool bNewFontLists)
virtual void EmulateDrawTransparent(const tools::PolyPolygon &rPolyPoly, sal_uInt16 nTransparencePercent)
void SetLineColor()
SAL_DLLPRIVATE void InitFillColor()
void SetRefPoint()
Definition: outdev.cxx:278
void SetConnectMetaFile(GDIMetaFile *pMtf)
Definition: outdev.cxx:208
SAL_DLLPRIVATE long ImplLogicYToDevicePixel(long nY) const
Convert a logical Y coordinate to a device pixel's Y coordinate.
Definition: map.cxx:420
virtual long GetFontExtLeading() const
bool IsRTLEnabled() const
Definition: outdev.hxx:1356
static std::shared_ptr< vcl::TextLayoutCache > CreateTextLayoutCache(OUString const &)
Definition: text.cxx:1369
Wallpaper maBackground
Definition: outdev.hxx:367
virtual tools::Rectangle GetBackgroundComponentBounds() const
Definition: outdev.cxx:573
SAL_DLLPRIVATE float ImplFloatLogicHeightToDevicePixel(float fLogicHeight) const
Convert logical height to device pixels, with exact sub-pixel value.
Definition: map.cxx:450
bool IsClipRegion() const
Definition: outdev.hxx:675
css::uno::Any GetNativeSurfaceHandle(cairo::SurfaceSharedPtr &rSurface, const basegfx::B2ISize &rSize) const
Return native handle for underlying surface.
long mnOutOffOrigY
Additional output pixel offset, applied in LogicToPixel (used by SetPixelOffset/GetPixelOffset) ...
Definition: outdev.hxx:336
OutDevType
Definition: outdev.hxx:276
bool IsLineColor() const
Definition: outdev.hxx:631
void DrawGradientWallpaper(long nX, long nY, long nWidth, long nHeight, const Wallpaper &rWallpaper)
Definition: wallpaper.cxx:372
void GetCaretPositions(const OUString &, long *pCaretXArray, sal_Int32 nIndex, sal_Int32 nLen, const SalLayoutGlyphs *pGlyphs=nullptr) const
Definition: text.cxx:1071
SAL_DLLPRIVATE void DrawColorWallpaper(long nX, long nY, long nWidth, long nHeight, const Wallpaper &rWallpaper)
Definition: wallpaper.cxx:83
SAL_DLLPRIVATE void DrawHatchLine(const tools::Line &rLine, const tools::PolyPolygon &rPolyPoly, Point *pPtBuffer, bool bMtf)
float approximate_digit_width() const
Definition: text.cxx:924
ComplexTextLayoutFlags
Definition: outdevstate.hxx:66
long mnOutOffLogicX
Additional output offset in logical coordinates, applied in PixelToLogic (used by SetPixelOffset/GetP...
Definition: outdev.hxx:334
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:588
SAL_DLLPRIVATE void ImplInitAboveTextLineSize()
Definition: textline.cxx:45
Size GetOutputSize() const
Definition: outdev.hxx:450
virtual void SetFontOrientation(LogicalFontInstance *const pFontInstance) const
bool mbInitLineColor
Definition: outdev.hxx:382
SAL_DLLPRIVATE void ImplDrawStrikeoutLine(long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontStrikeout eStrikeout, Color aColor)
Definition: textline.cxx:506
const OutDevType meOutDevType
Definition: outdev.hxx:357
void SetFillColor()
bool mbNewFont
Definition: outdev.hxx:388
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:630
virtual void InitClipRegion() override
virtual void ClipToPaintRegion(tools::Rectangle &rDstRect) override
bool mbTextLines
Definition: outdev.hxx:389
bool IsFontAvailable(const OUString &rFontName) const
Definition: outdev/font.cxx:92
void SetTextColor(const Color &rColor)
Definition: text.cxx:666
static SAL_DLLPRIVATE FontEmphasisMark ImplGetEmphasisMarkStyle(const vcl::Font &rFont)
void SetOutOffYPixel(long nOutOffY)
Definition: outdev.cxx:319
BmpMirrorFlags
Definition: bitmap.hxx:36
void DrawTextLine(const Point &rPos, long nWidth, FontStrikeout eStrikeout, FontLineStyle eUnderline, FontLineStyle eOverline, bool bUnderlineAbove=false)
Definition: textline.cxx:898
void(OutputDevice::* FontUpdateHandler_t)(bool)
Definition: outdev.hxx:1308
std::vector< tools::PolyPolygon > PolyPolyVector
VCL_DLLPUBLIC void DrawFocusRect(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect)
Definition: window2.cxx:1975
vcl::Font maFont
Definition: outdev.hxx:362
void AddGradientActions(const tools::Rectangle &rRect, const Gradient &rGradient, GDIMetaFile &rMtf)
bool ImplDrawRotateText(SalLayout &)
Definition: text.cxx:203
bool mbLineColor
Definition: outdev.hxx:380
constexpr double deg2rad(double v)
void SetOverlineColor()
Definition: textline.cxx:849
virtual const OutputDevice * DrawOutDevDirectCheck(const OutputDevice *pSrcDev) const override
Definition: window.cxx:1249
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.
void MoveClipRegion(long nHorzMove, long nVertMove)
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:142
bool mbInitTextColor
Definition: outdev.hxx:385
css::uno::Any GetSystemGfxDataAny() const
Definition: outdev.cxx:269
Color maTextLineColor
Definition: outdev.hxx:364
virtual void SetMetafileMapMode(const MapMode &rNewMapMode, bool bIsRecord)
Definition: map.cxx:772
bool HitTestNativeScrollbar(ControlPart nPart, const tools::Rectangle &rControlRegion, const Point &aPos, bool &rIsInside) const
Query the native control to determine if it was acted upon.
virtual sal_uInt16 GetBitCount() const
Definition: outdev.cxx:305
DrawModeFlags GetDrawMode() const
Definition: outdev.hxx:607
void DrawBitmap(const Point &rDestPt, const Bitmap &rBitmap)
This is an overloaded member function, provided for convenience. It differs from the above function o...
std::unique_ptr< SalLayout > ImplLayout(const OUString &, sal_Int32 nIndex, sal_Int32 nLen, const Point &rLogicPos=Point(0, 0), long nLogicWidth=0, const long *pLogicDXArray=nullptr, SalLayoutFlags flags=SalLayoutFlags::NONE, vcl::TextLayoutCache const *=nullptr, const SalLayoutGlyphs *pGlyphs=nullptr) const
Definition: text.cxx:1253
DrawGridFlags
Definition: outdev.hxx:185
long GetTextHeight() const
Height where any character of the current font fits; in logic coordinates.
Definition: text.cxx:903
SAL_DLLPRIVATE void DrawDeviceAlphaBitmap(const Bitmap &rBmp, const AlphaMask &rAlpha, const Point &rDestPt, const Size &rDestSize, const Point &rSrcPtPixel, const Size &rSrcSizePixel)
void DrawPixel(const Point &rPt)
Definition: pixel.cxx:54
SAL_DLLPRIVATE void ImplDrawTextRect(long nBaseX, long nBaseY, long nX, long nY, long nWidth, long nHeight)
Definition: text.cxx:86
void DrawHatch(const tools::PolyPolygon &rPolyPoly, const Hatch &rHatch)
virtual void DrawHatchLine_DrawLine(const Point &rStartPoint, const Point &rEndPoint)
TextAlign
bool mbRefPoint
Definition: outdev.hxx:391
SAL_DLLPRIVATE void drawLine(basegfx::B2DPolyPolygon aLinePolyPolygon, const LineInfo &rInfo)
Helper for line geometry paint with support for graphic expansion (pattern and fat_to_area) ...
Definition: line.cxx:152
float GetDPIScaleFactor() const
Definition: outdev.hxx:514
long GetOutputWidthPixel() const
Definition: outdev.hxx:443
virtual void dispose()
void DrawTransformedBitmapEx(const basegfx::B2DHomMatrix &rTransformation, const BitmapEx &rBitmapEx)
Draw BitmapEx transformed.
bool GetGlyphBoundRects(const Point &rOrigin, const OUString &rStr, int nIndex, int nLen, MetricVector &rVector)
std::vector< VCLXGraphics * > * GetUnoGraphicsList() const
Definition: outdev.hxx:455
SAL_DLLPRIVATE void SetGrayscaleColors(Gradient &rGradient)
Point PixelToLogic(const Point &rDevicePt) const
Definition: map.cxx:1186
Point LogicToPixel(const Point &rLogicPt) const
Definition: map.cxx:941
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:271
bool GetTextOutlines(PolyPolyVector &, const OUString &rStr, sal_Int32 nBase=0, sal_Int32 nIndex=0, sal_Int32 nLen=-1, sal_uLong nLayoutWidth=0, const long *pDXArray=nullptr) const
Definition: text.cxx:2416
VclPtr< OutputDevice > mpPrevGraphics
Previous output device in list.
Definition: outdev.hxx:315
long GetCtrlTextWidth(const OUString &rStr, const SalLayoutGlyphs *pLayoutCache=nullptr) const
Definition: text.cxx:2213
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:381
SAL_DLLPRIVATE void ImplDrawEmphasisMark(long nBaseX, long nX, long nY, const tools::PolyPolygon &rPolyPoly, bool bPolyLine, const tools::Rectangle &rRect1, const tools::Rectangle &rRect2)
VclPtr< VirtualDevice > mpAlphaVDev
Definition: outdev.hxx:329
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:636
SAL_DLLPRIVATE void ImplDrawStraightTextLine(long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontLineStyle eTextLine, Color aColor, bool bIsAbove)
Definition: textline.cxx:263
bool IsRefPoint() const
Definition: outdev.hxx:435
ImplMapRes maMapRes
Definition: outdev.hxx:355
bool mbClipRegion
Definition: outdev.hxx:375
long GetOutputHeightPixel() const
Definition: outdev.hxx:444
long mnOutOffLogicY
Additional output offset in logical coordinates, applied in PixelToLogic (used by SetPixelOffset/GetP...
Definition: outdev.hxx:338
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:463
void SetExtOutDevData(vcl::ExtOutDevData *pExtOutDevData)
Definition: outdev.hxx:533
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:613
virtual void EnableRTL(bool bEnable=true) override
OutDevViewType GetOutDevViewType() const
Definition: outdev.hxx:626
bool mbInitClipRegion
Definition: outdev.hxx:386
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_WHITE
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()
SAL_DLLPRIVATE long ImplDevicePixelToLogicHeight(long nHeight) const
Convert device pixels to a height in logical units.
Definition: map.cxx:468
bool IsTransparent() const
Definition: font/font.cxx:666
void SetRasterOp(RasterOp eRasterOp)
Definition: image.hxx:39
void DrawGrid(const tools::Rectangle &rRect, const Size &rDist, DrawGridFlags nFlags)
Definition: rect.cxx:235
SAL_DLLPRIVATE long GetEmphasisDescent() const
Definition: outdev.hxx:1293
bool DrawEPS(const Point &rPt, const Size &rSz, const GfxLink &rGfxLink, GDIMetaFile *pSubst=nullptr)
Definition: outdev.cxx:651
SalGraphics const * GetGraphics() const
Get the graphic context that the output device uses to draw on.
Definition: outdev.cxx:198
virtual void ScaleBitmap(Bitmap &rBmp, SalTwoRect &rPosAry)
SAL_DLLPRIVATE void DrawBitmapWallpaper(long nX, long nY, long nWidth, long nHeight, const Wallpaper &rWallpaper)
Definition: wallpaper.cxx:135
virtual void DrawDeviceBitmap(const Point &rDestPt, const Size &rDestSize, const Point &rSrcPtPixel, const Size &rSrcSizePixel, BitmapEx &rBitmapEx)
css::uno::Reference< css::awt::XGraphics > CreateUnoGraphics()
Definition: outdev.cxx:324
void DrawPolyPolygon(const tools::PolyPolygon &rPolyPoly)
Render the given poly-polygon.
Definition: polygon.cxx:36
int GetDevFontSizeCount(const vcl::Font &) const
Definition: outdev/font.cxx:99
SAL_DLLPRIVATE void ImplGetEmphasisMark(tools::PolyPolygon &rPolyPoly, bool &rPolyLine, tools::Rectangle &rRect1, tools::Rectangle &rRect2, long &rYOff, long &rWidth, FontEmphasisMark eEmphasis, long nHeight)
InvertFlags
Definition: outdev.hxx:265
sal_Int32 GetDPIScalePercentage() const
Definition: outdev.hxx:519
void AddHatchActions(const tools::PolyPolygon &rPolyPoly, const Hatch &rHatch, GDIMetaFile &rMtf)
virtual Size GetButtonBorderSize()
Definition: outdev.hxx:539
SAL_DLLPRIVATE void SetDPIY(sal_Int32 nDPIY)
Definition: outdev.hxx:512
long GetOutOffYPixel() const
Definition: outdev.hxx:446
bool mbInitFont
Definition: outdev.hxx:384
RasterOp GetRasterOp() const
Definition: outdev.hxx:616
void ImplHandleResize(vcl::Window *pWindow, long nNewWidth, long nNewHeight)
Definition: winproc.cxx:1637
static SAL_DLLPRIVATE void ImplUpdateAllFontData(bool bNewFontLists)
virtual void DrawOutDev(const Point &rDestPt, const Size &rDestSize, const Point &rSrcPt, const Size &rSrcSize)
Definition: outdev.cxx:348
bool GetTextIsRTL(const OUString &, sal_Int32 nIndex, sal_Int32 nLen) const
Definition: text.cxx:1375
SAL_DLLPRIVATE long ImplLogicWidthToDevicePixel(long nWidth) const
Convert a logical width to a width in units of device pixels.
Definition: map.cxx:430
virtual vcl::Region ClipToDeviceBounds(vcl::Region aRegion) const
Perform actual rect clip against outdev dimensions, to generate empty clips whenever one of the value...
rtl::Reference< LogicalFontInstance > mpFontInstance
Definition: outdev.hxx: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:1731
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
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_DLLPRIVATE long ImplLogicHeightToDevicePixel(long nHeight) const
Convert a logical height to a height in units of device pixels.
Definition: map.cxx:440
sal_Int32 ValidateKashidas(const OUString &rTxt, sal_Int32 nIdx, sal_Int32 nLen, sal_Int32 nKashCount, const sal_Int32 *pKashidaPos, sal_Int32 *pKashidaPosDropped) const
long mnTextOffX
font specific text alignment offsets in pixel units
Definition: outdev.hxx:349
int GetDevFontCount() const
Definition: outdev/font.cxx:72
sal_Int32 GetTextBreak(const OUString &rStr, long nTextWidth, sal_Int32 nIndex, sal_Int32 nLen=-1, long nCharExtra=0, vcl::TextLayoutCache const *=nullptr, const SalLayoutGlyphs *pGlyphs=nullptr) const
Definition: text.cxx:1386
long mnEmphasisDescent
Definition: outdev.hxx:352
long mnOutWidth
Definition: outdev.hxx:343
SAL_DLLPRIVATE void drawPolyLine(const tools::Polygon &rPoly, const LineInfo &rLineInfo)
Definition: polyline.cxx:255
SAL_DLLPRIVATE tools::Rectangle ImplLogicToDevicePixel(const tools::Rectangle &rLogicRect) const
Convert a logical rectangle to a rectangle in physical device pixel units.
Definition: map.cxx:504
ComplexTextLayoutFlags mnTextLayoutMode
Definition: outdev.hxx:354
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...
SAL_DLLPRIVATE long ImplDevicePixelToLogicWidth(long nWidth) const
Convert device pixels to a width in logical units.
Definition: map.cxx:458
void ImplInitMapModeObjects() override
Definition: window3.cxx:59
Size GetPixelOffset() const
Get the offset in pixel.
Definition: outdev.hxx:1721
void SetOutDevViewType(OutDevViewType eOutDevViewType)
If this OutputDevice is used for displaying a Print Preview the OutDevViewType should be set to 'OutD...
Definition: outdev.hxx:625
std::shared_ptr< ImplFontCache > mxFontCache
Definition: outdev.hxx:319
MapUnit
long GetMinKashida() const
void SetOutOffXPixel(long nOutOffX)
Definition: outdev.cxx:314
std::unique_ptr< ImplOutDevData > mpOutDevData
Definition: outdev.hxx:324
vcl::ExtOutDevData * GetExtOutDevData() const
Definition: outdev.hxx:534
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:611
static void RemoveFontsSubstitute()
SAL_DLLPRIVATE void ImplInitTextLineSize()
Definition: textline.cxx:40
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:636
virtual bool AcquireGraphics() const override
Acquire a graphics device that the output device uses to draw on.
Definition: window.cxx:818
bool IsOverlineColor() const
Definition: outdev.hxx:1140
long GetTextArray(const OUString &rStr, long *pDXAry, sal_Int32 nIndex=0, sal_Int32 nLen=-1, vcl::TextLayoutCache const *=nullptr, SalLayoutGlyphs const *const pLayoutCache=nullptr) const
Definition: text.cxx:962
virtual size_t GetSyncCount() const
Definition: outdev.hxx:458
OutDevViewType
Definition: outdev.hxx:278
Color GetPixel(const Point &rPt) const
Definition: pixel.cxx:29
static SAL_DLLPRIVATE void ImplClearAllFontData(bool bNewFontLists)
static OUString GetNonMnemonicString(const OUString &rStr, sal_Int32 &rMnemonicPos)
Definition: text.cxx:2230
long mnOutHeight
Definition: outdev.hxx:344
FontLineStyle
SAL_DLLPRIVATE DeviceCoordinate LogicWidthToDeviceCoordinate(long nWidth) const
Definition: map.cxx:1928
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:601
void Push(PushFlags nFlags=PushFlags::ALL)
Definition: outdevstate.cxx:60
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:854
SAL_DLLPRIVATE sal_Int32 GetDPIY() const
Get the output device's DPI y-axis value.
Definition: outdev.hxx:509
virtual void ClipAndDrawGradientMetafile(const Gradient &rGradient, const tools::PolyPolygon &rPolyPoly)
DrawImageFlags
Definition: outdev.hxx:170
FontStrikeout
SAL_DLLPRIVATE long GetEmphasisAscent() const
Definition: outdev.hxx:1292
long mnTextOffY
Definition: outdev.hxx:350
SAL_DLLPRIVATE void ImplDrawMnemonicLine(long nX, long nY, long nWidth)
Definition: textline.cxx:786
SAL_DLLPRIVATE sal_Int32 GetDPIX() const
Get the output device's DPI x-axis value.
Definition: outdev.hxx:503
void SetTextAlign(TextAlign eAlign)
Definition: text.cxx:767
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:882
virtual vcl::Region GetOutputBoundsClipRegion() const override
bool HasMirroredGraphics() const override
const Color & GetFillColor() const
Definition: outdev.hxx:635
GDIMetaFile * mpMetaFile
Definition: outdev.hxx:317
SAL_DLLPRIVATE void drawOutDevDirect(const OutputDevice *pSrcDev, SalTwoRect &rPosAry)
Definition: outdev.cxx:525
SAL_DLLPRIVATE void ImplDrawPolygon(const tools::Polygon &rPoly, const tools::PolyPolygon *pClipPolyPoly=nullptr)
Definition: polygon.cxx:445
::std::vector< B2DPolyPolygon > B2DPolyPolygonVector
SAL_DLLPRIVATE Bitmap BlendBitmapWithAlpha(Bitmap &aBmp, BitmapReadAccess const *pP, BitmapReadAccess const *pA, const tools::Rectangle &aDstRect, const sal_Int32 nOffY, const sal_Int32 nDstHeight, const sal_Int32 nOffX, const sal_Int32 nDstWidth, const long *pMapX, const long *pMapY)
SAL_DLLPRIVATE bool InitFont() const
LanguageType meTextLanguage
Definition: outdev.hxx:372
typedef void(CALLTYPE *GetFuncDataPtr)(sal_uInt16 &nNo