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 #pragma once
21 
22 #include <sal/config.h>
23 
24 #include <o3tl/span.hxx>
25 #include <tools/gen.hxx>
26 #include <tools/ref.hxx>
27 #include <tools/solar.h>
28 #include <tools/color.hxx>
29 #include <tools/poly.hxx>
30 #include <vcl/bitmap.hxx>
31 #include <vcl/cairo.hxx>
32 #include <vcl/devicecoordinate.hxx>
33 #include <vcl/dllapi.h>
34 #include <vcl/font.hxx>
35 #include <vcl/region.hxx>
49 #include <vcl/mapmod.hxx>
50 #include <vcl/wall.hxx>
51 #include <vcl/metaactiontypes.hxx>
52 #include <vcl/salnativewidgets.hxx>
53 #include <vcl/vclreferencebase.hxx>
54 
58 
59 #include <unotools/fontdefs.hxx>
60 #include <cppuhelper/weakref.hxx>
61 
62 #include <com/sun/star/drawing/LineCap.hpp>
63 #include <com/sun/star/uno/Reference.h>
64 #include <com/sun/star/awt/DeviceInfo.hpp>
65 
66 #include <memory>
67 #include <string_view>
68 #include <vector>
69 
70 struct ImplOutDevData;
72 struct SystemGraphicsData;
73 class ImplFontCache;
75 class SalGraphics;
76 class Gradient;
77 class Hatch;
78 class AllSettings;
79 class BitmapReadAccess;
80 class BitmapEx;
81 class Image;
82 class TextRectInfo;
83 class FontMetric;
84 class GDIMetaFile;
85 class GfxLink;
86 namespace tools {
87  class Line;
88 }
89 class LineInfo;
90 class AlphaMask;
91 class FontCharMap;
92 class SalLayout;
93 class VirtualDevice;
94 struct SalTwoRect;
95 class Printer;
96 class VCLXGraphics;
97 class OutDevStateStack;
98 class SalLayoutGlyphs;
99 
100 namespace vcl
101 {
102  class ExtOutDevData;
103  class ITextLayout;
104  struct FontCapabilities;
105  class Window;
106  class WindowOutputDevice;
107  namespace font {
108  struct Feature;
109  class PhysicalFontCollection;
110  class PhysicalFontFaceCollection;
111  }
112 
113  namespace text {
114  class ImplLayoutArgs;
115  class TextLayoutCache;
116  }
117 }
118 
119 namespace basegfx {
120  class B2DHomMatrix;
121  class B2DPolygon;
122  class B2IVector;
123  typedef B2IVector B2ISize;
124 }
125 
126 namespace com::sun::star::awt {
127  class XGraphics;
128 }
129 
130 namespace com::sun::star::rendering {
131  class XCanvas;
132  class XSpriteCanvas;
133 }
134 namespace com::sun::star::linguistic2 {
135  class XHyphenator;
136 }
137 namespace com::sun::star::i18n {
138  class XBreakIterator;
139 }
140 
141 #if defined UNX
142 #define GLYPH_FONT_HEIGHT 128
143 #else
144 #define GLYPH_FONT_HEIGHT 256
145 #endif
146 
147 // OutputDevice-Types
148 
150 
152 
153 // OutputDevice
154 
156 
157 BmpMirrorFlags AdjustTwoRect( SalTwoRect& rTwoRect, const Size& rSizePix );
158 void AdjustTwoRect( SalTwoRect& rTwoRect, const tools::Rectangle& rValidSrcRect );
159 
160 class OutputDevice;
161 
162 namespace vcl {
164 }
165 
166 VCL_DLLPUBLIC void InvertFocusRect(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect);
167 
168 typedef struct _cairo_surface cairo_surface_t;
169 
176 {
177  friend class Printer;
178  friend class VirtualDevice;
179  friend class vcl::Window;
181  friend class WorkWindow;
182  friend void ImplHandleResize( vcl::Window* pWindow, tools::Long nNewWidth, tools::Long nNewHeight );
183 
184 private:
185  OutputDevice(const OutputDevice&) = delete;
186  OutputDevice& operator=(const OutputDevice&) = delete;
187 
193  mutable std::unique_ptr<vcl::font::PhysicalFontFaceCollection> mpFontFaceCollection;
194  std::vector<vcl::State> maOutDevStateStack;
195  std::unique_ptr<ImplOutDevData> mpOutDevData;
196  std::vector< VCLXGraphics* >* mpUnoGraphicsList;
198  // The canvas interface for this output device. Is persistent after the first GetCanvas() call
199  mutable css::uno::WeakReference< css::rendering::XCanvas > mxCanvas;
200 
201  // TEMP TEMP TEMP
203 
218  sal_Int32 mnDPIX;
219  sal_Int32 mnDPIY;
221  mutable tools::Long mnTextOffX;
231  vcl::Region maRegion; // contains the clip region, see SetClipRegion(...)
240  std::unique_ptr<AllSettings> mxSettings;
246 
247  mutable bool mbMap : 1;
248  mutable bool mbClipRegion : 1;
249  mutable bool mbBackground : 1;
250  mutable bool mbOutput : 1;
251  mutable bool mbDevOutput : 1;
252  mutable bool mbOutputClipped : 1;
253  mutable bool mbLineColor : 1;
254  mutable bool mbFillColor : 1;
255  mutable bool mbInitLineColor : 1;
256  mutable bool mbInitFillColor : 1;
257  mutable bool mbInitFont : 1;
258  mutable bool mbInitTextColor : 1;
259  mutable bool mbInitClipRegion : 1;
260  mutable bool mbClipRegionSet : 1;
261  mutable bool mbNewFont : 1;
262  mutable bool mbTextLines : 1;
263  mutable bool mbTextSpecial : 1;
264  mutable bool mbRefPoint : 1;
265  mutable bool mbEnableRTL : 1;
266 
267 protected:
268  mutable std::shared_ptr<vcl::font::PhysicalFontCollection> mxFontCollection;
269  mutable std::shared_ptr<ImplFontCache> mxFontCache;
270 
273 
275 protected:
276  OutputDevice(OutDevType eOutDevType);
277  virtual ~OutputDevice() override;
278  virtual void dispose() override;
279 
280 public:
281 
288  SalGraphics const *GetGraphics() const;
289  SalGraphics* GetGraphics();
290 
291  void SetConnectMetaFile( GDIMetaFile* pMtf );
292  GDIMetaFile* GetConnectMetaFile() const { return mpMetaFile; }
293 
294  virtual void SetSettings( const AllSettings& rSettings );
295  const AllSettings& GetSettings() const { return *mxSettings; }
296 
297  SystemGraphicsData GetSystemGfxData() const;
298  OUString GetRenderBackendName() const;
299 
300  // Used by the canvas module. Despite the name it does not always return true if Cairo is supported.
301  bool SupportsCairo() const;
303  cairo::SurfaceSharedPtr CreateSurface(const cairo::CairoSurfaceSharedPtr& rSurface) const;
305  cairo::SurfaceSharedPtr CreateSurface(int x, int y, int width, int height) const;
307  cairo::SurfaceSharedPtr CreateBitmapSurface(const BitmapSystemData& rData, const Size& rSize) const;
309  css::uno::Any GetNativeSurfaceHandle(cairo::SurfaceSharedPtr& rSurface, const basegfx::B2ISize& rSize) const;
310  css::uno::Any GetSystemGfxDataAny() const;
311 
312  void SetRefPoint();
313  void SetRefPoint( const Point& rRefPoint );
314  const Point& GetRefPoint() const { return maRefPoint; }
315  bool IsRefPoint() const { return mbRefPoint; }
316 
317  virtual bool IsScreenComp() const { return true; }
318 
319  virtual sal_uInt16 GetBitCount() const;
320 
322  { return Size( mnOutWidth, mnOutHeight ); }
323  tools::Long GetOutputWidthPixel() const { return mnOutWidth; }
324  tools::Long GetOutputHeightPixel() const { return mnOutHeight; }
325  tools::Long GetOutOffXPixel() const { return mnOutOffX; }
326  tools::Long GetOutOffYPixel() const { return mnOutOffY; }
327  void SetOutOffXPixel(tools::Long nOutOffX);
328  void SetOutOffYPixel(tools::Long nOutOffY);
330  { return Point( mnOutOffX, mnOutOffY ); }
332  { return tools::Rectangle(GetOutputOffPixel(), GetOutputSizePixel() ); }
333 
335  { return PixelToLogic( GetOutputSizePixel() ); }
336 
337  css::uno::Reference< css::awt::XGraphics >
338  CreateUnoGraphics();
339  std::vector< VCLXGraphics* > *GetUnoGraphicsList() const { return mpUnoGraphicsList; }
340  std::vector< VCLXGraphics* > *CreateUnoGraphicsList();
341 
342  virtual size_t GetSyncCount() const { return 0xffffffff; }
343 
345  css::uno::Reference< css::rendering::XCanvas > GetCanvas() const;
347  css::uno::Reference< css::rendering::XSpriteCanvas > GetSpriteCanvas() const;
348 
349 protected:
350 
370  virtual bool AcquireGraphics() const = 0;
371 
378  virtual void ReleaseGraphics( bool bRelease = true ) = 0;
380 
381 
384 
386 public:
387 
392  SAL_DLLPRIVATE sal_Int32 GetDPIX() const { return mnDPIX; }
393 
398  SAL_DLLPRIVATE sal_Int32 GetDPIY() const { return mnDPIY; }
399 
400  SAL_DLLPRIVATE void SetDPIX( sal_Int32 nDPIX ) { mnDPIX = nDPIX; }
401  SAL_DLLPRIVATE void SetDPIY( sal_Int32 nDPIY ) { mnDPIY = nDPIY; }
402 
403  float GetDPIScaleFactor() const
404  {
405  return mnDPIScalePercentage / 100.0f;
406  }
407 
408  sal_Int32 GetDPIScalePercentage() const
409  {
410  return mnDPIScalePercentage;
411  }
412 
413  OutDevType GetOutDevType() const { return meOutDevType; }
414  virtual bool IsVirtual() const;
415 
420  bool SupportsOperation( OutDevSupportType ) const;
421 
422  void SetExtOutDevData( vcl::ExtOutDevData* pExtOutDevData ) { mpExtOutDevData = pExtOutDevData; }
423  vcl::ExtOutDevData* GetExtOutDevData() const { return mpExtOutDevData; }
424 
426 
427 public:
428  virtual Size GetButtonBorderSize() { return Size(1, 1); };
430 
433 
435 public:
436  virtual void Flush() {}
437 
438  virtual void DrawOutDev(
439  const Point& rDestPt, const Size& rDestSize,
440  const Point& rSrcPt, const Size& rSrcSize );
441 
442  virtual void DrawOutDev(
443  const Point& rDestPt, const Size& rDestSize,
444  const Point& rSrcPt, const Size& rSrcSize,
445  const OutputDevice& rOutDev );
446 
447  virtual void CopyArea(
448  const Point& rDestPt,
449  const Point& rSrcPt, const Size& rSrcSize,
450  bool bWindowInvalidate = false );
451 
452 protected:
453 
454  virtual void CopyDeviceArea( SalTwoRect& aPosAry, bool bWindowInvalidate);
455 
456  virtual tools::Rectangle GetBackgroundComponentBounds() const;
457 
458  virtual const OutputDevice* DrawOutDevDirectCheck(const OutputDevice& rSrcDev) const;
459 
460  virtual void DrawOutDevDirectProcess(const OutputDevice& rSrcDev, SalTwoRect& rPosAry, SalGraphics* pSrcGraphics);
461 
462  SAL_DLLPRIVATE void drawOutDevDirect(const OutputDevice& rSrcDev, SalTwoRect& rPosAry);
463 
464  SAL_DLLPRIVATE bool is_double_buffered_window() const;
465 
466  virtual css::uno::Reference< css::rendering::XCanvas > ImplGetCanvas( bool bSpriteCanvas ) const;
467  SAL_DLLPRIVATE void ImplDisposeCanvas();
468 
469 private:
470 
471  // not implemented; to detect misuses of DrawOutDev(...OutputDevice&);
472  SAL_DLLPRIVATE void DrawOutDev( const Point&, const Size&, const Point&, const Size&, const Printer&) = delete;
474 
475 
478 
480 public:
481 
482  void Push( vcl::PushFlags nFlags = vcl::PushFlags::ALL );
483  void Pop();
484  void ClearStack();
485 
486  void EnableOutput( bool bEnable = true );
487  bool IsOutputEnabled() const { return mbOutput; }
488  bool IsDeviceOutputNecessary() const { return (mbOutput && mbDevOutput); }
489 
490  void SetAntialiasing( AntialiasingFlags nMode );
491  AntialiasingFlags GetAntialiasing() const { return mnAntialiasing; }
492 
493  // Render glyphs with a mode suitable for rendering of resolution-independent layout positions.
494  void SetTextRenderModeForResolutionIndependentLayout(bool bMode);
495  bool GetTextRenderModeForResolutionIndependentLayout() const { return mbTextRenderModeForResolutionIndependentLayout; }
496 
497  void SetDrawMode( DrawModeFlags nDrawMode );
498  DrawModeFlags GetDrawMode() const { return mnDrawMode; }
499 
500  void SetLayoutMode( vcl::text::ComplexTextLayoutFlags nTextLayoutMode );
501  vcl::text::ComplexTextLayoutFlags GetLayoutMode() const { return mnTextLayoutMode; }
502 
503  void SetDigitLanguage( LanguageType );
504  LanguageType GetDigitLanguage() const { return meTextLanguage; }
505 
506  void SetRasterOp( RasterOp eRasterOp );
507  RasterOp GetRasterOp() const { return meRasterOp; }
508 
516  void SetOutDevViewType( OutDevViewType eOutDevViewType ) { meOutDevViewType=eOutDevViewType; }
517  OutDevViewType GetOutDevViewType() const { return meOutDevViewType; }
518 
519  void SetLineColor();
520  void SetLineColor( const Color& rColor );
521  const Color& GetLineColor() const { return maLineColor; }
522  bool IsLineColor() const { return mbLineColor; }
523 
524  void SetFillColor();
525  void SetFillColor( const Color& rColor );
526  const Color& GetFillColor() const { return maFillColor; }
527  bool IsFillColor() const { return mbFillColor; }
528 
529  void SetBackground();
530  void SetBackground( const Wallpaper& rBackground );
531  virtual void SaveBackground(VirtualDevice& rSaveDevice,
532  const Point& rPos, const Size& rSize, const Size& rBackgroundSize) const;
533 
534  const Wallpaper& GetBackground() const { return maBackground; }
535  virtual Color GetBackgroundColor() const;
536  virtual Color GetReadableFontColor(const Color& rFontColor, const Color& rBgColor) const;
537  bool IsBackground() const { return mbBackground; }
538 
539  void SetFont( const vcl::Font& rNewFont );
540  const vcl::Font& GetFont() const { return maFont; }
541 
542 protected:
543 
544  virtual void ImplReleaseFonts();
545 
546 private:
547 
548  SAL_DLLPRIVATE void InitLineColor();
549 
550  SAL_DLLPRIVATE void InitFillColor();
551 
553 
554 
557 
559 public:
560 
561  vcl::Region GetClipRegion() const;
562  void SetClipRegion();
563  void SetClipRegion( const vcl::Region& rRegion );
564  bool SelectClipRegion( const vcl::Region&, SalGraphics* pGraphics = nullptr );
565 
566  bool IsClipRegion() const { return mbClipRegion; }
567 
568  void MoveClipRegion( tools::Long nHorzMove, tools::Long nVertMove );
569  void IntersectClipRegion( const tools::Rectangle& rRect );
570  void IntersectClipRegion( const vcl::Region& rRegion );
571 
572  virtual vcl::Region GetActiveClipRegion() const;
573  virtual vcl::Region GetOutputBoundsClipRegion() const;
574 
575 protected:
576 
577  virtual void InitClipRegion();
578 
585  virtual vcl::Region ClipToDeviceBounds(vcl::Region aRegion) const;
586  virtual void ClipToPaintRegion ( tools::Rectangle& rDstRect );
587 
588 private:
589 
590  SAL_DLLPRIVATE void SetDeviceClipRegion( const vcl::Region* pRegion );
592 
593 public:
594  virtual void DrawBorder(tools::Rectangle aBorderRect);
595 
596 
599 
601 public:
602 
603  void DrawPixel( const Point& rPt );
604  void DrawPixel( const Point& rPt, const Color& rColor );
605 
606  Color GetPixel( const Point& rPt ) const;
608 
609 
612 
614 public:
615 
616  void DrawRect( const tools::Rectangle& rRect );
617  void DrawRect( const tools::Rectangle& rRect,
618  sal_uLong nHorzRount, sal_uLong nVertRound );
619 
621  void DrawCheckered(
622  const Point& rPos,
623  const Size& rSize,
624  sal_uInt32 nLen = 8,
625  Color aStart = COL_WHITE,
626  Color aEnd = COL_BLACK);
627 
628  void DrawGrid( const tools::Rectangle& rRect, const Size& rDist, DrawGridFlags nFlags );
629 
631 
634 public:
636  void Invert( const tools::Rectangle& rRect, InvertFlags nFlags = InvertFlags::NONE );
637  void Invert( const tools::Polygon& rPoly, InvertFlags nFlags = InvertFlags::NONE );
639 
642 
644 public:
645 
646  void DrawLine( const Point& rStartPt, const Point& rEndPt );
647 
648  void DrawLine( const Point& rStartPt, const Point& rEndPt,
649  const LineInfo& rLineInfo );
650 
651 protected:
652  virtual void DrawHatchLine_DrawLine(const Point& rStartPoint, const Point& rEndPoint);
653 
654 private:
655 
658  SAL_DLLPRIVATE void drawLine( basegfx::B2DPolyPolygon aLinePolyPolygon, const LineInfo& rInfo );
660 
661 
664 
666 public:
667 
676  void DrawPolyLine( const tools::Polygon& rPoly );
677 
678  void DrawPolyLine(
679  const basegfx::B2DPolygon&,
680  double fLineWidth = 0.0,
682  css::drawing::LineCap eLineCap = css::drawing::LineCap_BUTT,
683  double fMiterMinimumAngle = basegfx::deg2rad(15.0));
684 
695  void DrawPolyLine( const tools::Polygon& rPoly,
696  const LineInfo& rLineInfo );
697 
698  // #i101491#
699  // Helper who tries to use SalGDI's DrawPolyLine direct and returns it's bool.
700  bool DrawPolyLineDirect(
701  const basegfx::B2DHomMatrix& rObjectTransform,
702  const basegfx::B2DPolygon& rB2DPolygon,
703  double fLineWidth = 0.0,
704  double fTransparency = 0.0,
705  const std::vector< double >* = nullptr, // MM01
707  css::drawing::LineCap eLineCap = css::drawing::LineCap_BUTT,
708  double fMiterMinimumAngle = basegfx::deg2rad(15.0));
709 
710 private:
711 
712  // #i101491#
713  // Helper which holds the old line geometry creation and is extended to use AA when
714  // switched on. Advantage is that line geometry is only temporarily used for paint
715  SAL_DLLPRIVATE void drawPolyLine(const tools::Polygon& rPoly, const LineInfo& rLineInfo);
716 
718 
719  bool DrawPolyLineDirectInternal(
720  const basegfx::B2DHomMatrix& rObjectTransform,
721  const basegfx::B2DPolygon& rB2DPolygon,
722  double fLineWidth = 0.0,
723  double fTransparency = 0.0,
724  const std::vector< double >* = nullptr, // MM01
726  css::drawing::LineCap eLineCap = css::drawing::LineCap_BUTT,
727  double fMiterMinimumAngle = basegfx::deg2rad(15.0));
728 
731 
733 public:
734 
745  void DrawPolygon( const tools::Polygon& rPoly );
746  void DrawPolygon( const basegfx::B2DPolygon& );
747 
758  void DrawPolyPolygon( const tools::PolyPolygon& rPolyPoly );
759  void DrawPolyPolygon( const basegfx::B2DPolyPolygon& );
760 
761 private:
762 
763  SAL_DLLPRIVATE void ImplDrawPolygon( const tools::Polygon& rPoly, const tools::PolyPolygon* pClipPolyPoly = nullptr );
764  SAL_DLLPRIVATE void ImplDrawPolyPolygon( const tools::PolyPolygon& rPolyPoly, const tools::PolyPolygon* pClipPolyPoly );
765  SAL_DLLPRIVATE void ImplDrawPolyPolygon( sal_uInt16 nPoly, const tools::PolyPolygon& rPolyPoly );
766  // #i101491#
767  // Helper who implements the DrawPolyPolygon functionality for basegfx::B2DPolyPolygon
768  // without MetaFile processing
769  SAL_DLLPRIVATE void ImplDrawPolyPolygonWithB2DPolyPolygon(const basegfx::B2DPolyPolygon& rB2DPolyPoly);
771 
772  SAL_DLLPRIVATE void ImplDrawWaveLineBezier(tools::Long nStartX, tools::Long nStartY, tools::Long nEndX, tools::Long nEndY, tools::Long nWaveHeight, double fOrientation, tools::Long nLineWidth);
773 
774 
777 
779 public:
780 
781  void DrawEllipse( const tools::Rectangle& rRect );
782 
783  void DrawArc(
784  const tools::Rectangle& rRect,
785  const Point& rStartPt, const Point& rEndPt );
786 
787  void DrawPie(
788  const tools::Rectangle& rRect,
789  const Point& rStartPt, const Point& rEndPt );
790 
791  void DrawChord(
792  const tools::Rectangle& rRect,
793  const Point& rStartPt, const Point& rEndPt );
794 
796 
797 
800 
802 public:
803  void DrawGradient( const tools::Rectangle& rRect, const Gradient& rGradient );
804  void DrawGradient( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient );
805 
806 protected:
807 
808  virtual bool UsePolyPolygonForComplexGradient() = 0;
809 
810  virtual tools::Long GetGradientStepCount( tools::Long nMinRect );
811 
812 private:
813 
814  SAL_DLLPRIVATE void DrawLinearGradient( const tools::Rectangle& rRect, const Gradient& rGradient, const tools::PolyPolygon* pClipPolyPoly );
815  SAL_DLLPRIVATE void DrawComplexGradient( const tools::Rectangle& rRect, const Gradient& rGradient, const tools::PolyPolygon* pClipPolyPoly );
816  SAL_DLLPRIVATE void DrawGradientToMetafile( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient );
817  SAL_DLLPRIVATE tools::Long GetGradientSteps(Gradient const& rGradient, tools::Rectangle const& rRect);
818  SAL_DLLPRIVATE Color GetSingleColorGradientFill();
820 
821 
824 
826 public:
827 
828 #ifdef _MSC_VER
829  void DrawHatch( const tools::PolyPolygon& rPolyPoly, const ::Hatch& rHatch );
830  void AddHatchActions( const tools::PolyPolygon& rPolyPoly,
831  const ::Hatch& rHatch,
832  GDIMetaFile& rMtf );
833 #else
834  void DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch& rHatch );
835  void AddHatchActions( const tools::PolyPolygon& rPolyPoly,
836  const Hatch& rHatch,
837  GDIMetaFile& rMtf );
838 #endif
839 
840  void DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch& rHatch, bool bMtf );
841 
842 private:
843 
844  SAL_DLLPRIVATE void CalcHatchValues( const tools::Rectangle& rRect, tools::Long nDist, Degree10 nAngle10, Point& rPt1, Point& rPt2, Size& rInc, Point& rEndPt1 );
845  SAL_DLLPRIVATE void DrawHatchLine( const tools::Line& rLine, const tools::PolyPolygon& rPolyPoly, Point* pPtBuffer, bool bMtf );
847 
848 
851 
853 public:
854  void DrawWallpaper( const tools::Rectangle& rRect, const Wallpaper& rWallpaper );
855 
856  void Erase();
857  void Erase(const tools::Rectangle& rRect);
858 
859 protected:
860  void DrawGradientWallpaper( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, const Wallpaper& rWallpaper );
861 
862 private:
863  SAL_DLLPRIVATE void DrawWallpaper( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, const Wallpaper& rWallpaper );
864  SAL_DLLPRIVATE void DrawColorWallpaper( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, const Wallpaper& rWallpaper );
865  SAL_DLLPRIVATE void DrawBitmapWallpaper( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, const Wallpaper& rWallpaper );
867 
868 
871 
873 public:
874 
875  void DrawText( const Point& rStartPt, const OUString& rStr,
876  sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
877  std::vector< tools::Rectangle >* pVector = nullptr, OUString* pDisplayText = nullptr,
878  const SalLayoutGlyphs* pLayoutCache = nullptr );
879 
880  void DrawText( const tools::Rectangle& rRect,
881  const OUString& rStr, DrawTextFlags nStyle = DrawTextFlags::NONE,
882  std::vector< tools::Rectangle >* pVector = nullptr, OUString* pDisplayText = nullptr,
883  vcl::ITextLayout* _pTextLayout = nullptr );
884 
885  static void ImplDrawText( OutputDevice& rTargetDevice, const tools::Rectangle& rRect,
886  const OUString& rOrigStr, DrawTextFlags nStyle,
887  std::vector< tools::Rectangle >* pVector, OUString* pDisplayText, vcl::ITextLayout& _rLayout );
888 
889  void ImplDrawText( SalLayout& );
890 
891  void ImplDrawTextBackground( const SalLayout& );
892 
893  void DrawCtrlText( const Point& rPos, const OUString& rStr,
894  sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
895  DrawTextFlags nStyle = DrawTextFlags::Mnemonic, std::vector< tools::Rectangle >* pVector = nullptr, OUString* pDisplayText = nullptr,
896  const SalLayoutGlyphs* pGlyphs = nullptr);
897 
898  void DrawTextLine( const Point& rPos, tools::Long nWidth,
899  FontStrikeout eStrikeout,
900  FontLineStyle eUnderline,
901  FontLineStyle eOverline,
902  bool bUnderlineAbove = false );
903 
904  void ImplDrawTextLine( tools::Long nBaseX, tools::Long nX, tools::Long nY, DeviceCoordinate nWidth,
905  FontStrikeout eStrikeout, FontLineStyle eUnderline,
906  FontLineStyle eOverline, bool bUnderlineAbove );
907 
908  void ImplDrawTextLines( SalLayout&, FontStrikeout eStrikeout, FontLineStyle eUnderline,
909  FontLineStyle eOverline, bool bWordLine, bool bUnderlineAbove );
910 
911  void DrawWaveLine( const Point& rStartPos, const Point& rEndPos, tools::Long nLineWidth = 1, tools::Long nWaveHeight = 3);
912 
913  bool ImplDrawRotateText( SalLayout& );
914 
916  const OUString& rStr, DrawTextFlags nStyle = DrawTextFlags::WordBreak,
917  TextRectInfo* pInfo = nullptr,
918  const vcl::ITextLayout* _pTextLayout = nullptr ) const;
919 
969  bool GetTextBoundRect( tools::Rectangle& rRect,
970  const OUString& rStr, sal_Int32 nBase = 0, sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
971  sal_uLong nLayoutWidth = 0, o3tl::span<const sal_Int32> pDXArray = {},
972  const SalLayoutGlyphs* pGlyphs = nullptr ) const;
973 
974  tools::Rectangle ImplGetTextBoundRect( const SalLayout& ) const;
975 
976  bool GetTextOutline( tools::PolyPolygon&,
977  const OUString& rStr ) const;
978 
979  bool GetTextOutlines( PolyPolyVector&,
980  const OUString& rStr, sal_Int32 nBase = 0, sal_Int32 nIndex = 0,
981  sal_Int32 nLen = -1,
982  sal_uLong nLayoutWidth = 0, o3tl::span<const sal_Int32> pDXArray = {} ) const;
983 
984  bool GetTextOutlines( basegfx::B2DPolyPolygonVector &rVector,
985  const OUString& rStr, sal_Int32 nBase, sal_Int32 nIndex = 0,
986  sal_Int32 nLen = -1,
987  sal_uLong nLayoutWidth = 0, o3tl::span<const sal_Int32> pDXArray = {} ) const;
988 
989 
990  OUString GetEllipsisString( const OUString& rStr, tools::Long nMaxWidth,
991  DrawTextFlags nStyle = DrawTextFlags::EndEllipsis ) const;
992 
993  tools::Long GetCtrlTextWidth( const OUString& rStr,
994  const SalLayoutGlyphs* pLayoutCache = nullptr ) const;
995 
996  static OUString GetNonMnemonicString( const OUString& rStr, sal_Int32& rMnemonicPos );
997 
998  static OUString GetNonMnemonicString( const OUString& rStr )
999  { sal_Int32 nDummy; return GetNonMnemonicString( rStr, nDummy ); }
1000 
1009  void AddTextRectActions( const tools::Rectangle& rRect,
1010  const OUString& rOrigStr,
1011  DrawTextFlags nStyle,
1012  GDIMetaFile& rMtf );
1013 
1014  void SetTextColor( const Color& rColor );
1015  virtual void SetSystemTextColor(SystemTextColorFlags nFlags, bool bEnabled);
1016  const Color& GetTextColor() const { return maTextColor; }
1017 
1018  void SetTextFillColor();
1019  void SetTextFillColor( const Color& rColor );
1020  Color GetTextFillColor() const;
1021  bool IsTextFillColor() const { return !maFont.IsTransparent(); }
1022 
1023  void SetTextLineColor();
1024  void SetTextLineColor( const Color& rColor );
1025  const Color& GetTextLineColor() const { return maTextLineColor; }
1026  bool IsTextLineColor() const { return !maTextLineColor.IsTransparent(); }
1027 
1028  void SetOverlineColor();
1029  void SetOverlineColor( const Color& rColor );
1030  const Color& GetOverlineColor() const { return maOverlineColor; }
1031  bool IsOverlineColor() const { return !maOverlineColor.IsTransparent(); }
1032 
1033  void SetTextAlign( TextAlign eAlign );
1034  TextAlign GetTextAlign() const { return maFont.GetAlignment(); }
1035 
1040  tools::Long GetTextWidth( const OUString& rStr, sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
1041  vcl::text::TextLayoutCache const* = nullptr,
1042  SalLayoutGlyphs const*const pLayoutCache = nullptr) const;
1043 
1048  tools::Long GetTextHeight() const;
1049  float approximate_digit_width() const;
1050 
1051  void DrawTextArray( const Point& rStartPt, const OUString& rStr,
1053  sal_Int32 nIndex = 0,
1054  sal_Int32 nLen = -1,
1056  const SalLayoutGlyphs* pLayoutCache = nullptr);
1057  tools::Long GetTextArray( const OUString& rStr, std::vector<sal_Int32>* pDXAry,
1058  sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
1059  vcl::text::TextLayoutCache const* = nullptr,
1060  SalLayoutGlyphs const*const pLayoutCache = nullptr) const;
1061 
1062  void GetCaretPositions( const OUString&, sal_Int32* pCaretXArray,
1063  sal_Int32 nIndex, sal_Int32 nLen,
1064  const SalLayoutGlyphs* pGlyphs = nullptr ) const;
1065  void DrawStretchText( const Point& rStartPt, sal_uLong nWidth,
1066  const OUString& rStr,
1067  sal_Int32 nIndex = 0, sal_Int32 nLen = -1);
1068  sal_Int32 GetTextBreak( const OUString& rStr, tools::Long nTextWidth,
1069  sal_Int32 nIndex, sal_Int32 nLen = -1,
1070  tools::Long nCharExtra = 0,
1071  vcl::text::TextLayoutCache const* = nullptr,
1072  const SalLayoutGlyphs* pGlyphs = nullptr) const;
1073  sal_Int32 GetTextBreak( const OUString& rStr, tools::Long nTextWidth,
1074  sal_Unicode nExtraChar, sal_Int32& rExtraCharPos,
1075  sal_Int32 nIndex, sal_Int32 nLen,
1076  tools::Long nCharExtra,
1077  vcl::text::TextLayoutCache const* = nullptr,
1078  const SalLayoutGlyphs* pGlyphs = nullptr) const;
1079  static std::shared_ptr<const vcl::text::TextLayoutCache> CreateTextLayoutCache(OUString const&);
1080 
1081  SAL_DLLPRIVATE SalLayoutFlags GetBiDiLayoutFlags( std::u16string_view rStr,
1082  const sal_Int32 nMinIndex,
1083  const sal_Int32 nEndIndex ) const;
1084 
1085 protected:
1086  SAL_DLLPRIVATE void ImplInitTextLineSize();
1087  SAL_DLLPRIVATE void ImplInitAboveTextLineSize();
1088  static
1089  SAL_DLLPRIVATE tools::Long ImplGetTextLines( const tools::Rectangle& rRect, tools::Long nTextHeight, ImplMultiTextLineInfo& rLineInfo, tools::Long nWidth, const OUString& rStr, DrawTextFlags nStyle, const vcl::ITextLayout& _rLayout );
1090  static
1091  SAL_DLLPRIVATE sal_Int32 ImplBreakLinesWithIterator(const tools::Long nWidth, const OUString& rStr, const vcl::ITextLayout& _rLayout,
1092  const css::uno::Reference<css::linguistic2::XHyphenator>& xHyph,
1093  const css::uno::Reference<css::i18n::XBreakIterator>& xBI,
1094  const bool bHyphenate,
1095  const sal_Int32 nPos, sal_Int32 nBreakPos);
1096  static
1097  SAL_DLLPRIVATE sal_Int32 ImplBreakLinesSimple( const tools::Long nWidth, const OUString& rStr,
1098  const vcl::ITextLayout& _rLayout, const sal_Int32 nPos, sal_Int32 nBreakPos, tools::Long& nLineWidth );
1099  SAL_DLLPRIVATE float approximate_char_width() const;
1100 
1101  virtual bool shouldDrawWavePixelAsRect(tools::Long nLineWidth) const;
1102  virtual void SetWaveLineColors(Color const& rColor, tools::Long nLineWidth);
1103  virtual Size GetWaveLineSize(tools::Long nLineWidth) const;
1104 
1105 private:
1106  SAL_DLLPRIVATE void ImplInitTextColor();
1107 
1108  SAL_DLLPRIVATE void ImplDrawTextDirect( SalLayout&, bool bTextLines);
1109  SAL_DLLPRIVATE void ImplDrawSpecialText( SalLayout& );
1110  SAL_DLLPRIVATE void ImplDrawTextRect( tools::Long nBaseX, tools::Long nBaseY, tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight );
1111 
1112  SAL_DLLPRIVATE void ImplDrawWavePixel( tools::Long nOriginX, tools::Long nOriginY, tools::Long nCurX, tools::Long nCurY, tools::Long nWidth, Degree10 nOrientation, SalGraphics* pGraphics, const OutputDevice& rOutDev, tools::Long nPixWidth, tools::Long nPixHeight );
1113 
1114  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 );
1115  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 );
1116  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 );
1117  SAL_DLLPRIVATE void ImplDrawStrikeoutLine( tools::Long nBaseX, tools::Long nBaseY, tools::Long nX, tools::Long nY, tools::Long nWidth, FontStrikeout eStrikeout, Color aColor );
1118  SAL_DLLPRIVATE void ImplDrawStrikeoutChar( tools::Long nBaseX, tools::Long nBaseY, tools::Long nX, tools::Long nY, tools::Long nWidth, FontStrikeout eStrikeout, Color aColor );
1119  SAL_DLLPRIVATE void ImplDrawMnemonicLine( tools::Long nX, tools::Long nY, tools::Long nWidth );
1120 
1121  SAL_DLLPRIVATE bool AttemptOLEFontScaleFix(vcl::Font& rFont, tools::Long nHeight) const;
1122 
1124 
1125 
1128 
1130 public:
1131 
1132  FontMetric GetFontMetricFromCollection( int nDevFontIndex ) const;
1133  int GetFontFaceCollectionCount() const;
1134 
1135  bool IsFontAvailable( std::u16string_view rFontName ) const;
1136 
1137  bool AddTempDevFont( const OUString& rFileURL, const OUString& rFontName );
1138  void RefreshFontData( const bool bNewFontLists );
1139 
1140  FontMetric GetFontMetric() const;
1141  FontMetric GetFontMetric( const vcl::Font& rFont ) const;
1142 
1143  bool GetFontCharMap( FontCharMapRef& rxFontCharMap ) const;
1144  bool GetFontCapabilities( vcl::FontCapabilities& rFontCapabilities ) const;
1145 
1146  bool GetFontFeatures(std::vector<vcl::font::Feature>& rFontFeatures) const;
1147 
1148  SAL_DLLPRIVATE void ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPolyLine, tools::Rectangle& rRect1, tools::Rectangle& rRect2,
1149  tools::Long& rYOff, tools::Long& rWidth, FontEmphasisMark eEmphasis, tools::Long nHeight );
1150  SAL_DLLPRIVATE static FontEmphasisMark
1151  ImplGetEmphasisMarkStyle( const vcl::Font& rFont );
1152 
1153  bool GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, int nIndex,
1154  int nLen, std::vector< tools::Rectangle >& rVector ) const;
1155 
1156  sal_Int32 HasGlyphs( const vcl::Font& rFont, const OUString& rStr,
1157  sal_Int32 nIndex = 0, sal_Int32 nLen = -1 ) const;
1158 
1159  tools::Long GetMinKashida() const;
1160 
1161  // i60594
1162  // validate kashida positions against the current font
1163  // returns count of invalid kashida positions
1164  sal_Int32 ValidateKashidas( const OUString& rTxt, sal_Int32 nIdx, sal_Int32 nLen,
1165  sal_Int32 nKashCount, // number of suggested kashida positions (in)
1166  const sal_Int32* pKashidaPos, // suggested kashida positions (in)
1167  sal_Int32* pKashidaPosDropped // invalid kashida positions (out)
1168  ) const;
1169 
1170  static void BeginFontSubstitution();
1171  static void EndFontSubstitution();
1172  static void AddFontSubstitute( const OUString& rFontName,
1173  const OUString& rReplaceFontName,
1174  AddFontSubstituteFlags nFlags );
1175  static void RemoveFontsSubstitute();
1176 
1177  static vcl::Font GetDefaultFont( DefaultFontType nType,
1178  LanguageType eLang,
1179  GetDefaultFontFlags nFlags,
1180  const OutputDevice* pOutDev = nullptr );
1181 
1182  SAL_DLLPRIVATE void ImplInitFontList() const;
1183  SAL_DLLPRIVATE void ImplUpdateFontData();
1184 
1185  //drop font data for all outputdevices.
1186  //If bNewFontLists is true then empty lists of system fonts
1187  static void ImplClearAllFontData( bool bNewFontLists );
1188  //fetch font data for all outputdevices
1189  //If bNewFontLists is true then fetch lists of system fonts
1190  static void ImplRefreshAllFontData( bool bNewFontLists );
1191  //drop and fetch font data for all outputdevices
1192  //If bNewFontLists is true then drop and refetch lists of system fonts
1193  SAL_DLLPRIVATE static void ImplUpdateAllFontData( bool bNewFontLists );
1194 
1195  SAL_DLLPRIVATE const LogicalFontInstance* GetFontInstance() const;
1196 
1197 protected:
1198  SAL_DLLPRIVATE tools::Long GetEmphasisAscent() const { return mnEmphasisAscent; }
1199  SAL_DLLPRIVATE tools::Long GetEmphasisDescent() const { return mnEmphasisDescent; }
1200 
1201  SAL_DLLPRIVATE bool InitFont() const;
1202  virtual void SetFontOrientation( LogicalFontInstance* const pFontInstance ) const;
1203  virtual tools::Long GetFontExtLeading() const;
1204 
1205  virtual void ImplClearFontData(bool bNewFontLists);
1206  virtual void ImplRefreshFontData(bool bNewFontLists);
1207  void ReleaseFontCache();
1208  void ReleaseFontCollection();
1209  void SetFontCollectionFromSVData();
1210  void ResetNewFontCache();
1211 
1212  virtual bool ImplNewFont() const;
1213 
1214 private:
1215 
1216  typedef void ( OutputDevice::* FontUpdateHandler_t )( bool );
1217 
1218  SAL_DLLPRIVATE static void ImplUpdateFontDataForAllFrames( FontUpdateHandler_t pHdl, bool bNewFontLists );
1219 
1220  static
1221  SAL_DLLPRIVATE OUString ImplGetEllipsisString( const OutputDevice& rTargetDevice, const OUString& rStr,
1222  tools::Long nMaxWidth, DrawTextFlags nStyle, const vcl::ITextLayout& _rLayout );
1223 
1224  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 );
1225  SAL_DLLPRIVATE void ImplDrawEmphasisMarks( SalLayout& );
1227 
1228 
1231 
1233 public:
1234 
1235  // tells whether this output device is RTL in an LTR UI or LTR in a RTL UI
1236  SAL_DLLPRIVATE bool ImplIsAntiparallel() const ;
1237  SAL_DLLPRIVATE void ReMirror( Point &rPoint ) const;
1238  SAL_DLLPRIVATE void ReMirror( tools::Rectangle &rRect ) const;
1239  SAL_DLLPRIVATE void ReMirror( vcl::Region &rRegion ) const;
1240  SAL_DLLPRIVATE bool ImplIsRecordLayout() const;
1241  virtual bool HasMirroredGraphics() const;
1242  std::unique_ptr<SalLayout>
1243  ImplLayout( const OUString&, sal_Int32 nIndex, sal_Int32 nLen,
1244  const Point& rLogicPos = Point(0,0), tools::Long nLogicWidth=0,
1246  vcl::text::TextLayoutCache const* = nullptr,
1247  const SalLayoutGlyphs* pGlyphs = nullptr) const;
1248 
1249  SAL_DLLPRIVATE vcl::text::ImplLayoutArgs ImplPrepareLayoutArgs( OUString&, const sal_Int32 nIndex, const sal_Int32 nLen,
1250  DeviceCoordinate nPixelWidth,
1252  vcl::text::TextLayoutCache const* = nullptr) const;
1253  SAL_DLLPRIVATE std::unique_ptr<SalLayout>
1254  ImplGlyphFallbackLayout( std::unique_ptr<SalLayout>,
1256  const SalLayoutGlyphs* ) const;
1257  SAL_DLLPRIVATE std::unique_ptr<SalLayout>
1258  getFallbackLayout(
1259  LogicalFontInstance* pLogicalFont, int nFallbackLevel,
1260  vcl::text::ImplLayoutArgs& rLayoutArgs, const SalLayoutGlyphs* ) const;
1261 
1262  /*
1263  These functions allow collecting information on how fonts are mapped when used, such as what
1264  replacements are used when a requested font is missing or which fonts are used as fallbacks
1265  when a font doesn't provide all necessary glyphs.
1266  After StartTrackingFontMappingUse() is called, VCL starts collecting font usage for all
1267  text layout calls, FinishTrackingFontMappingUse() will stop collecting and providing
1268  the collected information.
1269  Each item is a mapping from a requested font to a list of actually used fonts and the number
1270  of times this mapping was done.
1271  */
1273  {
1274  OUString mOriginalFont;
1275  std::vector<OUString> mUsedFonts;
1276  int mCount;
1277  };
1278  typedef std::vector<FontMappingUseItem> FontMappingUseData;
1279  static void StartTrackingFontMappingUse();
1280  static FontMappingUseData FinishTrackingFontMappingUse();
1281 
1282  // Enabling/disabling RTL only makes sense for OutputDevices that use a mirroring SalGraphicsLayout
1283  virtual void EnableRTL( bool bEnable = true);
1284  bool IsRTLEnabled() const { return mbEnableRTL; }
1285 
1286  bool GetTextIsRTL( const OUString&, sal_Int32 nIndex, sal_Int32 nLen ) const;
1287 
1289 
1290 
1293 
1295 public:
1296  void DrawBitmap(
1297  const Point& rDestPt,
1298  const Bitmap& rBitmap );
1299 
1300  void DrawBitmap(
1301  const Point& rDestPt,
1302  const Size& rDestSize,
1303  const Bitmap& rBitmap );
1304 
1305  void DrawBitmap(
1306  const Point& rDestPt,
1307  const Size& rDestSize,
1308  const Point& rSrcPtPixel,
1309  const Size& rSrcSizePixel,
1310  const Bitmap& rBitmap);
1311 
1312  void DrawBitmap(
1313  const Point& rDestPt,
1314  const Size& rDestSize,
1315  const Point& rSrcPtPixel,
1316  const Size& rSrcSizePixel,
1317  const Bitmap& rBitmap,
1318  MetaActionType nAction );
1319 
1320  void DrawBitmapEx(
1321  const Point& rDestPt,
1322  const BitmapEx& rBitmapEx );
1323 
1324 
1325  void DrawBitmapEx(
1326  const Point& rDestPt,
1327  const Size& rDestSize,
1328  const BitmapEx& rBitmapEx );
1329 
1330  void DrawBitmapEx(
1331  const Point& rDestPt,
1332  const Size& rDestSize,
1333  const Point& rSrcPtPixel,
1334  const Size& rSrcSizePixel,
1335  const BitmapEx& rBitmapEx);
1336 
1337  void DrawBitmapEx(
1338  const Point& rDestPt,
1339  const Size& rDestSize,
1340  const Point& rSrcPtPixel,
1341  const Size& rSrcSizePixel,
1342  const BitmapEx& rBitmapEx,
1343  MetaActionType nAction );
1344 
1352  void DrawImage(
1353  const Point& rPos,
1354  const Image& rImage,
1356 
1357  void DrawImage(
1358  const Point& rPos,
1359  const Size& rSize,
1360  const Image& rImage,
1362 
1363 
1364  virtual Bitmap GetBitmap( const Point& rSrcPt, const Size& rSize ) const;
1365 
1368  BitmapEx GetBitmapEx( const Point& rSrcPt, const Size& rSize ) const;
1369 
1370 
1384  void DrawTransformedBitmapEx(
1385  const basegfx::B2DHomMatrix& rTransformation,
1386  const BitmapEx& rBitmapEx,
1387  double fAlpha = 1.0);
1388 
1393  bool HasFastDrawTransformedBitmap() const;
1394 
1395 protected:
1396 
1397  virtual void DrawDeviceBitmapEx(
1398  const Point& rDestPt, const Size& rDestSize,
1399  const Point& rSrcPtPixel, const Size& rSrcSizePixel,
1400  BitmapEx& rBitmapEx );
1401 
1402  virtual bool CanSubsampleBitmap() const { return true; }
1403 
1411  virtual bool DrawTransformBitmapExDirect(
1412  const basegfx::B2DHomMatrix& aFullTransform,
1413  const BitmapEx& rBitmapEx,
1414  double fAlpha = 1.0);
1415 
1427  virtual bool TransformAndReduceBitmapExToTargetRange(
1428  const basegfx::B2DHomMatrix& aFullTransform,
1429  basegfx::B2DRange &aVisibleRange,
1430  double &fMaximumArea);
1431 
1432 private:
1433 
1434  SAL_DLLPRIVATE void DrawDeviceAlphaBitmap(
1435  const Bitmap& rBmp,
1436  const AlphaMask& rAlpha,
1437  const Point& rDestPt,
1438  const Size& rDestSize,
1439  const Point& rSrcPtPixel,
1440  const Size& rSrcSizePixel );
1441 
1442  SAL_DLLPRIVATE void DrawDeviceAlphaBitmapSlowPath(
1443  const Bitmap& rBitmap, const AlphaMask& rAlpha,
1444  tools::Rectangle aDstRect, tools::Rectangle aBmpRect,
1445  Size const & aOutSz, Point const & aOutPt);
1446 
1447 
1448  SAL_DLLPRIVATE void BlendBitmap(
1449  const SalTwoRect& rPosAry,
1450  const Bitmap& rBmp );
1451 
1452  SAL_DLLPRIVATE Bitmap BlendBitmap(
1453  Bitmap& aBmp,
1454  BitmapReadAccess const * pP,
1455  BitmapReadAccess const * pA,
1456  const sal_Int32 nOffY,
1457  const sal_Int32 nDstHeight,
1458  const sal_Int32 nOffX,
1459  const sal_Int32 nDstWidth,
1460  const tools::Rectangle& aBmpRect,
1461  const Size& aOutSz,
1462  const bool bHMirr,
1463  const bool bVMirr,
1464  const sal_Int32* pMapX,
1465  const sal_Int32* pMapY );
1466 
1467  SAL_DLLPRIVATE Bitmap BlendBitmapWithAlpha(
1468  Bitmap& aBmp,
1469  BitmapReadAccess const * pP,
1470  BitmapReadAccess const * pA,
1471  const tools::Rectangle& aDstRect,
1472  const sal_Int32 nOffY,
1473  const sal_Int32 nDstHeight,
1474  const sal_Int32 nOffX,
1475  const sal_Int32 nDstWidth,
1476  const sal_Int32* pMapX,
1477  const sal_Int32* pMapY );
1478 
1480 
1481 
1484 
1486 public:
1487 
1498  bool RemoveTransparenciesFromMetaFile(
1499  const GDIMetaFile& rInMtf, GDIMetaFile& rOutMtf,
1500  tools::Long nMaxBmpDPIX, tools::Long nMaxBmpDPIY,
1501  bool bReduceTransparency,
1502  bool bTransparencyAutoMode,
1503  bool bDownsampleBitmaps,
1504  const Color& rBackground = COL_TRANSPARENT );
1505 
1506  void DrawTransparent( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent );
1507 
1508  void DrawTransparent(
1509  const basegfx::B2DHomMatrix& rObjectTransform,
1510  const basegfx::B2DPolyPolygon& rB2DPolyPoly,
1511  double fTransparency);
1512 
1513  void DrawTransparent(
1514  const GDIMetaFile& rMtf, const Point& rPos, const Size& rSize,
1515  const Gradient& rTransparenceGradient );
1516 
1517 protected:
1518 
1519  virtual void EmulateDrawTransparent( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent );
1520 
1521  virtual void ClipAndDrawGradientMetafile ( const Gradient &rGradient, const tools::PolyPolygon &rPolyPoly );
1522 
1523 private:
1524 
1525  SAL_DLLPRIVATE bool DrawTransparentNatively( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent );
1527 
1528 
1531 
1533 public:
1534 
1535  void DrawMask( const Point& rDestPt,
1536  const Bitmap& rBitmap, const Color& rMaskColor );
1537 
1538  void DrawMask( const Point& rDestPt, const Size& rDestSize,
1539  const Bitmap& rBitmap, const Color& rMaskColor );
1540 
1541  void DrawMask( const Point& rDestPt, const Size& rDestSize,
1542  const Point& rSrcPtPixel, const Size& rSrcSizePixel,
1543  const Bitmap& rBitmap, const Color& rMaskColor);
1544 
1545  void DrawMask( const Point& rDestPt, const Size& rDestSize,
1546  const Point& rSrcPtPixel, const Size& rSrcSizePixel,
1547  const Bitmap& rBitmap, const Color& rMaskColor,
1548  MetaActionType nAction );
1549 
1550 protected:
1551 
1552  virtual void DrawDeviceMask (
1553  const Bitmap& rMask, const Color& rMaskColor,
1554  const Point& rDestPt, const Size& rDestSize,
1555  const Point& rSrcPtPixel, const Size& rSrcSizePixel );
1557 
1558 
1561 
1563 public:
1564 
1565  void EnableMapMode( bool bEnable = true );
1566  bool IsMapModeEnabled() const { return mbMap; }
1567 
1568  void SetMapMode();
1569  void SetMapMode( const MapMode& rNewMapMode );
1570  void SetRelativeMapMode( const MapMode& rNewMapMode );
1571  virtual void SetMetafileMapMode(const MapMode& rNewMapMode, bool bIsRecord);
1572  const MapMode& GetMapMode() const { return maMapMode; }
1573 
1574 protected:
1575  virtual void ImplInitMapModeObjects();
1576 
1577 public:
1578  // #i75163#
1579  basegfx::B2DHomMatrix GetViewTransformation() const;
1580  basegfx::B2DHomMatrix GetInverseViewTransformation() const;
1581 
1582  basegfx::B2DHomMatrix GetViewTransformation( const MapMode& rMapMode ) const;
1583  basegfx::B2DHomMatrix GetInverseViewTransformation( const MapMode& rMapMode ) const;
1584 
1585 
1608  void SetPixelOffset( const Size& rOffset );
1609 
1616  SAL_WARN_UNUSED_RESULT Size GetPixelOffset() const { return Size(mnOutOffOrigX, mnOutOffOrigY);}
1617 
1618  SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point& rLogicPt) const;
1619  SAL_WARN_UNUSED_RESULT Size LogicToPixel(const Size& rLogicSize) const;
1620  SAL_WARN_UNUSED_RESULT tools::Rectangle LogicToPixel(const tools::Rectangle& rLogicRect) const;
1621  SAL_WARN_UNUSED_RESULT tools::Polygon LogicToPixel(const tools::Polygon& rLogicPoly) const;
1622  SAL_WARN_UNUSED_RESULT tools::PolyPolygon LogicToPixel(const tools::PolyPolygon& rLogicPolyPoly) const;
1623  SAL_WARN_UNUSED_RESULT basegfx::B2DPolyPolygon LogicToPixel(const basegfx::B2DPolyPolygon& rLogicPolyPoly) const;
1624  SAL_WARN_UNUSED_RESULT vcl::Region LogicToPixel(const vcl::Region& rLogicRegion)const;
1625  SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point& rLogicPt, const MapMode& rMapMode) const;
1626  SAL_WARN_UNUSED_RESULT Size LogicToPixel(const Size& rLogicSize, const MapMode& rMapMode) const;
1627  SAL_WARN_UNUSED_RESULT tools::Rectangle LogicToPixel(const tools::Rectangle& rLogicRect,
1628  const MapMode& rMapMode) const;
1629  SAL_WARN_UNUSED_RESULT tools::Polygon LogicToPixel(const tools::Polygon& rLogicPoly,
1630  const MapMode& rMapMode) const;
1631  SAL_WARN_UNUSED_RESULT basegfx::B2DPolyPolygon LogicToPixel(const basegfx::B2DPolyPolygon& rLogicPolyPoly,
1632  const MapMode& rMapMode) const;
1633 
1634  SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point& rDevicePt) const;
1635  SAL_WARN_UNUSED_RESULT Size PixelToLogic(const Size& rDeviceSize) const;
1636  SAL_WARN_UNUSED_RESULT tools::Rectangle PixelToLogic(const tools::Rectangle& rDeviceRect) const;
1637  SAL_WARN_UNUSED_RESULT tools::Polygon PixelToLogic(const tools::Polygon& rDevicePoly) const;
1638  SAL_WARN_UNUSED_RESULT tools::PolyPolygon PixelToLogic(const tools::PolyPolygon& rDevicePolyPoly) const;
1639  SAL_WARN_UNUSED_RESULT basegfx::B2DPolyPolygon PixelToLogic(const basegfx::B2DPolyPolygon& rDevicePolyPoly) const;
1640  SAL_WARN_UNUSED_RESULT vcl::Region PixelToLogic(const vcl::Region& rDeviceRegion) const;
1641  SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point& rDevicePt, const MapMode& rMapMode) const;
1642  SAL_WARN_UNUSED_RESULT Size PixelToLogic(const Size& rDeviceSize, const MapMode& rMapMode) const;
1643  SAL_WARN_UNUSED_RESULT tools::Rectangle PixelToLogic(const tools::Rectangle& rDeviceRect,
1644  const MapMode& rMapMode) const;
1645  SAL_WARN_UNUSED_RESULT tools::Polygon PixelToLogic(const tools::Polygon& rDevicePoly,
1646  const MapMode& rMapMode) const;
1647  SAL_WARN_UNUSED_RESULT basegfx::B2DPolygon PixelToLogic(const basegfx::B2DPolygon& rDevicePoly,
1648  const MapMode& rMapMode) const;
1649  SAL_WARN_UNUSED_RESULT basegfx::B2DPolyPolygon PixelToLogic(const basegfx::B2DPolyPolygon& rDevicePolyPoly,
1650  const MapMode& rMapMode) const;
1651 
1652  SAL_WARN_UNUSED_RESULT Point LogicToLogic(const Point& rPtSource,
1653  const MapMode* pMapModeSource,
1654  const MapMode* pMapModeDest) const;
1655  SAL_WARN_UNUSED_RESULT Size LogicToLogic(const Size& rSzSource,
1656  const MapMode* pMapModeSource,
1657  const MapMode* pMapModeDest) const;
1658  SAL_WARN_UNUSED_RESULT tools::Rectangle LogicToLogic(const tools::Rectangle& rRectSource,
1659  const MapMode* pMapModeSource,
1660  const MapMode* pMapModeDest) const;
1661  SAL_WARN_UNUSED_RESULT static Point LogicToLogic(const Point& rPtSource,
1662  const MapMode& rMapModeSource,
1663  const MapMode& rMapModeDest);
1664  SAL_WARN_UNUSED_RESULT static Size LogicToLogic(const Size& rSzSource,
1665  const MapMode& rMapModeSource,
1666  const MapMode& rMapModeDest);
1667  SAL_WARN_UNUSED_RESULT static tools::Rectangle LogicToLogic(const tools::Rectangle& rRectSource,
1668  const MapMode& rMapModeSource,
1669  const MapMode& rMapModeDest);
1670  SAL_WARN_UNUSED_RESULT static tools::Long LogicToLogic(tools::Long nLongSource,
1671  MapUnit eUnitSource,
1672  MapUnit eUnitDest);
1673 
1674  SAL_WARN_UNUSED_RESULT static basegfx::B2DPolygon LogicToLogic(const basegfx::B2DPolygon& rPoly,
1675  const MapMode& rMapModeSource,
1676  const MapMode& rMapModeDest);
1677 
1678  // create a mapping transformation from rMapModeSource to rMapModeDest (the above methods
1679  // for B2DPoly/Polygons use this internally anyway to transform the B2DPolygon)
1680  SAL_WARN_UNUSED_RESULT static basegfx::B2DHomMatrix LogicToLogic(const MapMode& rMapModeSource,
1681  const MapMode& rMapModeDest);
1682 
1689  SAL_DLLPRIVATE tools::Rectangle ImplLogicToDevicePixel( const tools::Rectangle& rLogicRect ) const;
1690 
1697  SAL_DLLPRIVATE Point ImplLogicToDevicePixel( const Point& rLogicPt ) const;
1698  SAL_DLLPRIVATE DevicePoint ImplLogicToDeviceFontCoordinate(const Point& rLogicPt) const;
1699 
1710  SAL_DLLPRIVATE tools::Long ImplLogicWidthToDevicePixel( tools::Long nWidth ) const;
1711  SAL_DLLPRIVATE double ImplLogicWidthToDeviceFontWidth(tools::Long nWidth) const;
1712 
1713  SAL_DLLPRIVATE DeviceCoordinate LogicWidthToDeviceCoordinate( tools::Long nWidth ) const;
1714 
1726  SAL_DLLPRIVATE tools::Long ImplLogicXToDevicePixel( tools::Long nX ) const;
1727 
1739  SAL_DLLPRIVATE tools::Long ImplLogicYToDevicePixel( tools::Long nY ) const;
1740 
1751  SAL_DLLPRIVATE tools::Long ImplLogicHeightToDevicePixel( tools::Long nHeight ) const;
1752 
1762  SAL_DLLPRIVATE tools::Long ImplDevicePixelToLogicWidth( tools::Long nWidth ) const;
1763 
1773  SAL_DLLPRIVATE tools::Long ImplDevicePixelToLogicHeight( tools::Long nHeight ) const;
1774 
1784  SAL_DLLPRIVATE float ImplFloatLogicHeightToDevicePixel( float fLogicHeight ) const;
1785 
1792  SAL_DLLPRIVATE Size ImplLogicToDevicePixel( const Size& rLogicSize ) const;
1793 
1800  SAL_DLLPRIVATE tools::Rectangle ImplDevicePixelToLogic( const tools::Rectangle& rPixelRect ) const;
1801 
1808  SAL_DLLPRIVATE tools::Polygon ImplLogicToDevicePixel( const tools::Polygon& rLogicPoly ) const;
1809 
1816  SAL_DLLPRIVATE ::basegfx::B2DPolygon ImplLogicToDevicePixel( const ::basegfx::B2DPolygon& rLogicPoly ) const;
1817 
1824  SAL_DLLPRIVATE tools::PolyPolygon ImplLogicToDevicePixel( const tools::PolyPolygon& rLogicPolyPoly ) const;
1825 
1832  SAL_DLLPRIVATE LineInfo ImplLogicToDevicePixel( const LineInfo& rLineInfo ) const;
1833 
1840  SAL_DLLPRIVATE vcl::Region ImplPixelToDevicePixel( const vcl::Region& rRegion ) const;
1841 
1846  SAL_DLLPRIVATE void ImplInvalidateViewTransform();
1847 
1852  SAL_DLLPRIVATE basegfx::B2DHomMatrix ImplGetDeviceTransformation() const;
1854 
1855 
1860 
1862 public:
1863 
1866  virtual bool CanEnableNativeWidget() const { return false; }
1867 
1870  bool IsNativeControlSupported( ControlType nType, ControlPart nPart ) const;
1871 
1874  bool HitTestNativeScrollbar(
1875  ControlPart nPart,
1876  const tools::Rectangle& rControlRegion,
1877  const Point& aPos,
1878  bool& rIsInside ) const;
1879 
1882  bool DrawNativeControl(
1883  ControlType nType,
1884  ControlPart nPart,
1885  const tools::Rectangle& rControlRegion,
1886  ControlState nState,
1887  const ImplControlValue& aValue,
1888  const OUString& aCaption,
1889  const Color& rBackgroundColor = COL_AUTO );
1890 
1893  bool GetNativeControlRegion(
1894  ControlType nType,
1895  ControlPart nPart,
1896  const tools::Rectangle& rControlRegion,
1897  ControlState nState,
1898  const ImplControlValue& aValue,
1899  tools::Rectangle &rNativeBoundingRegion,
1900  tools::Rectangle &rNativeContentRegion ) const;
1902 
1905 
1907 public:
1908 
1914  bool DrawEPS(
1915  const Point& rPt, const Size& rSz,
1916  const GfxLink& rGfxLink, GDIMetaFile* pSubst = nullptr );
1918 
1919 public:
1920  virtual css::awt::DeviceInfo GetDeviceInfo() const;
1921 
1923  virtual vcl::Window* GetOwnerWindow() const { return nullptr; }
1924 
1925 protected:
1926  css::awt::DeviceInfo GetCommonDeviceInfo(Size const& aDevSize) const;
1927 
1928 };
1929 
1930 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
BitmapEx GetBitmapEx(BitmapEx const &rBitmapEx, DrawModeFlags nDrawMode)
Definition: drawmode.cxx:224
#define SAL_WARN_UNUSED_RESULT
tools::Long GetTextHeight() const
Height where any character of the current font fits; in logic coordinates.
Definition: window3.cxx:65
VclReferenceBase & operator=(const VclReferenceBase &)=delete
const Color & GetTextColor() const
Definition: outdev.hxx:1016
OutDevType GetOutDevType() const
Definition: outdev.hxx:413
sal_Int32 mnDPIScalePercentage
For HiDPI displays, we want to draw elements for a percentage larger.
Definition: outdev.hxx:220
virtual void Flush()
Definition: outdev.hxx:436
void SetBackground()
Definition: window3.cxx:100
VclPtr< OutputDevice > mpNextGraphics
Next output device in list.
Definition: outdev.hxx:190
tools::SvRef< FontCharMap > FontCharMapRef
Definition: outdev.hxx:155
virtual Color GetMonochromeButtonColor()
Definition: outdev.hxx:429
const Wallpaper & GetBackground() const
Definition: outdev.hxx:534
Definition: hatch.hxx:46
B2IVector B2ISize
tools::Long mnOutOffLogicX
Additional output offset in logical coordinates, applied in PixelToLogic (used by SetPixelOffset/GetP...
Definition: outdev.hxx:207
SAL_DLLPRIVATE tools::Long GetEmphasisAscent() const
Definition: outdev.hxx:1198
tools::Long mnOutOffOrigY
Additional output pixel offset, applied in LogicToPixel (used by SetPixelOffset/GetPixelOffset) ...
Definition: outdev.hxx:209
AntialiasingFlags
Color maTextColor
Definition: outdev.hxx:235
const Point & GetRefPoint() const
Definition: outdev.hxx:314
void ImplHandleResize(vcl::Window *pWindow, tools::Long nNewWidth, tools::Long nNewHeight)
Definition: winproc.cxx:1854
bool IsTransparent() const
const Color & GetTextLineColor() const
Definition: outdev.hxx:1025
constexpr double deg2rad(double v)
SAL_DLLPRIVATE float approximate_char_width() const
Definition: window3.cxx:61
void SetOverlineColor()
Definition: window3.cxx:95
void SetSettings(const AllSettings &rSettings)
Definition: window3.cxx:208
bool IsBackground() const
Definition: outdev.hxx:537
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
DrawModeFlags mnDrawMode
Definition: outdev.hxx:226
Color maLineColor
Definition: outdev.hxx:232
sal_uIntPtr sal_uLong
long Long
TextAlign GetTextAlign() const
Definition: outdev.hxx:1034
bool IsOutputEnabled() const
Definition: outdev.hxx:487
FontEmphasisMark
SAL_DLLPRIVATE void SetDPIX(sal_Int32 nDPIX)
Definition: outdev.hxx:400
float approximate_digit_width() const
Definition: window3.cxx:72
bool IsMapModeEnabled() const
Definition: outdev.hxx:1566
bool IsTextLineColor() const
Definition: outdev.hxx:1026
tools::Long GetOutOffXPixel() const
Definition: outdev.hxx:325
vcl::Region maRegion
Definition: outdev.hxx:231
tools::Long mnOutOffY
Output offset for device output in pixel (pseudo window offset within window system's frames) ...
Definition: outdev.hxx:215
const MapMode & GetMapMode() const
Definition: outdev.hxx:1572
sal_Int32 mnDPIY
Definition: outdev.hxx:219
std::vector< VCLXGraphics * > * mpUnoGraphicsList
Definition: outdev.hxx:196
std::shared_ptr< vcl::font::PhysicalFontCollection > mxFontCollection
Definition: outdev.hxx:268
GDIMetaFile * GetConnectMetaFile() const
Definition: outdev.hxx:292
bool GetTextRenderModeForResolutionIndependentLayout() const
Definition: outdev.hxx:495
sal_Int32 mnDPIX
Definition: outdev.hxx:218
vcl::text::ComplexTextLayoutFlags GetLayoutMode() const
Definition: outdev.hxx:501
static OUString GetNonMnemonicString(const OUString &rStr)
Definition: window.hxx:1564
sal_Int32 DeviceCoordinate
AntialiasingFlags GetAntialiasing() const
Definition: outdev.hxx:491
tools::Long mnEmphasisDescent
Definition: outdev.hxx:225
DrawTextFlags
void SetTextColor(const Color &rColor)
Definition: window3.cxx:108
tools::Long mnOutOffOrigX
Additional output pixel offset, applied in LogicToPixel (used by SetPixelOffset/GetPixelOffset) ...
Definition: outdev.hxx:205
OutDevSupportType
Definition: vclenum.hxx:195
void SetTextLineColor()
Definition: window3.cxx:93
MapMode maMapMode
Definition: outdev.hxx:241
std::unique_ptr< vcl::font::PhysicalFontFaceCollection > mpFontFaceCollection
Definition: outdev.hxx:193
const Color & GetOverlineColor() const
Definition: outdev.hxx:1030
sal_uInt16 sal_Unicode
static OUString GetNonMnemonicString(const OUString &rStr)
Definition: outdev.hxx:998
Color maOverlineColor
Definition: outdev.hxx:237
const vcl::Font & GetFont() const
Definition: outdev.hxx:540
DrawImageFlags
OutDevViewType meOutDevViewType
Definition: outdev.hxx:230
virtual bool CanSubsampleBitmap() const
Definition: outdev.hxx:1402
vcl::text::ComplexTextLayoutFlags mnTextLayoutMode
Definition: outdev.hxx:227
TextAlign GetAlignment() const
Definition: font/font.cxx:876
AntialiasingFlags mnAntialiasing
Definition: outdev.hxx:243
SystemTextColorFlags
MetaActionType
Color maFillColor
Definition: outdev.hxx:233
void SetTextFillColor()
Definition: window3.cxx:97
std::unique_ptr< AllSettings > mxSettings
Definition: outdev.hxx:240
std::vector< vcl::State > maOutDevStateStack
Definition: outdev.hxx:194
SalGraphics * mpGraphics
Graphics context to draw on.
Definition: outdev.hxx:188
exports com.sun.star. text
std::shared_ptr< Surface > SurfaceSharedPtr
Definition: cairo.hxx:36
bool IsTextFillColor() const
Definition: outdev.hxx:1021
bool IsRTLEnabled() const
Definition: outdev.hxx:1284
Wallpaper maBackground
Definition: outdev.hxx:239
std::vector< OUString > mUsedFonts
Definition: outdev.hxx:1275
ComplexTextLayoutFlags
Definition: State.hxx:75
bool IsClipRegion() const
Definition: outdev.hxx:566
tools::Long GetOutputHeightPixel() const
Definition: outdev.hxx:324
OutDevType
Definition: outdev.hxx:149
bool IsLineColor() const
Definition: outdev.hxx:522
bool mbTextRenderModeForResolutionIndependentLayout
Definition: outdev.hxx:245
void drawLine(VirtualDevice *dev, Point const &orig, Point const &dest, Size const &pSize)
draws a line from orig to dest knowing penSize
Definition: shape.cxx:111
Size GetOutputSize() const
Definition: outdev.hxx:334
const OutDevType meOutDevType
Definition: outdev.hxx:229
tools::Long mnOutHeight
Definition: outdev.hxx:217
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:175
const Color & GetLineColor() const
Definition: outdev.hxx:521
css::uno::WeakReference< css::rendering::XCanvas > mxCanvas
Definition: outdev.hxx:199
std::vector< tools::PolyPolygon > PolyPolyVector
vcl::Font maFont
Definition: outdev.hxx:234
std::shared_ptr< cairo_surface_t > CairoSurfaceSharedPtr
Definition: cairo.hxx:34
RasterOp meRasterOp
Definition: outdev.hxx:238
const AllSettings & GetSettings() const
Definition: outdev.hxx:295
Size GetOutputSizePixel() const
Definition: outdev.hxx:321
Color maTextLineColor
Definition: outdev.hxx:236
PushFlags
Definition: State.hxx:39
Point PixelToLogic(const Point &rDevicePt) const
Definition: window3.cxx:161
void SetTextAlign(TextAlign eAlign)
Definition: window3.cxx:120
DrawModeFlags GetDrawMode() const
Definition: outdev.hxx:498
RasterOp
Definition: RasterOp.hxx:22
VCL_DLLPUBLIC void InvertFocusRect(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect)
Definition: window2.cxx:2020
tools::Long mnEmphasisAscent
Definition: outdev.hxx:224
TextAlign
float GetDPIScaleFactor() const
Definition: outdev.hxx:403
tools::Long GetOutOffYPixel() const
Definition: outdev.hxx:326
virtual void dispose()
std::vector< VCLXGraphics * > * GetUnoGraphicsList() const
Definition: outdev.hxx:339
ControlType
These types are all based on the supported variants vcl/salnativewidgets.hxx and must be kept in-sync...
#define SAL_WARN_UNUSED
VclPtr< OutputDevice > mpPrevGraphics
Previous output device in list.
Definition: outdev.hxx:189
GetDefaultFontFlags
std::vector< FontMappingUseItem > FontMappingUseData
Definition: outdev.hxx:1278
VclPtr< VirtualDevice > mpAlphaVDev
Definition: outdev.hxx:202
SAL_DLLPRIVATE tools::Long GetEmphasisDescent() const
Definition: outdev.hxx:1199
bool IsRefPoint() const
Definition: outdev.hxx:315
ImplMapRes maMapRes
Definition: outdev.hxx:228
Color GetBackgroundColor() const
Definition: window3.cxx:214
SAL_WARN_UNUSED_RESULT Size GetPixelOffset() const
Get the offset in pixel.
Definition: outdev.hxx:1616
void SetExtOutDevData(vcl::ExtOutDevData *pExtOutDevData)
Definition: outdev.hxx:422
OutputDevice RenderContext
Definition: outdev.hxx:163
tools::Rectangle GetOutputRectPixel() const
Definition: outdev.hxx:331
LanguageType GetDigitLanguage() const
Definition: outdev.hxx:504
OutDevViewType GetOutDevViewType() const
Definition: outdev.hxx:517
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_WHITE
Point GetOutputOffPixel() const
Definition: outdev.hxx:329
bool IsTransparent() const
Definition: font/font.cxx:874
Definition: image.hxx:39
tools::Rectangle GetTextRect(const tools::Rectangle &rRect, const OUString &rStr, DrawTextFlags nStyle=DrawTextFlags::WordBreak, TextRectInfo *pInfo=nullptr, const vcl::ITextLayout *_pTextLayout=nullptr) const
Definition: window3.cxx:201
DrawGridFlags
sal_Int32 GetDPIScalePercentage() const
Definition: outdev.hxx:408
virtual Size GetButtonBorderSize()
Definition: outdev.hxx:428
SAL_DLLPRIVATE void SetDPIY(sal_Int32 nDPIY)
Definition: outdev.hxx:401
RasterOp GetRasterOp() const
Definition: outdev.hxx:507
rtl::Reference< LogicalFontInstance > mpFontInstance
Definition: outdev.hxx:192
BmpMirrorFlags AdjustTwoRect(SalTwoRect &rTwoRect, const Size &rSizePix)
Definition: rect.cxx:341
DefaultFontType
Color GetTextFillColor() const
Definition: window3.cxx:114
tools::Long mnOutWidth
Definition: outdev.hxx:216
Size GetOutputSizePixel() const
Definition: window3.cxx:89
tools::Long GetTextWidth(const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, vcl::text::TextLayoutCache const *=nullptr, SalLayoutGlyphs const *const pLayoutCache=nullptr) const
Width of the text.
Definition: window3.cxx:66
void SetOutDevViewType(OutDevViewType eOutDevViewType)
If this OutputDevice is used for displaying a Print Preview the OutDevViewType should be set to 'OutD...
Definition: outdev.hxx:516
std::shared_ptr< ImplFontCache > mxFontCache
Definition: outdev.hxx:269
MapUnit
tools::Long mnOutOffX
Output offset for device output in pixel (pseudo window offset within window system's frames) ...
Definition: outdev.hxx:213
std::unique_ptr< ImplOutDevData > mpOutDevData
Definition: outdev.hxx:195
vcl::ExtOutDevData * GetExtOutDevData() const
Definition: outdev.hxx:423
void SetFont(const vcl::Font &rNewFont)
Definition: window3.cxx:59
void SetLineColor(const css::uno::Reference< css::beans::XPropertySet > &xGridProperties, sal_Int32 nColor)
vcl::ExtOutDevData * mpExtOutDevData
Definition: outdev.hxx:197
bool IsFillColor() const
Definition: outdev.hxx:527
tools::Long mnOutOffLogicY
Additional output offset in logical coordinates, applied in PixelToLogic (used by SetPixelOffset/GetP...
Definition: outdev.hxx:211
bool IsOverlineColor() const
Definition: outdev.hxx:1031
virtual size_t GetSyncCount() const
Definition: outdev.hxx:342
OutDevViewType
Definition: outdev.hxx:151
InvertFlags
Definition: InvertFlags.hxx:24
FontLineStyle
bool IsDeviceOutputNecessary() const
Definition: outdev.hxx:488
Point maRefPoint
Definition: outdev.hxx:242
AddFontSubstituteFlags
SAL_DLLPRIVATE sal_Int32 GetDPIY() const
Get the output device's DPI y-axis value.
Definition: outdev.hxx:398
virtual vcl::Window * GetOwnerWindow() const
Get the vcl::Window that this OutputDevice belongs to, if any.
Definition: outdev.hxx:1923
struct _cairo_surface cairo_surface_t
Definition: CairoCommon.hxx:72
tools::Long GetOutputWidthPixel() const
Definition: outdev.hxx:323
tools::Long mnTextOffY
Definition: outdev.hxx:223
FontStrikeout
DrawModeFlags
SAL_DLLPRIVATE sal_Int32 GetDPIX() const
Get the output device's DPI x-axis value.
Definition: outdev.hxx:392
virtual bool IsScreenComp() const
Definition: outdev.hxx:317
const Color & GetFillColor() const
Definition: outdev.hxx:526
GDIMetaFile * mpMetaFile
Definition: outdev.hxx:191
::std::vector< B2DPolyPolygon > B2DPolyPolygonVector
SalLayoutFlags
BmpMirrorFlags
LanguageType meTextLanguage
Definition: outdev.hxx:244
virtual bool CanEnableNativeWidget() const
Determine if native widgets can be enabled.
Definition: outdev.hxx:1866
typedef void(CALLTYPE *GetFuncDataPtr)(sal_uInt16 &nNo