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>
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>
53#include <vcl/settings.hxx>
55
59
60#include <unotools/fontdefs.hxx>
62
63#include <com/sun/star/drawing/LineCap.hpp>
64#include <com/sun/star/uno/Reference.h>
65#include <com/sun/star/awt/DeviceInfo.hpp>
66
67#include <memory>
68#include <optional>
69#include <string_view>
70#include <vector>
71
72struct ImplOutDevData;
75class ImplFontCache;
77class SalGraphics;
78class Gradient;
79class Hatch;
81class BitmapEx;
82class Image;
83class TextRectInfo;
84class FontMetric;
85class GDIMetaFile;
86class GfxLink;
87namespace tools {
88 class Line;
89}
90class LineInfo;
91class AlphaMask;
92class FontCharMap;
93class SalLayout;
94class VirtualDevice;
95struct SalTwoRect;
96class Printer;
97class VCLXGraphics;
98class OutDevStateStack;
99class SalLayoutGlyphs;
100
101namespace vcl
102{
103 class ExtOutDevData;
104 class ITextLayout;
105 struct FontCapabilities;
106 class Window;
107 class WindowOutputDevice;
108 namespace font {
109 struct Feature;
110 class PhysicalFontCollection;
111 class PhysicalFontFaceCollection;
112 }
113
114 namespace text {
115 class ImplLayoutArgs;
116 class TextLayoutCache;
117 }
118}
119
120namespace basegfx {
121 class B2DHomMatrix;
122 class B2DPolygon;
123 class B2IVector;
125}
126
127namespace com::sun::star::awt {
128 class XGraphics;
129}
130
132 class XCanvas;
133 class XSpriteCanvas;
134}
136 class XHyphenator;
137}
138namespace com::sun::star::i18n {
139 class XBreakIterator;
140}
141
142// OutputDevice-Types
143
145
147
148// OutputDevice
149
151
152BmpMirrorFlags AdjustTwoRect( SalTwoRect& rTwoRect, const Size& rSizePix );
153void AdjustTwoRect( SalTwoRect& rTwoRect, const tools::Rectangle& rValidSrcRect );
154
155class OutputDevice;
156
157namespace vcl {
159}
160
161VCL_DLLPUBLIC void InvertFocusRect(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect);
162
163typedef struct _cairo_surface cairo_surface_t;
164
171{
172 friend class Printer;
173 friend class VirtualDevice;
174 friend class vcl::Window;
176 friend class WorkWindow;
177 friend void ImplHandleResize( vcl::Window* pWindow, tools::Long nNewWidth, tools::Long nNewHeight );
178
179private:
180 OutputDevice(const OutputDevice&) = delete;
182
188 mutable std::unique_ptr<vcl::font::PhysicalFontFaceCollection> mpFontFaceCollection;
189 std::vector<vcl::State> maOutDevStateStack;
190 std::unique_ptr<ImplOutDevData> mpOutDevData;
191 std::vector< VCLXGraphics* >* mpUnoGraphicsList;
193 // The canvas interface for this output device. Is persistent after the first GetCanvas() call
194 mutable css::uno::WeakReference< css::rendering::XCanvas > mxCanvas;
195
196 // TEMP TEMP TEMP
198
213 sal_Int32 mnDPIX;
214 sal_Int32 mnDPIY;
226 vcl::Region maRegion; // contains the clip region, see SetClipRegion(...)
235 std::optional<AllSettings> moSettings;
240
241 mutable bool mbMap : 1;
242 mutable bool mbClipRegion : 1;
243 mutable bool mbBackground : 1;
244 mutable bool mbOutput : 1;
245 mutable bool mbDevOutput : 1;
246 mutable bool mbOutputClipped : 1;
247 mutable bool mbLineColor : 1;
248 mutable bool mbFillColor : 1;
249 mutable bool mbInitLineColor : 1;
250 mutable bool mbInitFillColor : 1;
251 mutable bool mbInitFont : 1;
252 mutable bool mbInitTextColor : 1;
253 mutable bool mbInitClipRegion : 1;
254 mutable bool mbClipRegionSet : 1;
255 mutable bool mbNewFont : 1;
256 mutable bool mbTextLines : 1;
257 mutable bool mbTextSpecial : 1;
258 mutable bool mbRefPoint : 1;
259 mutable bool mbEnableRTL : 1;
260
261protected:
262 mutable std::shared_ptr<vcl::font::PhysicalFontCollection> mxFontCollection;
263 mutable std::shared_ptr<ImplFontCache> mxFontCache;
264
268
269protected:
270 OutputDevice(OutDevType eOutDevType);
271 virtual ~OutputDevice() override;
272 virtual void dispose() override;
273
274public:
275
282 SalGraphics const *GetGraphics() const;
283 SalGraphics* GetGraphics();
284
285 void SetConnectMetaFile( GDIMetaFile* pMtf );
286 GDIMetaFile* GetConnectMetaFile() const { return mpMetaFile; }
287
288 virtual void SetSettings( const AllSettings& rSettings );
289 const AllSettings& GetSettings() const { return *moSettings; }
290
291 SystemGraphicsData GetSystemGfxData() const;
292 OUString GetRenderBackendName() const;
293
294 // Used by the canvas module. Despite the name it does not always return true if Cairo is supported.
295 bool SupportsCairo() const;
299 cairo::SurfaceSharedPtr CreateSurface(int x, int y, int width, int height) const;
303 css::uno::Any GetNativeSurfaceHandle(cairo::SurfaceSharedPtr& rSurface, const basegfx::B2ISize& rSize) const;
304 css::uno::Any GetSystemGfxDataAny() const;
305
306 void SetRefPoint();
307 void SetRefPoint( const Point& rRefPoint );
308 const Point& GetRefPoint() const { return maRefPoint; }
309 bool IsRefPoint() const { return mbRefPoint; }
310
311 virtual bool IsScreenComp() const { return true; }
312
313 virtual sal_uInt16 GetBitCount() const;
314
316 { return Size( mnOutWidth, mnOutHeight ); }
317 tools::Long GetOutputWidthPixel() const { return mnOutWidth; }
318 tools::Long GetOutputHeightPixel() const { return mnOutHeight; }
319 tools::Long GetOutOffXPixel() const { return mnOutOffX; }
320 tools::Long GetOutOffYPixel() const { return mnOutOffY; }
321 void SetOutOffXPixel(tools::Long nOutOffX);
322 void SetOutOffYPixel(tools::Long nOutOffY);
324 { return Point( mnOutOffX, mnOutOffY ); }
326 { return tools::Rectangle(GetOutputOffPixel(), GetOutputSizePixel() ); }
327
329 { return PixelToLogic( GetOutputSizePixel() ); }
330
331 css::uno::Reference< css::awt::XGraphics >
332 CreateUnoGraphics();
333 std::vector< VCLXGraphics* > *GetUnoGraphicsList() const { return mpUnoGraphicsList; }
334 std::vector< VCLXGraphics* > *CreateUnoGraphicsList();
335
336 virtual size_t GetSyncCount() const { return 0xffffffff; }
337
339 css::uno::Reference< css::rendering::XCanvas > GetCanvas() const;
341 css::uno::Reference< css::rendering::XSpriteCanvas > GetSpriteCanvas() const;
342
343protected:
344
364 virtual bool AcquireGraphics() const = 0;
365
372 virtual void ReleaseGraphics( bool bRelease = true ) = 0;
374
375
379
380public:
381
386 SAL_DLLPRIVATE sal_Int32 GetDPIX() const { return mnDPIX; }
387
392 SAL_DLLPRIVATE sal_Int32 GetDPIY() const { return mnDPIY; }
393
394 SAL_DLLPRIVATE void SetDPIX( sal_Int32 nDPIX ) { mnDPIX = nDPIX; }
395 SAL_DLLPRIVATE void SetDPIY( sal_Int32 nDPIY ) { mnDPIY = nDPIY; }
396
397 float GetDPIScaleFactor() const
398 {
399 return mnDPIScalePercentage / 100.0f;
400 }
401
402 sal_Int32 GetDPIScalePercentage() const
403 {
404 return mnDPIScalePercentage;
405 }
406
407 OutDevType GetOutDevType() const { return meOutDevType; }
408 virtual bool IsVirtual() const;
409
414 bool SupportsOperation( OutDevSupportType ) const;
415
416 void SetExtOutDevData( vcl::ExtOutDevData* pExtOutDevData ) { mpExtOutDevData = pExtOutDevData; }
417 vcl::ExtOutDevData* GetExtOutDevData() const { return mpExtOutDevData; }
418
420
421public:
422 virtual Size GetButtonBorderSize() { return Size(1, 1); };
424
428
429public:
430 virtual void Flush() {}
431
432 virtual void DrawOutDev(
433 const Point& rDestPt, const Size& rDestSize,
434 const Point& rSrcPt, const Size& rSrcSize );
435
436 virtual void DrawOutDev(
437 const Point& rDestPt, const Size& rDestSize,
438 const Point& rSrcPt, const Size& rSrcSize,
439 const OutputDevice& rOutDev );
440
441 virtual void CopyArea(
442 const Point& rDestPt,
443 const Point& rSrcPt, const Size& rSrcSize,
444 bool bWindowInvalidate = false );
445
446protected:
447
448 virtual void CopyDeviceArea( SalTwoRect& aPosAry, bool bWindowInvalidate);
449
450 virtual tools::Rectangle GetBackgroundComponentBounds() const;
451
452 virtual const OutputDevice* DrawOutDevDirectCheck(const OutputDevice& rSrcDev) const;
453
454 virtual void DrawOutDevDirectProcess(const OutputDevice& rSrcDev, SalTwoRect& rPosAry, SalGraphics* pSrcGraphics);
455
456 SAL_DLLPRIVATE void drawOutDevDirect(const OutputDevice& rSrcDev, SalTwoRect& rPosAry);
457
458 SAL_DLLPRIVATE bool is_double_buffered_window() const;
459
460 virtual css::uno::Reference< css::rendering::XCanvas > ImplGetCanvas( bool bSpriteCanvas ) const;
461 SAL_DLLPRIVATE void ImplDisposeCanvas();
462
463private:
464
465 // not implemented; to detect misuses of DrawOutDev(...OutputDevice&);
466 SAL_DLLPRIVATE void DrawOutDev( const Point&, const Size&, const Point&, const Size&, const Printer&) = delete;
468
469
473
474public:
475
476 void Push( vcl::PushFlags nFlags = vcl::PushFlags::ALL );
477 void Pop();
478 void ClearStack();
479
480 void EnableOutput( bool bEnable = true );
481 bool IsOutputEnabled() const { return mbOutput; }
482 bool IsDeviceOutputNecessary() const { return (mbOutput && mbDevOutput); }
483
484 void SetAntialiasing( AntialiasingFlags nMode );
485 AntialiasingFlags GetAntialiasing() const { return mnAntialiasing; }
486
487 void SetDrawMode( DrawModeFlags nDrawMode );
488 DrawModeFlags GetDrawMode() const { return mnDrawMode; }
489
490 void SetLayoutMode( vcl::text::ComplexTextLayoutFlags nTextLayoutMode );
491 vcl::text::ComplexTextLayoutFlags GetLayoutMode() const { return mnTextLayoutMode; }
492
493 void SetDigitLanguage( LanguageType );
494 LanguageType GetDigitLanguage() const { return meTextLanguage; }
495
496 void SetRasterOp( RasterOp eRasterOp );
497 RasterOp GetRasterOp() const { return meRasterOp; }
498
506 void SetOutDevViewType( OutDevViewType eOutDevViewType ) { meOutDevViewType=eOutDevViewType; }
507 OutDevViewType GetOutDevViewType() const { return meOutDevViewType; }
508
509 void SetLineColor();
510 void SetLineColor( const Color& rColor );
511 const Color& GetLineColor() const { return maLineColor; }
512 bool IsLineColor() const { return mbLineColor; }
513
514 void SetFillColor();
515 void SetFillColor( const Color& rColor );
516 const Color& GetFillColor() const { return maFillColor; }
517 bool IsFillColor() const { return mbFillColor; }
518
519 void SetBackground();
520 void SetBackground( const Wallpaper& rBackground );
521 virtual void SaveBackground(VirtualDevice& rSaveDevice,
522 const Point& rPos, const Size& rSize, const Size& rBackgroundSize) const;
523
524 const Wallpaper& GetBackground() const { return maBackground; }
525 virtual Color GetBackgroundColor() const;
526 virtual Color GetReadableFontColor(const Color& rFontColor, const Color& rBgColor) const;
527 bool IsBackground() const { return mbBackground; }
528
529 void SetFont( const vcl::Font& rNewFont );
530 const vcl::Font& GetFont() const { return maFont; }
531
532protected:
533
534 virtual void ImplReleaseFonts();
535
536private:
537
538 SAL_DLLPRIVATE void InitLineColor();
539
540 SAL_DLLPRIVATE void InitFillColor();
541
543
544
548
549public:
550
551 vcl::Region GetClipRegion() const;
552 void SetClipRegion();
553 void SetClipRegion( const vcl::Region& rRegion );
554 bool SelectClipRegion( const vcl::Region&, SalGraphics* pGraphics = nullptr );
555
556 bool IsClipRegion() const { return mbClipRegion; }
557
558 void MoveClipRegion( tools::Long nHorzMove, tools::Long nVertMove );
559 void IntersectClipRegion( const tools::Rectangle& rRect );
560 void IntersectClipRegion( const vcl::Region& rRegion );
561
562 virtual vcl::Region GetActiveClipRegion() const;
563 virtual vcl::Region GetOutputBoundsClipRegion() const;
564
565protected:
566
567 virtual void InitClipRegion();
568
575 virtual vcl::Region ClipToDeviceBounds(vcl::Region aRegion) const;
576 virtual void ClipToPaintRegion ( tools::Rectangle& rDstRect );
577
578private:
579
580 SAL_DLLPRIVATE void SetDeviceClipRegion( const vcl::Region* pRegion );
582
583public:
584 virtual void DrawBorder(tools::Rectangle aBorderRect);
585
586
590
591public:
592
593 void DrawPixel( const Point& rPt );
594 void DrawPixel( const Point& rPt, const Color& rColor );
595
596 Color GetPixel( const Point& rPt ) const;
598
599
603
604public:
605
606 void DrawRect( const tools::Rectangle& rRect );
607 void DrawRect( const tools::Rectangle& rRect,
608 sal_uLong nHorzRount, sal_uLong nVertRound );
609
611 void DrawCheckered(
612 const Point& rPos,
613 const Size& rSize,
614 sal_uInt32 nLen = 8,
615 Color aStart = COL_WHITE,
616 Color aEnd = COL_BLACK);
617
618 void DrawGrid( const tools::Rectangle& rRect, const Size& rDist, DrawGridFlags nFlags );
619
621
625public:
626 void Invert( const tools::Rectangle& rRect, InvertFlags nFlags = InvertFlags::NONE );
627 void Invert( const tools::Polygon& rPoly, InvertFlags nFlags = InvertFlags::NONE );
629
633
634public:
635
636 void DrawLine( const Point& rStartPt, const Point& rEndPt );
637
638 void DrawLine( const Point& rStartPt, const Point& rEndPt,
639 const LineInfo& rLineInfo );
640
641protected:
642 virtual void DrawHatchLine_DrawLine(const Point& rStartPoint, const Point& rEndPoint);
643
644private:
645
648 SAL_DLLPRIVATE void drawLine( basegfx::B2DPolyPolygon aLinePolyPolygon, const LineInfo& rInfo );
650
651
655
656public:
657
666 void DrawPolyLine( const tools::Polygon& rPoly );
667
668 void DrawPolyLine(
669 const basegfx::B2DPolygon&,
670 double fLineWidth = 0.0,
672 css::drawing::LineCap eLineCap = css::drawing::LineCap_BUTT,
673 double fMiterMinimumAngle = basegfx::deg2rad(15.0));
674
685 void DrawPolyLine( const tools::Polygon& rPoly,
686 const LineInfo& rLineInfo );
687
688 // #i101491#
689 // Helper who tries to use SalGDI's DrawPolyLine direct and returns it's bool.
690 bool DrawPolyLineDirect(
691 const basegfx::B2DHomMatrix& rObjectTransform,
692 const basegfx::B2DPolygon& rB2DPolygon,
693 double fLineWidth = 0.0,
694 double fTransparency = 0.0,
695 const std::vector< double >* = nullptr, // MM01
697 css::drawing::LineCap eLineCap = css::drawing::LineCap_BUTT,
698 double fMiterMinimumAngle = basegfx::deg2rad(15.0));
699
700private:
701
702 // #i101491#
703 // Helper which holds the old line geometry creation and is extended to use AA when
704 // switched on. Advantage is that line geometry is only temporarily used for paint
705 SAL_DLLPRIVATE void drawPolyLine(const tools::Polygon& rPoly, const LineInfo& rLineInfo);
706
708
709 bool DrawPolyLineDirectInternal(
710 const basegfx::B2DHomMatrix& rObjectTransform,
711 const basegfx::B2DPolygon& rB2DPolygon,
712 double fLineWidth = 0.0,
713 double fTransparency = 0.0,
714 const std::vector< double >* = nullptr, // MM01
716 css::drawing::LineCap eLineCap = css::drawing::LineCap_BUTT,
717 double fMiterMinimumAngle = basegfx::deg2rad(15.0));
718
722
723public:
724
735 void DrawPolygon( const tools::Polygon& rPoly );
736 void DrawPolygon( const basegfx::B2DPolygon& );
737
748 void DrawPolyPolygon( const tools::PolyPolygon& rPolyPoly );
749 void DrawPolyPolygon( const basegfx::B2DPolyPolygon& );
750
751private:
752
753 SAL_DLLPRIVATE void ImplDrawPolygon( const tools::Polygon& rPoly, const tools::PolyPolygon* pClipPolyPoly = nullptr );
754 SAL_DLLPRIVATE void ImplDrawPolyPolygon( const tools::PolyPolygon& rPolyPoly, const tools::PolyPolygon* pClipPolyPoly );
755 SAL_DLLPRIVATE void ImplDrawPolyPolygon( sal_uInt16 nPoly, const tools::PolyPolygon& rPolyPoly );
756 // #i101491#
757 // Helper who implements the DrawPolyPolygon functionality for basegfx::B2DPolyPolygon
758 // without MetaFile processing
759 SAL_DLLPRIVATE void ImplDrawPolyPolygonWithB2DPolyPolygon(const basegfx::B2DPolyPolygon& rB2DPolyPoly);
761
762 SAL_DLLPRIVATE void ImplDrawWaveLineBezier(tools::Long nStartX, tools::Long nStartY, tools::Long nEndX, tools::Long nEndY, tools::Long nWaveHeight, double fOrientation, tools::Long nLineWidth);
763
764
768
769public:
770
771 void DrawEllipse( const tools::Rectangle& rRect );
772
773 void DrawArc(
774 const tools::Rectangle& rRect,
775 const Point& rStartPt, const Point& rEndPt );
776
777 void DrawPie(
778 const tools::Rectangle& rRect,
779 const Point& rStartPt, const Point& rEndPt );
780
781 void DrawChord(
782 const tools::Rectangle& rRect,
783 const Point& rStartPt, const Point& rEndPt );
784
786
787
791
792public:
793 void DrawGradient( const tools::Rectangle& rRect, const Gradient& rGradient );
794 void DrawGradient( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient );
795
796protected:
797
799
800 virtual tools::Long GetGradientStepCount( tools::Long nMinRect );
801
802private:
803
804 SAL_DLLPRIVATE void DrawLinearGradient( const tools::Rectangle& rRect, const Gradient& rGradient, const tools::PolyPolygon* pClipPolyPoly );
805 SAL_DLLPRIVATE void DrawComplexGradient( const tools::Rectangle& rRect, const Gradient& rGradient, const tools::PolyPolygon* pClipPolyPoly );
806 SAL_DLLPRIVATE void DrawGradientToMetafile( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient );
807 SAL_DLLPRIVATE tools::Long GetGradientSteps(Gradient const& rGradient, tools::Rectangle const& rRect);
808 SAL_DLLPRIVATE Color GetSingleColorGradientFill();
810
811
815
816public:
817
818#ifdef _MSC_VER
819 void DrawHatch( const tools::PolyPolygon& rPolyPoly, const ::Hatch& rHatch );
820 void AddHatchActions( const tools::PolyPolygon& rPolyPoly,
821 const ::Hatch& rHatch,
822 GDIMetaFile& rMtf );
823#else
824 void DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch& rHatch );
825 void AddHatchActions( const tools::PolyPolygon& rPolyPoly,
826 const Hatch& rHatch,
827 GDIMetaFile& rMtf );
828#endif
829
830 void DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch& rHatch, bool bMtf );
831
832private:
833
834 SAL_DLLPRIVATE void CalcHatchValues( const tools::Rectangle& rRect, tools::Long nDist, Degree10 nAngle10, Point& rPt1, Point& rPt2, Size& rInc, Point& rEndPt1 );
835 SAL_DLLPRIVATE void DrawHatchLine( const tools::Line& rLine, const tools::PolyPolygon& rPolyPoly, Point* pPtBuffer, bool bMtf );
837
838
842
843public:
844 void DrawWallpaper( const tools::Rectangle& rRect, const Wallpaper& rWallpaper );
845
846 void Erase();
847 void Erase(const tools::Rectangle& rRect);
848
849protected:
850 void DrawGradientWallpaper( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, const Wallpaper& rWallpaper );
851
852private:
853 SAL_DLLPRIVATE void DrawWallpaper( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, const Wallpaper& rWallpaper );
854 SAL_DLLPRIVATE void DrawColorWallpaper( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, const Wallpaper& rWallpaper );
855 SAL_DLLPRIVATE void DrawBitmapWallpaper( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, const Wallpaper& rWallpaper );
857
858
862
863public:
864
865 void DrawText( const Point& rStartPt, const OUString& rStr,
866 sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
867 std::vector< tools::Rectangle >* pVector = nullptr, OUString* pDisplayText = nullptr,
868 const SalLayoutGlyphs* pLayoutCache = nullptr );
869
870 void DrawText( const tools::Rectangle& rRect,
871 const OUString& rStr, DrawTextFlags nStyle = DrawTextFlags::NONE,
872 std::vector< tools::Rectangle >* pVector = nullptr, OUString* pDisplayText = nullptr,
873 vcl::ITextLayout* _pTextLayout = nullptr );
874
875 static void ImplDrawText( OutputDevice& rTargetDevice, const tools::Rectangle& rRect,
876 const OUString& rOrigStr, DrawTextFlags nStyle,
877 std::vector< tools::Rectangle >* pVector, OUString* pDisplayText, vcl::ITextLayout& _rLayout );
878
879 void ImplDrawText( SalLayout& );
880
881 void ImplDrawTextBackground( const SalLayout& );
882
883 void DrawCtrlText( const Point& rPos, const OUString& rStr,
884 sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
885 DrawTextFlags nStyle = DrawTextFlags::Mnemonic, std::vector< tools::Rectangle >* pVector = nullptr, OUString* pDisplayText = nullptr,
886 const SalLayoutGlyphs* pGlyphs = nullptr);
887
888 void DrawTextLine( const Point& rPos, tools::Long nWidth,
889 FontStrikeout eStrikeout,
890 FontLineStyle eUnderline,
891 FontLineStyle eOverline,
892 bool bUnderlineAbove = false );
893
894 void ImplDrawTextLine( tools::Long nBaseX, tools::Long nX, tools::Long nY, DeviceCoordinate nWidth,
895 FontStrikeout eStrikeout, FontLineStyle eUnderline,
896 FontLineStyle eOverline, bool bUnderlineAbove );
897
898 void ImplDrawTextLines( SalLayout&, FontStrikeout eStrikeout, FontLineStyle eUnderline,
899 FontLineStyle eOverline, bool bWordLine, bool bUnderlineAbove );
900
901 void DrawWaveLine( const Point& rStartPos, const Point& rEndPos, tools::Long nLineWidth = 1, tools::Long nWaveHeight = 3);
902
903 bool ImplDrawRotateText( SalLayout& );
904
906 const OUString& rStr, DrawTextFlags nStyle = DrawTextFlags::WordBreak,
907 TextRectInfo* pInfo = nullptr,
908 const vcl::ITextLayout* _pTextLayout = nullptr ) const;
909
959 bool GetTextBoundRect( tools::Rectangle& rRect,
960 const OUString& rStr, sal_Int32 nBase = 0, sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
961 sal_uLong nLayoutWidth = 0, o3tl::span<const sal_Int32> pDXArray = {},
962 o3tl::span<const sal_Bool> pKashidaArray = {},
963 const SalLayoutGlyphs* pGlyphs = nullptr ) const;
964
965 tools::Rectangle ImplGetTextBoundRect( const SalLayout& ) const;
966
967 bool GetTextOutline( tools::PolyPolygon&,
968 const OUString& rStr ) const;
969
970 bool GetTextOutlines( PolyPolyVector&,
971 const OUString& rStr, sal_Int32 nBase = 0, sal_Int32 nIndex = 0,
972 sal_Int32 nLen = -1,
973 sal_uLong nLayoutWidth = 0, o3tl::span<const sal_Int32> pDXArray = {},
974 o3tl::span<const sal_Bool> pKashidaArray = {} ) const;
975
976 bool GetTextOutlines( basegfx::B2DPolyPolygonVector &rVector,
977 const OUString& rStr, sal_Int32 nBase, sal_Int32 nIndex = 0,
978 sal_Int32 nLen = -1,
979 sal_uLong nLayoutWidth = 0, o3tl::span<const sal_Int32> pDXArray = {},
980 o3tl::span<const sal_Bool> pKashidaArray = {} ) const;
981
982
983 OUString GetEllipsisString( const OUString& rStr, tools::Long nMaxWidth,
985
986 tools::Long GetCtrlTextWidth( const OUString& rStr,
987 const SalLayoutGlyphs* pLayoutCache = nullptr ) const;
988
997 void AddTextRectActions( const tools::Rectangle& rRect,
998 const OUString& rOrigStr,
999 DrawTextFlags nStyle,
1000 GDIMetaFile& rMtf );
1001
1002 void SetTextColor( const Color& rColor );
1003 virtual void SetSystemTextColor(SystemTextColorFlags nFlags, bool bEnabled);
1004 const Color& GetTextColor() const { return maTextColor; }
1005
1006 void SetTextFillColor();
1007 void SetTextFillColor( const Color& rColor );
1008 Color GetTextFillColor() const;
1009 bool IsTextFillColor() const { return !maFont.IsTransparent(); }
1010
1011 void SetTextLineColor();
1012 void SetTextLineColor( const Color& rColor );
1013 const Color& GetTextLineColor() const { return maTextLineColor; }
1014 bool IsTextLineColor() const { return !maTextLineColor.IsTransparent(); }
1015
1016 void SetOverlineColor();
1017 void SetOverlineColor( const Color& rColor );
1018 const Color& GetOverlineColor() const { return maOverlineColor; }
1019 bool IsOverlineColor() const { return !maOverlineColor.IsTransparent(); }
1020
1021 void SetTextAlign( TextAlign eAlign );
1022 TextAlign GetTextAlign() const { return maFont.GetAlignment(); }
1023
1028 tools::Long GetTextWidth( const OUString& rStr, sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
1029 vcl::text::TextLayoutCache const* = nullptr,
1030 SalLayoutGlyphs const*const pLayoutCache = nullptr) const;
1031
1036 tools::Long GetTextHeight() const;
1037 float approximate_digit_width() const;
1038
1039 void DrawTextArray( const Point& rStartPt, const OUString& rStr,
1041 o3tl::span<const sal_Bool> pKashidaAry={},
1042 sal_Int32 nIndex = 0,
1043 sal_Int32 nLen = -1,
1045 const SalLayoutGlyphs* pLayoutCache = nullptr);
1046 tools::Long GetTextArray( const OUString& rStr, std::vector<sal_Int32>* pDXAry,
1047 sal_Int32 nIndex = 0, sal_Int32 nLen = -1, bool bCaret = false,
1048 vcl::text::TextLayoutCache const* = nullptr,
1049 SalLayoutGlyphs const*const pLayoutCache = nullptr) const;
1050
1051 void GetCaretPositions( const OUString&, sal_Int32* pCaretXArray,
1052 sal_Int32 nIndex, sal_Int32 nLen,
1053 const SalLayoutGlyphs* pGlyphs = nullptr ) const;
1054 void DrawStretchText( const Point& rStartPt, sal_uLong nWidth,
1055 const OUString& rStr,
1056 sal_Int32 nIndex = 0, sal_Int32 nLen = -1);
1057 sal_Int32 GetTextBreak( const OUString& rStr, tools::Long nTextWidth,
1058 sal_Int32 nIndex, sal_Int32 nLen = -1,
1059 tools::Long nCharExtra = 0,
1060 vcl::text::TextLayoutCache const* = nullptr,
1061 const SalLayoutGlyphs* pGlyphs = nullptr) const;
1062 sal_Int32 GetTextBreak( const OUString& rStr, tools::Long nTextWidth,
1063 sal_Unicode nExtraChar, sal_Int32& rExtraCharPos,
1064 sal_Int32 nIndex, sal_Int32 nLen,
1065 tools::Long nCharExtra,
1066 vcl::text::TextLayoutCache const* = nullptr,
1067 const SalLayoutGlyphs* pGlyphs = nullptr) const;
1068 static std::shared_ptr<const vcl::text::TextLayoutCache> CreateTextLayoutCache(OUString const&);
1069
1070 SAL_DLLPRIVATE SalLayoutFlags GetBiDiLayoutFlags( std::u16string_view rStr,
1071 const sal_Int32 nMinIndex,
1072 const sal_Int32 nEndIndex ) const;
1073
1074protected:
1075 SAL_DLLPRIVATE void ImplInitTextLineSize();
1076 SAL_DLLPRIVATE void ImplInitAboveTextLineSize();
1077 static
1078 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 );
1079 static
1080 SAL_DLLPRIVATE sal_Int32 ImplBreakLinesWithIterator(const tools::Long nWidth, const OUString& rStr, const vcl::ITextLayout& _rLayout,
1081 const css::uno::Reference<css::linguistic2::XHyphenator>& xHyph,
1082 const css::uno::Reference<css::i18n::XBreakIterator>& xBI,
1083 const bool bHyphenate,
1084 const sal_Int32 nPos, sal_Int32 nBreakPos);
1085 static
1086 SAL_DLLPRIVATE sal_Int32 ImplBreakLinesSimple( const tools::Long nWidth, const OUString& rStr,
1087 const vcl::ITextLayout& _rLayout, const sal_Int32 nPos, sal_Int32 nBreakPos, tools::Long& nLineWidth );
1088 SAL_DLLPRIVATE float approximate_char_width() const;
1089
1090 virtual bool shouldDrawWavePixelAsRect(tools::Long nLineWidth) const;
1091 virtual void SetWaveLineColors(Color const& rColor, tools::Long nLineWidth);
1092 virtual Size GetWaveLineSize(tools::Long nLineWidth) const;
1093
1094private:
1095 SAL_DLLPRIVATE void ImplInitTextColor();
1096
1097 SAL_DLLPRIVATE void ImplDrawTextDirect( SalLayout&, bool bTextLines);
1098 SAL_DLLPRIVATE void ImplDrawSpecialText( SalLayout& );
1099 SAL_DLLPRIVATE void ImplDrawTextRect( tools::Long nBaseX, tools::Long nBaseY, tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight );
1100
1101 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 );
1102
1103 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 );
1104 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 );
1105 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 );
1106 SAL_DLLPRIVATE void ImplDrawStrikeoutLine( tools::Long nBaseX, tools::Long nBaseY, tools::Long nX, tools::Long nY, tools::Long nWidth, FontStrikeout eStrikeout, Color aColor );
1107 SAL_DLLPRIVATE void ImplDrawStrikeoutChar( tools::Long nBaseX, tools::Long nBaseY, tools::Long nX, tools::Long nY, tools::Long nWidth, FontStrikeout eStrikeout, Color aColor );
1108 SAL_DLLPRIVATE void ImplDrawMnemonicLine( tools::Long nX, tools::Long nY, tools::Long nWidth );
1109
1110 SAL_DLLPRIVATE bool AttemptOLEFontScaleFix(vcl::Font& rFont, tools::Long nHeight) const;
1111
1113
1114
1118
1119public:
1120
1121 FontMetric GetFontMetricFromCollection( int nDevFontIndex ) const;
1122 int GetFontFaceCollectionCount() const;
1123
1124 bool IsFontAvailable( std::u16string_view rFontName ) const;
1125
1126 bool AddTempDevFont( const OUString& rFileURL, const OUString& rFontName );
1127 void RefreshFontData( const bool bNewFontLists );
1128
1129 FontMetric GetFontMetric() const;
1130 FontMetric GetFontMetric( const vcl::Font& rFont ) const;
1131
1132 bool GetFontCharMap( FontCharMapRef& rxFontCharMap ) const;
1133 bool GetFontCapabilities( vcl::FontCapabilities& rFontCapabilities ) const;
1134
1135 bool GetFontFeatures(std::vector<vcl::font::Feature>& rFontFeatures) const;
1136
1137 bool GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, int nIndex,
1138 int nLen, std::vector< tools::Rectangle >& rVector ) const;
1139
1140 sal_Int32 HasGlyphs( const vcl::Font& rFont, std::u16string_view rStr,
1141 sal_Int32 nIndex = 0, sal_Int32 nLen = -1 ) const;
1142
1143 tools::Long GetMinKashida() const;
1144
1145 // i60594
1146 // validate kashida positions against the current font
1147 // returns count of invalid kashida positions
1148 sal_Int32 ValidateKashidas( const OUString& rTxt, sal_Int32 nIdx, sal_Int32 nLen,
1149 sal_Int32 nKashCount, // number of suggested kashida positions (in)
1150 const sal_Int32* pKashidaPos, // suggested kashida positions (in)
1151 sal_Int32* pKashidaPosDropped // invalid kashida positions (out)
1152 ) const;
1153
1154 static void BeginFontSubstitution();
1155 static void EndFontSubstitution();
1156 static void AddFontSubstitute( const OUString& rFontName,
1157 const OUString& rReplaceFontName,
1158 AddFontSubstituteFlags nFlags );
1159 static void RemoveFontsSubstitute();
1160
1161 static vcl::Font GetDefaultFont( DefaultFontType nType,
1162 LanguageType eLang,
1163 GetDefaultFontFlags nFlags,
1164 const OutputDevice* pOutDev = nullptr );
1165
1166 SAL_DLLPRIVATE void ImplInitFontList() const;
1167 SAL_DLLPRIVATE void ImplUpdateFontData();
1168
1169 //drop font data for all outputdevices.
1170 //If bNewFontLists is true then empty lists of system fonts
1171 static void ImplClearAllFontData( bool bNewFontLists );
1172 //fetch font data for all outputdevices
1173 //If bNewFontLists is true then fetch lists of system fonts
1174 static void ImplRefreshAllFontData( bool bNewFontLists );
1175 //drop and fetch font data for all outputdevices
1176 //If bNewFontLists is true then drop and refetch lists of system fonts
1177 SAL_DLLPRIVATE static void ImplUpdateAllFontData( bool bNewFontLists );
1178
1179 SAL_DLLPRIVATE const LogicalFontInstance* GetFontInstance() const;
1180
1181protected:
1182 SAL_DLLPRIVATE tools::Long GetEmphasisAscent() const { return mnEmphasisAscent; }
1183 SAL_DLLPRIVATE tools::Long GetEmphasisDescent() const { return mnEmphasisDescent; }
1184
1185 SAL_DLLPRIVATE bool InitFont() const;
1186 virtual void SetFontOrientation( LogicalFontInstance* const pFontInstance ) const;
1187 virtual tools::Long GetFontExtLeading() const;
1188
1189 virtual void ImplClearFontData(bool bNewFontLists);
1190 virtual void ImplRefreshFontData(bool bNewFontLists);
1191 void ReleaseFontCache();
1192 void ReleaseFontCollection();
1193 void SetFontCollectionFromSVData();
1194 void ResetNewFontCache();
1195
1196 virtual bool ImplNewFont() const;
1197
1198private:
1199
1200 typedef void ( OutputDevice::* FontUpdateHandler_t )( bool );
1201
1202 SAL_DLLPRIVATE static void ImplUpdateFontDataForAllFrames( FontUpdateHandler_t pHdl, bool bNewFontLists );
1203
1204 static
1205 SAL_DLLPRIVATE OUString ImplGetEllipsisString( const OutputDevice& rTargetDevice, const OUString& rStr,
1206 tools::Long nMaxWidth, DrawTextFlags nStyle, const vcl::ITextLayout& _rLayout );
1207
1208 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 );
1209 SAL_DLLPRIVATE void ImplDrawEmphasisMarks( SalLayout& );
1211
1212
1216
1217public:
1218
1219 // tells whether this output device is RTL in an LTR UI or LTR in a RTL UI
1220 SAL_DLLPRIVATE bool ImplIsAntiparallel() const ;
1221 SAL_DLLPRIVATE void ReMirror( Point &rPoint ) const;
1222 SAL_DLLPRIVATE void ReMirror( tools::Rectangle &rRect ) const;
1223 SAL_DLLPRIVATE void ReMirror( vcl::Region &rRegion ) const;
1224 SAL_DLLPRIVATE bool ImplIsRecordLayout() const;
1225 virtual bool HasMirroredGraphics() const;
1226 std::unique_ptr<SalLayout>
1227 ImplLayout( const OUString&, sal_Int32 nIndex, sal_Int32 nLen,
1228 const Point& rLogicPos = Point(0,0), tools::Long nLogicWidth=0,
1229 o3tl::span<const sal_Int32> pLogicDXArray={},
1230 o3tl::span<const sal_Bool> pKashidaArray={},
1232 vcl::text::TextLayoutCache const* = nullptr,
1233 const SalLayoutGlyphs* pGlyphs = nullptr) const;
1234
1235 SAL_DLLPRIVATE vcl::text::ImplLayoutArgs ImplPrepareLayoutArgs( OUString&, const sal_Int32 nIndex, const sal_Int32 nLen,
1236 DeviceCoordinate nPixelWidth,
1238 vcl::text::TextLayoutCache const* = nullptr) const;
1239 SAL_DLLPRIVATE std::unique_ptr<SalLayout>
1240 ImplGlyphFallbackLayout( std::unique_ptr<SalLayout>,
1242 const SalLayoutGlyphs* ) const;
1243 SAL_DLLPRIVATE std::unique_ptr<SalLayout>
1244 getFallbackLayout(
1245 LogicalFontInstance* pLogicalFont, int nFallbackLevel,
1246 vcl::text::ImplLayoutArgs& rLayoutArgs, const SalLayoutGlyphs* ) const;
1247
1248 /*
1249 These functions allow collecting information on how fonts are mapped when used, such as what
1250 replacements are used when a requested font is missing or which fonts are used as fallbacks
1251 when a font doesn't provide all necessary glyphs.
1252 After StartTrackingFontMappingUse() is called, VCL starts collecting font usage for all
1253 text layout calls, FinishTrackingFontMappingUse() will stop collecting and providing
1254 the collected information.
1255 Each item is a mapping from a requested font to a list of actually used fonts and the number
1256 of times this mapping was done.
1257 */
1259 {
1261 std::vector<OUString> mUsedFonts;
1263 };
1264 typedef std::vector<FontMappingUseItem> FontMappingUseData;
1265 static void StartTrackingFontMappingUse();
1266 static FontMappingUseData FinishTrackingFontMappingUse();
1267
1268 // Enabling/disabling RTL only makes sense for OutputDevices that use a mirroring SalGraphicsLayout
1269 virtual void EnableRTL( bool bEnable = true);
1270 bool IsRTLEnabled() const { return mbEnableRTL; }
1271
1272 bool GetTextIsRTL( const OUString&, sal_Int32 nIndex, sal_Int32 nLen ) const;
1273
1275
1276
1280
1281public:
1282 void DrawBitmap(
1283 const Point& rDestPt,
1284 const Bitmap& rBitmap );
1285
1286 void DrawBitmap(
1287 const Point& rDestPt,
1288 const Size& rDestSize,
1289 const Bitmap& rBitmap );
1290
1291 void DrawBitmap(
1292 const Point& rDestPt,
1293 const Size& rDestSize,
1294 const Point& rSrcPtPixel,
1295 const Size& rSrcSizePixel,
1296 const Bitmap& rBitmap);
1297
1298 void DrawBitmap(
1299 const Point& rDestPt,
1300 const Size& rDestSize,
1301 const Point& rSrcPtPixel,
1302 const Size& rSrcSizePixel,
1303 const Bitmap& rBitmap,
1304 MetaActionType nAction );
1305
1306 void DrawBitmapEx(
1307 const Point& rDestPt,
1308 const BitmapEx& rBitmapEx );
1309
1310
1311 void DrawBitmapEx(
1312 const Point& rDestPt,
1313 const Size& rDestSize,
1314 const BitmapEx& rBitmapEx );
1315
1316 void DrawBitmapEx(
1317 const Point& rDestPt,
1318 const Size& rDestSize,
1319 const Point& rSrcPtPixel,
1320 const Size& rSrcSizePixel,
1321 const BitmapEx& rBitmapEx);
1322
1323 void DrawBitmapEx(
1324 const Point& rDestPt,
1325 const Size& rDestSize,
1326 const Point& rSrcPtPixel,
1327 const Size& rSrcSizePixel,
1328 const BitmapEx& rBitmapEx,
1329 MetaActionType nAction );
1330
1338 void DrawImage(
1339 const Point& rPos,
1340 const Image& rImage,
1342
1343 void DrawImage(
1344 const Point& rPos,
1345 const Size& rSize,
1346 const Image& rImage,
1348
1349
1350 virtual Bitmap GetBitmap( const Point& rSrcPt, const Size& rSize ) const;
1351
1354 BitmapEx GetBitmapEx( const Point& rSrcPt, const Size& rSize ) const;
1355
1356
1370 void DrawTransformedBitmapEx(
1371 const basegfx::B2DHomMatrix& rTransformation,
1372 const BitmapEx& rBitmapEx,
1373 double fAlpha = 1.0);
1374
1379 bool HasFastDrawTransformedBitmap() const;
1380
1381protected:
1382
1383 virtual void DrawDeviceBitmapEx(
1384 const Point& rDestPt, const Size& rDestSize,
1385 const Point& rSrcPtPixel, const Size& rSrcSizePixel,
1386 BitmapEx& rBitmapEx );
1387
1388 virtual bool CanSubsampleBitmap() const { return true; }
1389
1397 virtual bool DrawTransformBitmapExDirect(
1398 const basegfx::B2DHomMatrix& aFullTransform,
1399 const BitmapEx& rBitmapEx,
1400 double fAlpha = 1.0);
1401
1413 virtual bool TransformAndReduceBitmapExToTargetRange(
1414 const basegfx::B2DHomMatrix& aFullTransform,
1415 basegfx::B2DRange &aVisibleRange,
1416 double &fMaximumArea);
1417
1418private:
1419
1420 SAL_DLLPRIVATE void DrawDeviceAlphaBitmap(
1421 const Bitmap& rBmp,
1422 const AlphaMask& rAlpha,
1423 const Point& rDestPt,
1424 const Size& rDestSize,
1425 const Point& rSrcPtPixel,
1426 const Size& rSrcSizePixel );
1427
1428 SAL_DLLPRIVATE void DrawDeviceAlphaBitmapSlowPath(
1429 const Bitmap& rBitmap, const AlphaMask& rAlpha,
1430 tools::Rectangle aDstRect, tools::Rectangle aBmpRect,
1431 Size const & aOutSz, Point const & aOutPt);
1432
1433
1434 SAL_DLLPRIVATE void BlendBitmap(
1435 const SalTwoRect& rPosAry,
1436 const Bitmap& rBmp );
1437
1438 SAL_DLLPRIVATE Bitmap BlendBitmap(
1439 Bitmap& aBmp,
1440 BitmapReadAccess const * pP,
1441 BitmapReadAccess const * pA,
1442 const sal_Int32 nOffY,
1443 const sal_Int32 nDstHeight,
1444 const sal_Int32 nOffX,
1445 const sal_Int32 nDstWidth,
1446 const tools::Rectangle& aBmpRect,
1447 const Size& aOutSz,
1448 const bool bHMirr,
1449 const bool bVMirr,
1450 const sal_Int32* pMapX,
1451 const sal_Int32* pMapY );
1452
1453 SAL_DLLPRIVATE Bitmap BlendBitmapWithAlpha(
1454 Bitmap& aBmp,
1455 BitmapReadAccess const * pP,
1456 BitmapReadAccess const * pA,
1457 const tools::Rectangle& aDstRect,
1458 const sal_Int32 nOffY,
1459 const sal_Int32 nDstHeight,
1460 const sal_Int32 nOffX,
1461 const sal_Int32 nDstWidth,
1462 const sal_Int32* pMapX,
1463 const sal_Int32* pMapY );
1464
1466
1467
1471
1472public:
1473
1484 bool RemoveTransparenciesFromMetaFile(
1485 const GDIMetaFile& rInMtf, GDIMetaFile& rOutMtf,
1486 tools::Long nMaxBmpDPIX, tools::Long nMaxBmpDPIY,
1487 bool bReduceTransparency,
1488 bool bTransparencyAutoMode,
1489 bool bDownsampleBitmaps,
1490 const Color& rBackground = COL_TRANSPARENT );
1491
1492 void DrawTransparent( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent );
1493
1494 void DrawTransparent(
1495 const basegfx::B2DHomMatrix& rObjectTransform,
1496 const basegfx::B2DPolyPolygon& rB2DPolyPoly,
1497 double fTransparency);
1498
1499 void DrawTransparent(
1500 const GDIMetaFile& rMtf, const Point& rPos, const Size& rSize,
1501 const Gradient& rTransparenceGradient );
1502
1503protected:
1504
1505 virtual void EmulateDrawTransparent( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent );
1506
1507 virtual void ClipAndDrawGradientMetafile ( const Gradient &rGradient, const tools::PolyPolygon &rPolyPoly );
1508
1509private:
1510
1511 SAL_DLLPRIVATE bool DrawTransparentNatively( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent );
1513
1514
1518
1519public:
1520
1521 void DrawMask( const Point& rDestPt,
1522 const Bitmap& rBitmap, const Color& rMaskColor );
1523
1524 void DrawMask( const Point& rDestPt, const Size& rDestSize,
1525 const Bitmap& rBitmap, const Color& rMaskColor );
1526
1527 void DrawMask( const Point& rDestPt, const Size& rDestSize,
1528 const Point& rSrcPtPixel, const Size& rSrcSizePixel,
1529 const Bitmap& rBitmap, const Color& rMaskColor);
1530
1531 void DrawMask( const Point& rDestPt, const Size& rDestSize,
1532 const Point& rSrcPtPixel, const Size& rSrcSizePixel,
1533 const Bitmap& rBitmap, const Color& rMaskColor,
1534 MetaActionType nAction );
1535
1536protected:
1537
1538 virtual void DrawDeviceMask (
1539 const Bitmap& rMask, const Color& rMaskColor,
1540 const Point& rDestPt, const Size& rDestSize,
1541 const Point& rSrcPtPixel, const Size& rSrcSizePixel );
1543
1544
1548
1549public:
1550
1551 void EnableMapMode( bool bEnable = true );
1552 bool IsMapModeEnabled() const { return mbMap; }
1553
1554 void SetMapMode();
1555 void SetMapMode( const MapMode& rNewMapMode );
1556 void SetRelativeMapMode( const MapMode& rNewMapMode );
1557 virtual void SetMetafileMapMode(const MapMode& rNewMapMode, bool bIsRecord);
1558 const MapMode& GetMapMode() const { return maMapMode; }
1559
1560protected:
1561 virtual void ImplInitMapModeObjects();
1562
1563public:
1564 // #i75163#
1565 basegfx::B2DHomMatrix GetViewTransformation() const;
1566 basegfx::B2DHomMatrix GetInverseViewTransformation() const;
1567
1568 basegfx::B2DHomMatrix GetViewTransformation( const MapMode& rMapMode ) const;
1569 basegfx::B2DHomMatrix GetInverseViewTransformation( const MapMode& rMapMode ) const;
1570
1571
1594 void SetPixelOffset( const Size& rOffset );
1595
1602 SAL_WARN_UNUSED_RESULT Size GetPixelOffset() const { return Size(mnOutOffOrigX, mnOutOffOrigY);}
1603
1604 SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point& rLogicPt) const;
1605 SAL_WARN_UNUSED_RESULT Size LogicToPixel(const Size& rLogicSize) const;
1606 SAL_WARN_UNUSED_RESULT tools::Rectangle LogicToPixel(const tools::Rectangle& rLogicRect) const;
1607 SAL_WARN_UNUSED_RESULT tools::Polygon LogicToPixel(const tools::Polygon& rLogicPoly) const;
1608 SAL_WARN_UNUSED_RESULT tools::PolyPolygon LogicToPixel(const tools::PolyPolygon& rLogicPolyPoly) const;
1609 SAL_WARN_UNUSED_RESULT basegfx::B2DPolyPolygon LogicToPixel(const basegfx::B2DPolyPolygon& rLogicPolyPoly) const;
1610 SAL_WARN_UNUSED_RESULT vcl::Region LogicToPixel(const vcl::Region& rLogicRegion)const;
1611 SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point& rLogicPt, const MapMode& rMapMode) const;
1612 SAL_WARN_UNUSED_RESULT Size LogicToPixel(const Size& rLogicSize, const MapMode& rMapMode) const;
1613 SAL_WARN_UNUSED_RESULT tools::Rectangle LogicToPixel(const tools::Rectangle& rLogicRect,
1614 const MapMode& rMapMode) const;
1615 SAL_WARN_UNUSED_RESULT tools::Polygon LogicToPixel(const tools::Polygon& rLogicPoly,
1616 const MapMode& rMapMode) const;
1618 const MapMode& rMapMode) const;
1619
1620 SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point& rDevicePt) const;
1621 SAL_WARN_UNUSED_RESULT Size PixelToLogic(const Size& rDeviceSize) const;
1622 SAL_WARN_UNUSED_RESULT tools::Rectangle PixelToLogic(const tools::Rectangle& rDeviceRect) const;
1623 SAL_WARN_UNUSED_RESULT tools::Polygon PixelToLogic(const tools::Polygon& rDevicePoly) const;
1624 SAL_WARN_UNUSED_RESULT tools::PolyPolygon PixelToLogic(const tools::PolyPolygon& rDevicePolyPoly) const;
1625 SAL_WARN_UNUSED_RESULT basegfx::B2DPolyPolygon PixelToLogic(const basegfx::B2DPolyPolygon& rDevicePolyPoly) const;
1626 SAL_WARN_UNUSED_RESULT vcl::Region PixelToLogic(const vcl::Region& rDeviceRegion) const;
1627 SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point& rDevicePt, const MapMode& rMapMode) const;
1628 SAL_WARN_UNUSED_RESULT Size PixelToLogic(const Size& rDeviceSize, const MapMode& rMapMode) const;
1629 SAL_WARN_UNUSED_RESULT tools::Rectangle PixelToLogic(const tools::Rectangle& rDeviceRect,
1630 const MapMode& rMapMode) const;
1631 SAL_WARN_UNUSED_RESULT tools::Polygon PixelToLogic(const tools::Polygon& rDevicePoly,
1632 const MapMode& rMapMode) const;
1633 SAL_WARN_UNUSED_RESULT basegfx::B2DPolygon PixelToLogic(const basegfx::B2DPolygon& rDevicePoly,
1634 const MapMode& rMapMode) const;
1636 const MapMode& rMapMode) const;
1637
1638 SAL_WARN_UNUSED_RESULT Point LogicToLogic(const Point& rPtSource,
1639 const MapMode* pMapModeSource,
1640 const MapMode* pMapModeDest) const;
1641 SAL_WARN_UNUSED_RESULT Size LogicToLogic(const Size& rSzSource,
1642 const MapMode* pMapModeSource,
1643 const MapMode* pMapModeDest) const;
1644 SAL_WARN_UNUSED_RESULT tools::Rectangle LogicToLogic(const tools::Rectangle& rRectSource,
1645 const MapMode* pMapModeSource,
1646 const MapMode* pMapModeDest) const;
1647 SAL_WARN_UNUSED_RESULT static Point LogicToLogic(const Point& rPtSource,
1648 const MapMode& rMapModeSource,
1649 const MapMode& rMapModeDest);
1650 SAL_WARN_UNUSED_RESULT static Size LogicToLogic(const Size& rSzSource,
1651 const MapMode& rMapModeSource,
1652 const MapMode& rMapModeDest);
1653 SAL_WARN_UNUSED_RESULT static tools::Rectangle LogicToLogic(const tools::Rectangle& rRectSource,
1654 const MapMode& rMapModeSource,
1655 const MapMode& rMapModeDest);
1656 SAL_WARN_UNUSED_RESULT static tools::Long LogicToLogic(tools::Long nLongSource,
1657 MapUnit eUnitSource,
1658 MapUnit eUnitDest);
1659
1660 SAL_WARN_UNUSED_RESULT static basegfx::B2DPolygon LogicToLogic(const basegfx::B2DPolygon& rPoly,
1661 const MapMode& rMapModeSource,
1662 const MapMode& rMapModeDest);
1663
1664 // create a mapping transformation from rMapModeSource to rMapModeDest (the above methods
1665 // for B2DPoly/Polygons use this internally anyway to transform the B2DPolygon)
1666 SAL_WARN_UNUSED_RESULT static basegfx::B2DHomMatrix LogicToLogic(const MapMode& rMapModeSource,
1667 const MapMode& rMapModeDest);
1668
1675 SAL_DLLPRIVATE tools::Rectangle ImplLogicToDevicePixel( const tools::Rectangle& rLogicRect ) const;
1676
1683 SAL_DLLPRIVATE Point ImplLogicToDevicePixel( const Point& rLogicPt ) const;
1684 SAL_DLLPRIVATE DevicePoint ImplLogicToDeviceSubPixel(const Point& rLogicPt) const;
1685
1696 SAL_DLLPRIVATE tools::Long ImplLogicWidthToDevicePixel( tools::Long nWidth ) const;
1697 SAL_DLLPRIVATE double ImplLogicWidthToDeviceSubPixel(tools::Long nWidth) const;
1698
1709 SAL_DLLPRIVATE tools::Long ImplLogicHeightToDevicePixel( tools::Long nHeight ) const;
1710 SAL_DLLPRIVATE double ImplLogicHeightToDeviceSubPixel(tools::Long nHeight) const;
1711
1712 SAL_DLLPRIVATE Point SubPixelToLogic(const DevicePoint& rDevicePt, bool bCheck) const;
1713
1723 SAL_DLLPRIVATE tools::Long ImplDevicePixelToLogicWidth( tools::Long nWidth ) const;
1724
1734 SAL_DLLPRIVATE tools::Long ImplDevicePixelToLogicHeight( tools::Long nHeight ) const;
1735
1742 SAL_DLLPRIVATE Size ImplLogicToDevicePixel( const Size& rLogicSize ) const;
1743
1750 SAL_DLLPRIVATE tools::Rectangle ImplDevicePixelToLogic( const tools::Rectangle& rPixelRect ) const;
1751
1758 SAL_DLLPRIVATE tools::Polygon ImplLogicToDevicePixel( const tools::Polygon& rLogicPoly ) const;
1759
1766 SAL_DLLPRIVATE ::basegfx::B2DPolygon ImplLogicToDevicePixel( const ::basegfx::B2DPolygon& rLogicPoly ) const;
1767
1774 SAL_DLLPRIVATE tools::PolyPolygon ImplLogicToDevicePixel( const tools::PolyPolygon& rLogicPolyPoly ) const;
1775
1782 SAL_DLLPRIVATE LineInfo ImplLogicToDevicePixel( const LineInfo& rLineInfo ) const;
1783
1790 SAL_DLLPRIVATE vcl::Region ImplPixelToDevicePixel( const vcl::Region& rRegion ) const;
1791
1796 SAL_DLLPRIVATE void ImplInvalidateViewTransform();
1797
1802 SAL_DLLPRIVATE basegfx::B2DHomMatrix ImplGetDeviceTransformation() const;
1803
1804private:
1805 SAL_DLLPRIVATE DeviceCoordinate LogicWidthToDeviceCoordinate( tools::Long nWidth ) const;
1806
1818 SAL_DLLPRIVATE tools::Long ImplLogicXToDevicePixel( tools::Long nX ) const;
1819
1831 SAL_DLLPRIVATE tools::Long ImplLogicYToDevicePixel( tools::Long nY ) const;
1832
1838
1839public:
1840
1843 virtual bool CanEnableNativeWidget() const { return false; }
1844
1847 bool IsNativeControlSupported( ControlType nType, ControlPart nPart ) const;
1848
1851 bool HitTestNativeScrollbar(
1852 ControlPart nPart,
1853 const tools::Rectangle& rControlRegion,
1854 const Point& aPos,
1855 bool& rIsInside ) const;
1856
1859 bool DrawNativeControl(
1860 ControlType nType,
1861 ControlPart nPart,
1862 const tools::Rectangle& rControlRegion,
1863 ControlState nState,
1864 const ImplControlValue& aValue,
1865 const OUString& aCaption,
1866 const Color& rBackgroundColor = COL_AUTO );
1867
1870 bool GetNativeControlRegion(
1871 ControlType nType,
1872 ControlPart nPart,
1873 const tools::Rectangle& rControlRegion,
1874 ControlState nState,
1875 const ImplControlValue& aValue,
1876 tools::Rectangle &rNativeBoundingRegion,
1877 tools::Rectangle &rNativeContentRegion ) const;
1879
1883
1884public:
1885
1891 bool DrawEPS(
1892 const Point& rPt, const Size& rSz,
1893 const GfxLink& rGfxLink, GDIMetaFile* pSubst = nullptr );
1895
1896public:
1897 virtual css::awt::DeviceInfo GetDeviceInfo() const;
1898
1900 virtual vcl::Window* GetOwnerWindow() const { return nullptr; }
1901
1902protected:
1903 css::awt::DeviceInfo GetCommonDeviceInfo(Size const& aDevSize) const;
1904
1905};
1906
1907/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
AddFontSubstituteFlags
AntialiasingFlags
struct _cairo_surface cairo_surface_t
Definition: CairoCommon.hxx:72
DrawGridFlags
DrawImageFlags
DrawModeFlags
DrawTextFlags
GetDefaultFontFlags
InvertFlags
Definition: InvertFlags.hxx:25
RasterOp
Definition: RasterOp.hxx:23
SalLayoutFlags
SystemTextColorFlags
ControlType
These types are all based on the supported variants vcl/salnativewidgets.hxx and must be kept in-sync...
bool IsTransparent() const
Definition: hatch.hxx:47
Definition: image.hxx:40
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:171
tools::Long mnEmphasisAscent
Definition: outdev.hxx:219
ImplMapRes maMapRes
Definition: outdev.hxx:223
std::vector< VCLXGraphics * > * GetUnoGraphicsList() const
Definition: outdev.hxx:333
Size GetOutputSize() const
Definition: outdev.hxx:328
SAL_DLLPRIVATE sal_Int32 GetDPIX() const
Get the output device's DPI x-axis value.
Definition: outdev.hxx:386
OutputDevice(const OutputDevice &)=delete
Point GetOutputOffPixel() const
Definition: outdev.hxx:323
std::vector< FontMappingUseItem > FontMappingUseData
Definition: outdev.hxx:1264
GDIMetaFile * GetConnectMetaFile() const
Definition: outdev.hxx:286
tools::Rectangle GetOutputRectPixel() const
Definition: outdev.hxx:325
tools::Long GetOutOffYPixel() const
Definition: outdev.hxx:320
const vcl::Font & GetFont() const
Definition: outdev.hxx:530
sal_Int32 mnDPIY
Definition: outdev.hxx:214
bool IsOverlineColor() const
Definition: outdev.hxx:1019
tools::Long mnTextOffY
Definition: outdev.hxx:218
virtual void ReleaseGraphics(bool bRelease=true)=0
Release the graphics device, and remove it from the graphics device list.
vcl::Region maRegion
Definition: outdev.hxx:226
tools::Long mnOutOffY
Output offset for device output in pixel (pseudo window offset within window system's frames)
Definition: outdev.hxx:210
DrawModeFlags mnDrawMode
Definition: outdev.hxx:221
SAL_WARN_UNUSED_RESULT Size GetPixelOffset() const
Get the offset in pixel.
Definition: outdev.hxx:1602
tools::Long GetOutputWidthPixel() const
Definition: outdev.hxx:317
bool IsRefPoint() const
Definition: outdev.hxx:309
float GetDPIScaleFactor() const
Definition: outdev.hxx:397
virtual bool CanEnableNativeWidget() const
Determine if native widgets can be enabled.
Definition: outdev.hxx:1843
OutputDevice & operator=(const OutputDevice &)=delete
bool mbOutputClipped
Definition: outdev.hxx:246
bool mbDevOutput
Definition: outdev.hxx:245
RasterOp GetRasterOp() const
Definition: outdev.hxx:497
std::shared_ptr< ImplFontCache > mxFontCache
Definition: outdev.hxx:263
SAL_DLLPRIVATE sal_Int32 GetDPIY() const
Get the output device's DPI y-axis value.
Definition: outdev.hxx:392
bool mbFillColor
Definition: outdev.hxx:248
css::uno::WeakReference< css::rendering::XCanvas > mxCanvas
Definition: outdev.hxx:194
virtual bool AcquireGraphics() const =0
Acquire a graphics device that the output device uses to draw on.
tools::Long mnOutOffX
Output offset for device output in pixel (pseudo window offset within window system's frames)
Definition: outdev.hxx:208
tools::Long mnOutOffLogicX
Additional output offset in logical coordinates, applied in PixelToLogic (used by SetPixelOffset/GetP...
Definition: outdev.hxx:202
Size GetOutputSizePixel() const
Definition: outdev.hxx:315
std::unique_ptr< ImplOutDevData > mpOutDevData
Definition: outdev.hxx:190
bool mbRefPoint
Definition: outdev.hxx:258
std::shared_ptr< vcl::font::PhysicalFontCollection > mxFontCollection
Definition: outdev.hxx:262
MapMode maMapMode
Definition: outdev.hxx:236
bool IsFillColor() const
Definition: outdev.hxx:517
OutDevViewType meOutDevViewType
Definition: outdev.hxx:225
GDIMetaFile * mpMetaFile
Definition: outdev.hxx:186
const Wallpaper & GetBackground() const
Definition: outdev.hxx:524
const Point & GetRefPoint() const
Definition: outdev.hxx:308
bool SupportsCairo() const
vcl::ExtOutDevData * GetExtOutDevData() const
Definition: outdev.hxx:417
tools::Long GetOutputHeightPixel() const
Definition: outdev.hxx:318
bool mbMap
Definition: outdev.hxx:241
bool mbClipRegion
Definition: outdev.hxx:242
bool IsClipRegion() const
Definition: outdev.hxx:556
Color maTextLineColor
Definition: outdev.hxx:231
vcl::text::ComplexTextLayoutFlags mnTextLayoutMode
Definition: outdev.hxx:222
Color maTextColor
Definition: outdev.hxx:230
bool mbNewFont
Definition: outdev.hxx:255
SAL_DLLPRIVATE tools::Long GetEmphasisDescent() const
Definition: outdev.hxx:1183
void SetExtOutDevData(vcl::ExtOutDevData *pExtOutDevData)
Definition: outdev.hxx:416
SAL_DLLPRIVATE void SetDPIY(sal_Int32 nDPIY)
Definition: outdev.hxx:395
const Color & GetOverlineColor() const
Definition: outdev.hxx:1018
tools::Long mnEmphasisDescent
Definition: outdev.hxx:220
virtual bool IsScreenComp() const
Definition: outdev.hxx:311
bool mbInitLineColor
Definition: outdev.hxx:249
bool mbTextSpecial
Definition: outdev.hxx:257
tools::Long mnOutWidth
Definition: outdev.hxx:211
SalGraphics * mpGraphics
Graphics context to draw on.
Definition: outdev.hxx:183
bool mbInitFont
Definition: outdev.hxx:251
VclPtr< OutputDevice > mpNextGraphics
Next output device in list.
Definition: outdev.hxx:185
bool mbInitTextColor
Definition: outdev.hxx:252
bool IsLineColor() const
Definition: outdev.hxx:512
OutDevViewType GetOutDevViewType() const
Definition: outdev.hxx:507
vcl::Font maFont
Definition: outdev.hxx:229
cairo::SurfaceSharedPtr CreateBitmapSurface(const BitmapSystemData &rData, const Size &rSize) const
Create Surface for given bitmap data.
virtual bool UsePolyPolygonForComplexGradient()=0
rtl::Reference< LogicalFontInstance > mpFontInstance
Definition: outdev.hxx:187
bool mbInitClipRegion
Definition: outdev.hxx:253
LanguageType meTextLanguage
Definition: outdev.hxx:239
RasterOp meRasterOp
Definition: outdev.hxx:233
bool IsRTLEnabled() const
Definition: outdev.hxx:1270
vcl::text::ComplexTextLayoutFlags GetLayoutMode() const
Definition: outdev.hxx:491
std::vector< vcl::State > maOutDevStateStack
Definition: outdev.hxx:189
bool mbClipRegionSet
Definition: outdev.hxx:254
virtual Size GetButtonBorderSize()
Definition: outdev.hxx:422
AntialiasingFlags mnAntialiasing
Definition: outdev.hxx:238
virtual bool CanSubsampleBitmap() const
Definition: outdev.hxx:1388
sal_Int32 GetDPIScalePercentage() const
Definition: outdev.hxx:402
virtual size_t GetSyncCount() const
Definition: outdev.hxx:336
Point maRefPoint
Definition: outdev.hxx:237
TextAlign GetTextAlign() const
Definition: outdev.hxx:1022
bool IsTextFillColor() const
Definition: outdev.hxx:1009
cairo::SurfaceSharedPtr CreateSurface(const cairo::CairoSurfaceSharedPtr &rSurface) const
Create Surface from given cairo surface.
bool mbOutput
Definition: outdev.hxx:244
const Color & GetLineColor() const
Definition: outdev.hxx:511
bool mbTextLines
Definition: outdev.hxx:256
bool IsDeviceOutputNecessary() const
Definition: outdev.hxx:482
SAL_DLLPRIVATE void DrawOutDev(const Point &, const Size &, const Point &, const Size &, const Printer &)=delete
tools::Long mnOutOffOrigX
Additional output pixel offset, applied in LogicToPixel (used by SetPixelOffset/GetPixelOffset)
Definition: outdev.hxx:200
VclPtr< VirtualDevice > mpAlphaVDev
Definition: outdev.hxx:197
const MapMode & GetMapMode() const
Definition: outdev.hxx:1558
sal_Int32 mnDPIScalePercentage
For HiDPI displays, we want to draw elements for a percentage larger.
Definition: outdev.hxx:215
const Color & GetTextColor() const
Definition: outdev.hxx:1004
SAL_DLLPRIVATE tools::Long GetEmphasisAscent() const
Definition: outdev.hxx:1182
virtual void Flush()
Definition: outdev.hxx:430
bool IsBackground() const
Definition: outdev.hxx:527
bool mbBackground
Definition: outdev.hxx:243
SAL_DLLPRIVATE::basegfx::B2DPolygon ImplLogicToDevicePixel(const ::basegfx::B2DPolygon &rLogicPoly) const
Convert a logical B2DPolygon to a B2DPolygon in physical device pixel units.
tools::Long mnOutOffOrigY
Additional output pixel offset, applied in LogicToPixel (used by SetPixelOffset/GetPixelOffset)
Definition: outdev.hxx:204
Color maOverlineColor
Definition: outdev.hxx:232
std::unique_ptr< vcl::font::PhysicalFontFaceCollection > mpFontFaceCollection
Definition: outdev.hxx:188
bool IsOutputEnabled() const
Definition: outdev.hxx:481
AntialiasingFlags GetAntialiasing() const
Definition: outdev.hxx:485
css::uno::Any GetNativeSurfaceHandle(cairo::SurfaceSharedPtr &rSurface, const basegfx::B2ISize &rSize) const
Return native handle for underlying surface.
bool mbEnableRTL
Definition: outdev.hxx:259
tools::Long mnTextOffX
font specific text alignment offsets in pixel units
Definition: outdev.hxx:217
std::optional< AllSettings > moSettings
Definition: outdev.hxx:235
Color maLineColor
Definition: outdev.hxx:227
OutDevType GetOutDevType() const
Definition: outdev.hxx:407
void SetOutDevViewType(OutDevViewType eOutDevViewType)
If this OutputDevice is used for displaying a Print Preview the OutDevViewType should be set to 'OutD...
Definition: outdev.hxx:506
tools::Long mnOutOffLogicY
Additional output offset in logical coordinates, applied in PixelToLogic (used by SetPixelOffset/GetP...
Definition: outdev.hxx:206
tools::Long GetOutOffXPixel() const
Definition: outdev.hxx:319
std::vector< VCLXGraphics * > * mpUnoGraphicsList
Definition: outdev.hxx:191
SAL_DLLPRIVATE void SetDPIX(sal_Int32 nDPIX)
Definition: outdev.hxx:394
DrawModeFlags GetDrawMode() const
Definition: outdev.hxx:488
virtual Color GetMonochromeButtonColor()
Definition: outdev.hxx:423
bool IsTextLineColor() const
Definition: outdev.hxx:1014
Color maFillColor
Definition: outdev.hxx:228
const AllSettings & GetSettings() const
Definition: outdev.hxx:289
bool mbLineColor
Definition: outdev.hxx:247
vcl::ExtOutDevData * mpExtOutDevData
Definition: outdev.hxx:192
LanguageType GetDigitLanguage() const
Definition: outdev.hxx:494
const Color & GetTextLineColor() const
Definition: outdev.hxx:1013
virtual vcl::Window * GetOwnerWindow() const
Get the vcl::Window that this OutputDevice belongs to, if any.
Definition: outdev.hxx:1900
sal_Int32 mnDPIX
Definition: outdev.hxx:213
bool mbInitFillColor
Definition: outdev.hxx:250
VclPtr< OutputDevice > mpPrevGraphics
Previous output device in list.
Definition: outdev.hxx:184
cairo::SurfaceSharedPtr CreateSurface(int x, int y, int width, int height) const
Create surface with given dimensions.
tools::Long mnOutHeight
Definition: outdev.hxx:212
bool IsMapModeEnabled() const
Definition: outdev.hxx:1552
Wallpaper maBackground
Definition: outdev.hxx:234
const Color & GetFillColor() const
Definition: outdev.hxx:516
const OutDevType meOutDevType
Definition: outdev.hxx:224
virtual void dispose()
bool IsTransparent() const
Definition: font/font.cxx:924
TextAlign GetAlignment() const
Definition: font/font.cxx:926
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
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 SetFont(const vcl::Font &rNewFont)
Definition: window3.cxx:59
float approximate_digit_width() const
Definition: window3.cxx:72
tools::Long GetTextHeight() const
Height where any character of the current font fits; in logic coordinates.
Definition: window3.cxx:65
void SetTextFillColor()
Definition: window3.cxx:97
Color GetBackgroundColor() const
Definition: window3.cxx:214
void SetTextAlign(TextAlign eAlign)
Definition: window3.cxx:120
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
Point PixelToLogic(const Point &rDevicePt) const
Definition: window3.cxx:161
Size GetOutputSizePixel() const
Definition: window3.cxx:89
void SetTextLineColor()
Definition: window3.cxx:93
Color GetTextFillColor() const
Definition: window3.cxx:114
void SetTextColor(const Color &rColor)
Definition: window3.cxx:108
void SetBackground()
Definition: window3.cxx:100
constexpr ::Color COL_WHITE(0xFF, 0xFF, 0xFF)
sal_Int32 DeviceCoordinate
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
DefaultFontType
FontLineStyle
FontStrikeout
BmpMirrorFlags
sal_Int32 nIndex
MapUnit
MetaActionType
def text(shape, orig_st)
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
B2IVector B2ISize
::std::vector< B2DPolyPolygon > B2DPolyPolygonVector
constexpr double deg2rad(double v)
std::shared_ptr< Surface > SurfaceSharedPtr
Definition: cairo.hxx:36
std::shared_ptr< cairo_surface_t > CairoSurfaceSharedPtr
Definition: cairo.hxx:34
void SetLineColor(const css::uno::Reference< css::beans::XPropertySet > &xGridProperties, sal_Int32 nColor)
TextAlign
long Long
BitmapEx GetBitmapEx(BitmapEx const &rBitmapEx, DrawModeFlags nDrawMode)
Definition: drawmode.cxx:224
ComplexTextLayoutFlags
Definition: State.hxx:76
PushFlags
Definition: State.hxx:40
OutputDevice RenderContext
Definition: outdev.hxx:158
OutDevViewType
Definition: outdev.hxx:146
BmpMirrorFlags AdjustTwoRect(SalTwoRect &rTwoRect, const Size &rSizePix)
Definition: rect.cxx:341
VCL_DLLPUBLIC void InvertFocusRect(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect)
Definition: window2.cxx:2028
OutDevType
Definition: outdev.hxx:144
@ OUTDEV_PDF
Definition: outdev.hxx:144
@ OUTDEV_VIRDEV
Definition: outdev.hxx:144
@ OUTDEV_WINDOW
Definition: outdev.hxx:144
@ OUTDEV_PRINTER
Definition: outdev.hxx:144
tools::SvRef< FontCharMap > FontCharMapRef
Definition: outdev.hxx:150
std::vector< tools::PolyPolygon > PolyPolyVector
uno::Sequence< double > maFillColor
sal_uIntPtr sal_uLong
std::vector< OUString > mUsedFonts
Definition: outdev.hxx:1261
sal_uInt16 sal_Unicode
#define SAL_WARN_UNUSED_RESULT
#define SAL_WARN_UNUSED
OutDevSupportType
Definition: vclenum.hxx:174
void ImplHandleResize(vcl::Window *pWindow, tools::Long nNewWidth, tools::Long nNewHeight)
Definition: winproc.cxx:1912