1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_VCL_OUTDEV_HXX
21 #define INCLUDED_VCL_OUTDEV_HXX
23 #include <tools/gen.hxx>
24 #include <tools/solar.h>
25 #include <tools/color.hxx>
26 #include <tools/poly.hxx>
27 #include <o3tl/typed_flags_set.hxx>
29 #include <vcl/cairo.hxx>
30 #include <vcl/devicecoordinate.hxx>
31 #include <vcl/dllapi.h>
32 #include <vcl/font.hxx>
33 #include <vcl/region.hxx>
34 #include <vcl/mapmod.hxx>
35 #include <vcl/wall.hxx>
36 #include <vcl/metaact.hxx>
37 #include <vcl/metaactiontypes.hxx>
38 #include <vcl/salnativewidgets.hxx>
39 #include <vcl/outdevstate.hxx>
40 #include <vcl/outdevmap.hxx>
41 #include <vcl/vclreferencebase.hxx>
43 #include <basegfx/numeric/ftools.hxx>
44 #include <basegfx/vector/b2enums.hxx>
45 #include <basegfx/polygon/b2dpolypolygon.hxx>
47 #include <unotools/fontdefs.hxx>
49 #include <com/sun/star/drawing/LineCap.hpp>
50 #include <com/sun/star/uno/Reference.h>
55 struct ImplOutDevData
;
56 class LogicalFontInstance
;
58 struct SystemGraphicsData
;
59 struct SystemFontData
;
60 struct SystemTextLayoutData
;
62 class PhysicalFontCollection
;
63 class ImplDeviceFontList
;
64 class ImplDeviceFontSizeList
;
65 class ImplMultiTextLineInfo
;
71 class BitmapReadAccess
;
90 class FontSelectPattern
;
92 class OutDevStateStack
;
93 struct BitmapSystemData
;
100 struct FontCapabilities
;
101 class TextLayoutCache
;
106 namespace com
{ namespace sun
{ namespace star
{ namespace rendering
{
113 class B2DPolyPolygon
;
115 typedef B2IVector B2ISize
;
118 namespace com
{ namespace sun
{ namespace star
{ namespace awt
{
123 #define GLYPH_FONT_HEIGHT 128
125 #define GLYPH_FONT_HEIGHT 256
128 // Text Layout options
129 enum class SalLayoutFlags
135 DisableKerning
= 0x0010,
136 KerningAsian
= 0x0020,
138 EnableLigatures
= 0x0200,
139 SubstituteDigits
= 0x0400,
140 KashidaJustification
= 0x0800,
141 ForFallback
= 0x2000,
145 template<> struct typed_flags
<SalLayoutFlags
> : is_typed_flags
<SalLayoutFlags
, 0x2e77> {};
148 typedef std::vector
< tools::Rectangle
> MetricVector
;
150 // OutputDevice-Types
152 // Flags for DrawText()
153 enum class DrawTextFlags
156 Disable
= 0x00000001,
157 Mnemonic
= 0x00000002,
164 VCenter
= 0x00000100,
166 EndEllipsis
= 0x00000400,
167 PathEllipsis
= 0x00000800,
168 MultiLine
= 0x00001000,
169 WordBreak
= 0x00002000,
170 NewsEllipsis
= 0x00004000,
171 WordBreakHyphenation
= 0x00008000 | WordBreak
,
172 CenterEllipsis
= 0x00010000,
173 HideMnemonic
= 0x00020000,
177 template<> struct typed_flags
<DrawTextFlags
> : is_typed_flags
<DrawTextFlags
, 0x3ffff> {};
180 // Flags for DrawImage(), these must match the definitions in css::awt::ImageDrawMode
181 enum class DrawImageFlags
187 ColorTransform
= 0x0008,
188 SemiTransparent
= 0x0010,
192 template<> struct typed_flags
<DrawImageFlags
> : is_typed_flags
<DrawImageFlags
, 0x001f> {};
195 // Flags for DrawGrid()
196 enum class DrawGridFlags
205 template<> struct typed_flags
<DrawGridFlags
> : is_typed_flags
<DrawGridFlags
, 0x0007> {};
209 enum class DrawModeFlags
: sal_uLong
211 Default
= 0x00000000,
212 BlackLine
= 0x00000001,
213 BlackFill
= 0x00000002,
214 BlackText
= 0x00000004,
215 BlackBitmap
= 0x00000008,
216 BlackGradient
= 0x00000010,
217 GrayLine
= 0x00000020,
218 GrayFill
= 0x00000040,
219 GrayText
= 0x00000080,
220 GrayBitmap
= 0x00000100,
221 GrayGradient
= 0x00000200,
223 NoBitmap
= 0x00000800,
224 NoGradient
= 0x00001000,
225 GhostedLine
= 0x00002000,
226 GhostedFill
= 0x00004000,
227 GhostedText
= 0x00008000,
228 GhostedBitmap
= 0x00010000,
229 GhostedGradient
= 0x00020000,
230 WhiteLine
= 0x00100000,
231 WhiteFill
= 0x00200000,
232 WhiteText
= 0x00400000,
233 WhiteBitmap
= 0x00800000,
234 WhiteGradient
= 0x01000000,
235 SettingsLine
= 0x02000000,
236 SettingsFill
= 0x04000000,
237 SettingsText
= 0x08000000,
238 SettingsGradient
= 0x10000000,
239 NoTransparency
= 0x80000000,
243 template<> struct typed_flags
<DrawModeFlags
> : is_typed_flags
<DrawModeFlags
, 0x9ff3ffff> {};
247 enum class AntialiasingFlags
250 DisableText
= 0x0001,
251 EnableB2dDraw
= 0x0002,
252 PixelSnapHairline
= 0x0004,
256 template<> struct typed_flags
<AntialiasingFlags
> : is_typed_flags
<AntialiasingFlags
, 0x07> {};
259 // AddFontSubstitute() flags
260 enum class AddFontSubstituteFlags
268 template<> struct typed_flags
<AddFontSubstituteFlags
> : is_typed_flags
<AddFontSubstituteFlags
, 0x03> {};
271 // GetDefaultFont() flags
272 enum class GetDefaultFontFlags
279 template<> struct typed_flags
<GetDefaultFontFlags
> : is_typed_flags
<GetDefaultFontFlags
, 0x01> {};
282 // Flags for Invert()
283 enum class InvertFlags
291 template<> struct typed_flags
<InvertFlags
> : is_typed_flags
<InvertFlags
, 0x0003> {};
294 enum OutDevType
{ OUTDEV_DONTKNOW
, OUTDEV_WINDOW
, OUTDEV_PRINTER
, OUTDEV_VIRDEV
};
296 enum class OutDevViewType
{ DontKnow
, PrintPreview
, SlideShow
};
300 typedef tools::SvRef
<FontCharMap
> FontCharMapRef
;
302 BmpMirrorFlags
AdjustTwoRect( SalTwoRect
& rTwoRect
, const Size
& rSizePix
);
303 void AdjustTwoRect( SalTwoRect
& rTwoRect
, const tools::Rectangle
& rValidSrcRect
);
308 typedef OutputDevice RenderContext
;
312 * Some things multiple-inherit from VclAbstractDialog and OutputDevice,
313 * so we need to use virtual inheritance to keep the referencing counting
316 class VCL_DLLPUBLIC OutputDevice
: public virtual VclReferenceBase
318 friend class Printer
;
319 friend class VirtualDevice
;
320 friend class vcl::Window
;
321 friend class WorkWindow
;
322 friend class vcl::PDFWriterImpl
;
323 friend void ImplHandleResize( vcl::Window
* pWindow
, long nNewWidth
, long nNewHeight
);
326 OutputDevice(const OutputDevice
&) = delete;
327 OutputDevice
& operator=(const OutputDevice
&) = delete;
329 mutable SalGraphics
* mpGraphics
; ///< Graphics context to draw on
330 mutable VclPtr
<OutputDevice
> mpPrevGraphics
; ///< Previous output device in list
331 mutable VclPtr
<OutputDevice
> mpNextGraphics
; ///< Next output device in list
332 GDIMetaFile
* mpMetaFile
;
333 mutable LogicalFontInstance
* mpFontInstance
;
334 mutable ImplFontCache
* mpFontCache
;
335 mutable PhysicalFontCollection
* mpFontCollection
;
336 mutable ImplDeviceFontList
* mpDeviceFontList
;
337 mutable ImplDeviceFontSizeList
* mpDeviceFontSizeList
;
338 OutDevStateStack
* mpOutDevStateStack
;
339 ImplOutDevData
* mpOutDevData
;
340 std::vector
< VCLXGraphics
* >* mpUnoGraphicsList
;
341 vcl::PDFWriterImpl
* mpPDFWriter
;
342 vcl::ExtOutDevData
* mpExtOutDevData
;
345 VclPtr
<VirtualDevice
> mpAlphaVDev
;
347 /// Additional output pixel offset, applied in LogicToPixel (used by SetPixelOffset/GetPixelOffset)
349 /// Additional output offset in _logical_ coordinates, applied in PixelToLogic (used by SetPixelOffset/GetPixelOffset)
351 /// Additional output pixel offset, applied in LogicToPixel (used by SetPixelOffset/GetPixelOffset)
353 /// Additional output offset in _logical_ coordinates, applied in PixelToLogic (used by SetPixelOffset/GetPixelOffset)
355 /// Output offset for device output in pixel (pseudo window offset within window system's frames)
357 /// Output offset for device output in pixel (pseudo window offset within window system's frames)
363 sal_Int32 mnDPIScalePercentage
; ///< For Hi-DPI displays, we want to draw elements for a percentage larger
364 /// font specific text alignment offsets in pixel units
365 mutable long mnTextOffX
;
366 mutable long mnTextOffY
;
367 mutable long mnEmphasisAscent
;
368 mutable long mnEmphasisDescent
;
369 DrawModeFlags mnDrawMode
;
370 ComplexTextLayoutFlags mnTextLayoutMode
;
372 ImplThresholdRes maThresRes
;
373 OutDevType meOutDevType
;
374 OutDevViewType meOutDevViewType
;
375 vcl::Region maRegion
; // contains the clip region, see SetClipRegion(...)
380 Color maTextLineColor
;
381 Color maOverlineColor
;
382 TextAlign meTextAlign
;
384 Wallpaper maBackground
;
385 std::unique_ptr
<AllSettings
> mxSettings
;
388 AntialiasingFlags mnAntialiasing
;
389 LanguageType meTextLanguage
;
391 mutable bool mbMap
: 1;
392 mutable bool mbClipRegion
: 1;
393 mutable bool mbBackground
: 1;
394 mutable bool mbOutput
: 1;
395 mutable bool mbDevOutput
: 1;
396 mutable bool mbOutputClipped
: 1;
397 mutable bool mbLineColor
: 1;
398 mutable bool mbFillColor
: 1;
399 mutable bool mbInitLineColor
: 1;
400 mutable bool mbInitFillColor
: 1;
401 mutable bool mbInitFont
: 1;
402 mutable bool mbInitTextColor
: 1;
403 mutable bool mbInitClipRegion
: 1;
404 mutable bool mbClipRegionSet
: 1;
405 mutable bool mbNewFont
: 1;
406 mutable bool mbTextLines
: 1;
407 mutable bool mbTextSpecial
: 1;
408 mutable bool mbRefPoint
: 1;
409 mutable bool mbEnableRTL
: 1;
411 /** @name Initialization and accessor functions
417 virtual ~OutputDevice() override
;
418 virtual void dispose() override
;
422 /** Get the graphic context that the output device uses to draw on.
424 If no graphics device exists, then initialize it.
426 @returns SalGraphics instance.
428 SalGraphics
const *GetGraphics() const;
429 SalGraphics
* GetGraphics();
431 void SetConnectMetaFile( GDIMetaFile
* pMtf
);
432 GDIMetaFile
* GetConnectMetaFile() const { return mpMetaFile
; }
434 virtual void SetSettings( const AllSettings
& rSettings
);
435 const AllSettings
& GetSettings() const { return *mxSettings
; }
437 SystemGraphicsData
GetSystemGfxData() const;
438 bool SupportsCairo() const;
439 /// Create Surface from given cairo surface
440 cairo::SurfaceSharedPtr
CreateSurface(const cairo::CairoSurfaceSharedPtr
& rSurface
) const;
441 /// Create surface with given dimensions
442 cairo::SurfaceSharedPtr
CreateSurface(int x
, int y
, int width
, int height
) const;
443 /// Create Surface for given bitmap data
444 cairo::SurfaceSharedPtr
CreateBitmapSurface(const BitmapSystemData
& rData
, const Size
& rSize
) const;
445 /// Return native handle for underlying surface
446 css::uno::Any
GetNativeSurfaceHandle(cairo::SurfaceSharedPtr
& rSurface
, const basegfx::B2ISize
& rSize
) const;
447 css::uno::Any
GetSystemGfxDataAny() const;
450 void SetRefPoint( const Point
& rRefPoint
);
451 const Point
& GetRefPoint() const { return maRefPoint
; }
452 bool IsRefPoint() const { return mbRefPoint
; }
454 virtual sal_uInt16
GetBitCount() const;
456 Size
GetOutputSizePixel() const
457 { return Size( mnOutWidth
, mnOutHeight
); }
458 long GetOutputWidthPixel() const { return mnOutWidth
; }
459 long GetOutputHeightPixel() const { return mnOutHeight
; }
460 long GetOutOffXPixel() const { return mnOutOffX
; }
461 long GetOutOffYPixel() const { return mnOutOffY
; }
462 void SetOutOffXPixel(long nOutOffX
);
463 void SetOutOffYPixel(long nOutOffY
);
465 Size
GetOutputSize() const
466 { return PixelToLogic( GetOutputSizePixel() ); }
468 sal_uLong
GetColorCount() const;
471 css::uno::Reference
< css::awt::XGraphics
>
473 std::vector
< VCLXGraphics
* > *GetUnoGraphicsList() const { return mpUnoGraphicsList
; }
474 std::vector
< VCLXGraphics
* > *CreateUnoGraphicsList();
478 /** Acquire a graphics device that the output device uses to draw on.
480 There is an LRU of OutputDevices that is used to get the graphics. The
481 actual creation of a SalGraphics instance is done via the SalFrame
484 However, the SalFrame instance will only return a valid SalGraphics
485 instance if it is not in use or there wasn't one in the first place. When
486 this happens, AcquireGraphics finds the least recently used OutputDevice
487 in a different frame and "steals" it (releases it then starts using it).
489 If there are no frames to steal an OutputDevice's SalGraphics instance from
490 then it blocks until the graphics is released.
492 Once it has acquired a graphics instance, then we add the OutputDevice to
495 @returns true if was able to initialize the graphics device, false otherwise.
497 virtual bool AcquireGraphics() const = 0;
499 /** Release the graphics device, and remove it from the graphics device
502 @param bRelease Determines whether to release the fonts of the
503 physically released graphics device.
505 virtual void ReleaseGraphics( bool bRelease
= true ) = 0;
509 /** @name Helper functions
515 /** Get the output device's DPI x-axis value.
517 @returns x-axis DPI value
519 SAL_DLLPRIVATE sal_Int32
GetDPIX() const { return mnDPIX
; }
521 /** Get the output device's DPI y-axis value.
523 @returns y-axis DPI value
525 SAL_DLLPRIVATE sal_Int32
GetDPIY() const { return mnDPIY
; }
527 SAL_DLLPRIVATE
void SetDPIX( sal_Int32 nDPIX
) { mnDPIX
= nDPIX
; }
528 SAL_DLLPRIVATE
void SetDPIY( sal_Int32 nDPIY
) { mnDPIY
= nDPIY
; }
530 float GetDPIScaleFactor() const
532 return mnDPIScalePercentage
/ 100.0f
;
535 sal_Int32
GetDPIScalePercentage() const
537 return mnDPIScalePercentage
;
540 OutDevType
GetOutDevType() const { return meOutDevType
; }
542 /** Query an OutputDevice to see whether it supports a specific operation
544 @returns true if operation supported, else false
546 bool SupportsOperation( OutDevSupportType
) const;
548 vcl::PDFWriterImpl
* GetPDFWriter() const { return mpPDFWriter
; }
550 void SetExtOutDevData( vcl::ExtOutDevData
* pExtOutDevData
) { mpExtOutDevData
= pExtOutDevData
; }
551 vcl::ExtOutDevData
* GetExtOutDevData() const { return mpExtOutDevData
; }
556 /** @name Direct OutputDevice drawing functions
562 virtual void DrawOutDev(
563 const Point
& rDestPt
, const Size
& rDestSize
,
564 const Point
& rSrcPt
, const Size
& rSrcSize
);
566 virtual void DrawOutDev(
567 const Point
& rDestPt
, const Size
& rDestSize
,
568 const Point
& rSrcPt
, const Size
& rSrcSize
,
569 const OutputDevice
& rOutDev
);
571 virtual void CopyArea(
572 const Point
& rDestPt
,
573 const Point
& rSrcPt
, const Size
& rSrcSize
,
574 bool bWindowInvalidate
= false );
578 virtual void CopyDeviceArea( SalTwoRect
& aPosAry
, bool bWindowInvalidate
);
580 SAL_DLLPRIVATE
void drawOutDevDirect ( const OutputDevice
* pSrcDev
, SalTwoRect
& rPosAry
);
582 SAL_DLLPRIVATE
bool is_double_buffered_window() const;
586 // not implemented; to detect misuses of DrawOutDev(...OutputDevice&);
587 SAL_DLLPRIVATE
void DrawOutDev( const Point
&, const Size
&, const Point
&, const Size
&, const Printer
&) = delete;
591 /** @name OutputDevice state functions
597 void Push( PushFlags nFlags
= PushFlags::ALL
);
600 // returns the current stack depth; that is the number of Push() calls minus the number of Pop() calls
601 // this should not normally be used since Push and Pop must always be used symmetrically
602 // however this may be e.g. a help when debugging code in which this somehow is not the case
603 sal_uInt32
GetGCStackDepth() const;
605 void EnableOutput( bool bEnable
= true );
606 bool IsOutputEnabled() const { return mbOutput
; }
607 bool IsDeviceOutputNecessary() const { return (mbOutput
&& mbDevOutput
); }
609 void SetAntialiasing( AntialiasingFlags nMode
);
610 AntialiasingFlags
GetAntialiasing() const { return mnAntialiasing
; }
612 void SetDrawMode( DrawModeFlags nDrawMode
);
613 DrawModeFlags
GetDrawMode() const { return mnDrawMode
; }
615 void SetLayoutMode( ComplexTextLayoutFlags nTextLayoutMode
);
616 ComplexTextLayoutFlags
GetLayoutMode() const { return mnTextLayoutMode
; }
618 void SetDigitLanguage( LanguageType
);
619 LanguageType
GetDigitLanguage() const { return meTextLanguage
; }
621 void SetRasterOp( RasterOp eRasterOp
);
622 RasterOp
GetRasterOp() const { return meRasterOp
; }
625 If this OutputDevice is used for displaying a Print Preview
626 the OutDevViewType should be set to 'OutDevViewType::PrintPreview'.
628 A View can then make painting decisions dependent on this OutDevViewType.
629 E.g. text colors need to be handled differently, dependent on whether it's a PrintPreview or not. (see #106611# for more)
631 void SetOutDevViewType( OutDevViewType eOutDevViewType
) { meOutDevViewType
=eOutDevViewType
; }
632 OutDevViewType
GetOutDevViewType() const { return meOutDevViewType
; }
635 void SetLineColor( const Color
& rColor
);
636 const Color
& GetLineColor() const { return maLineColor
; }
637 bool IsLineColor() const { return mbLineColor
; }
640 void SetFillColor( const Color
& rColor
);
641 const Color
& GetFillColor() const { return maFillColor
; }
642 bool IsFillColor() const { return mbFillColor
; }
644 void SetBackground();
645 void SetBackground( const Wallpaper
& rBackground
);
647 const Wallpaper
& GetBackground() const { return maBackground
; }
648 bool IsBackground() const { return mbBackground
; }
650 void SetFont( const vcl::Font
& rNewFont
);
651 const vcl::Font
& GetFont() const { return maFont
; }
655 virtual void ImplReleaseFonts();
659 SAL_DLLPRIVATE
void InitLineColor();
661 SAL_DLLPRIVATE
void InitFillColor();
666 /** @name Clipping functions
672 vcl::Region
GetClipRegion() const;
673 void SetClipRegion();
674 void SetClipRegion( const vcl::Region
& rRegion
);
675 bool SelectClipRegion( const vcl::Region
&, SalGraphics
* pGraphics
= nullptr );
677 bool IsClipRegion() const { return mbClipRegion
; }
679 void MoveClipRegion( long nHorzMove
, long nVertMove
);
680 void IntersectClipRegion( const tools::Rectangle
& rRect
);
681 void IntersectClipRegion( const vcl::Region
& rRegion
);
683 virtual vcl::Region
GetActiveClipRegion() const;
687 virtual void InitClipRegion();
688 virtual void ClipToPaintRegion ( tools::Rectangle
& rDstRect
);
692 SAL_DLLPRIVATE
void SetDeviceClipRegion( const vcl::Region
* pRegion
);
696 /** @name Pixel functions
702 void DrawPixel( const Point
& rPt
);
703 void DrawPixel( const Point
& rPt
, const Color
& rColor
);
704 void DrawPixel( const tools::Polygon
& rPts
, const Color
* pColors
);
705 void DrawPixel( const tools::Polygon
& rPts
, const Color
& rColor
);
707 Color
GetPixel( const Point
& rPt
) const;
711 /** @name Rectangle functions
717 void DrawRect( const tools::Rectangle
& rRect
);
718 void DrawRect( const tools::Rectangle
& rRect
,
719 sal_uLong nHorzRount
, sal_uLong nVertRound
);
721 /// Fill the given rectangle with checkered rectangles of size nLen x nLen using the colors aStart and aEnd
726 Color aStart
= Color(COL_WHITE
),
727 Color aEnd
= Color(COL_BLACK
));
729 void DrawGrid( const tools::Rectangle
& rRect
, const Size
& rDist
, DrawGridFlags nFlags
);
733 /** @name Invert functions
737 void Invert( const tools::Rectangle
& rRect
, InvertFlags nFlags
= InvertFlags::NONE
);
738 void Invert( const tools::Polygon
& rPoly
, InvertFlags nFlags
= InvertFlags::NONE
);
741 /** @name Line functions
747 void DrawLine( const Point
& rStartPt
, const Point
& rEndPt
);
749 void DrawLine( const Point
& rStartPt
, const Point
& rEndPt
,
750 const LineInfo
& rLineInfo
);
754 /** Helper for line geometry paint with support for graphic expansion (pattern and fat_to_area)
756 SAL_DLLPRIVATE
void drawLine( basegfx::B2DPolyPolygon aLinePolyPolygon
, const LineInfo
& rInfo
);
760 /** @name Polyline functions
766 /** Render the given polygon as a line stroke
768 The given polygon is stroked with the current LineColor, start
769 and end point are not automatically connected
774 void DrawPolyLine( const tools::Polygon
& rPoly
);
777 const basegfx::B2DPolygon
&,
778 double fLineWidth
= 0.0,
779 basegfx::B2DLineJoin eLineJoin
= basegfx::B2DLineJoin::Round
,
780 css::drawing::LineCap eLineCap
= css::drawing::LineCap_BUTT
,
781 double fMiterMinimumAngle
= 15.0 * F_PI180
);
783 /** Render the given polygon as a line stroke
785 The given polygon is stroked with the current LineColor, start
786 and end point are not automatically connected. The line is
787 rendered according to the specified LineInfo, e.g. supplying a
788 dash pattern, or a line thickness.
793 void DrawPolyLine( const tools::Polygon
& rPoly
,
794 const LineInfo
& rLineInfo
);
797 // Helper who tries to use SalGDI's DrawPolyLine direct and returns it's bool.
798 bool DrawPolyLineDirect(
799 const basegfx::B2DPolygon
& rB2DPolygon
,
800 double fLineWidth
= 0.0,
801 double fTransparency
= 0.0,
802 basegfx::B2DLineJoin eLineJoin
= basegfx::B2DLineJoin::NONE
,
803 css::drawing::LineCap eLineCap
= css::drawing::LineCap_BUTT
,
804 double fMiterMinimumAngle
= 15.0 * F_PI180
,
805 bool bBypassAACheck
= false);
810 // Helper which holds the old line geometry creation and is extended to use AA when
811 // switched on. Advantage is that line geometry is only temporarily used for paint
812 SAL_DLLPRIVATE
void drawPolyLine(const tools::Polygon
& rPoly
, const LineInfo
& rLineInfo
);
817 /** @name Polygon functions
823 /** Render the given polygon
825 The given polygon is stroked with the current LineColor, and
826 filled with the current FillColor. If one of these colors are
827 transparent, the corresponding stroke or fill stays
828 invisible. Start and end point of the polygon are
829 automatically connected.
833 void DrawPolygon( const tools::Polygon
& rPoly
);
834 void DrawPolygon( const basegfx::B2DPolygon
& );
836 /** Render the given poly-polygon
838 The given poly-polygon is stroked with the current LineColor,
839 and filled with the current FillColor. If one of these colors
840 are transparent, the corresponding stroke or fill stays
841 invisible. Start and end points of the contained polygons are
842 automatically connected.
846 void DrawPolyPolygon( const tools::PolyPolygon
& rPolyPoly
);
847 void DrawPolyPolygon( const basegfx::B2DPolyPolygon
& );
851 SAL_DLLPRIVATE
void ImplDrawPolygon( const tools::Polygon
& rPoly
, const tools::PolyPolygon
* pClipPolyPoly
= nullptr );
852 SAL_DLLPRIVATE
void ImplDrawPolyPolygon( const tools::PolyPolygon
& rPolyPoly
, const tools::PolyPolygon
* pClipPolyPoly
);
853 SAL_DLLPRIVATE
void ImplDrawPolyPolygon( sal_uInt16 nPoly
, const tools::PolyPolygon
& rPolyPoly
);
855 // Helper who implements the DrawPolyPolygon functionality for basegfx::B2DPolyPolygon
856 // without MetaFile processing
857 SAL_DLLPRIVATE
void ImplDrawPolyPolygonWithB2DPolyPolygon(const basegfx::B2DPolyPolygon
& rB2DPolyPoly
);
861 /** @name Curved shape functions
867 void DrawEllipse( const tools::Rectangle
& rRect
);
870 const tools::Rectangle
& rRect
,
871 const Point
& rStartPt
, const Point
& rEndPt
);
874 const tools::Rectangle
& rRect
,
875 const Point
& rStartPt
, const Point
& rEndPt
);
878 const tools::Rectangle
& rRect
,
879 const Point
& rStartPt
, const Point
& rEndPt
);
884 /** @name Gradient functions
889 void DrawGradient( const tools::Rectangle
& rRect
, const Gradient
& rGradient
);
890 void DrawGradient( const tools::PolyPolygon
& rPolyPoly
, const Gradient
& rGradient
);
892 void AddGradientActions(
893 const tools::Rectangle
& rRect
,
894 const Gradient
& rGradient
,
899 virtual bool UsePolyPolygonForComplexGradient() = 0;
901 virtual long GetGradientStepCount( long nMinRect
);
905 SAL_DLLPRIVATE
void DrawLinearGradient( const tools::Rectangle
& rRect
, const Gradient
& rGradient
, const tools::PolyPolygon
* pClipPolyPoly
);
906 SAL_DLLPRIVATE
void DrawComplexGradient( const tools::Rectangle
& rRect
, const Gradient
& rGradient
, const tools::PolyPolygon
* pClipPolyPoly
);
908 SAL_DLLPRIVATE
void DrawGradientToMetafile( const tools::PolyPolygon
& rPolyPoly
, const Gradient
& rGradient
);
909 SAL_DLLPRIVATE
void DrawLinearGradientToMetafile( const tools::Rectangle
& rRect
, const Gradient
& rGradient
);
910 SAL_DLLPRIVATE
void DrawComplexGradientToMetafile( const tools::Rectangle
& rRect
, const Gradient
& rGradient
);
912 SAL_DLLPRIVATE
long GetGradientSteps( const Gradient
& rGradient
, const tools::Rectangle
& rRect
, bool bMtf
, bool bComplex
=false );
914 SAL_DLLPRIVATE Color
GetSingleColorGradientFill();
915 SAL_DLLPRIVATE
void SetGrayscaleColors( Gradient
&rGradient
);
919 /** @name Hatch functions
926 void DrawHatch( const tools::PolyPolygon
& rPolyPoly
, const ::Hatch
& rHatch
);
927 void AddHatchActions( const tools::PolyPolygon
& rPolyPoly
,
928 const ::Hatch
& rHatch
,
931 void DrawHatch( const tools::PolyPolygon
& rPolyPoly
, const Hatch
& rHatch
);
932 void AddHatchActions( const tools::PolyPolygon
& rPolyPoly
,
937 void DrawHatch( const tools::PolyPolygon
& rPolyPoly
, const Hatch
& rHatch
, bool bMtf
);
941 SAL_DLLPRIVATE
void CalcHatchValues( const tools::Rectangle
& rRect
, long nDist
, sal_uInt16 nAngle10
, Point
& rPt1
, Point
& rPt2
, Size
& rInc
, Point
& rEndPt1
);
942 SAL_DLLPRIVATE
void DrawHatchLine( const tools::Line
& rLine
, const tools::PolyPolygon
& rPolyPoly
, Point
* pPtBuffer
, bool bMtf
);
946 /** @name Wallpaper functions
951 void DrawWallpaper( const tools::Rectangle
& rRect
, const Wallpaper
& rWallpaper
);
954 void Erase( const tools::Rectangle
& rRect
) { DrawWallpaper( rRect
, GetBackground() ); }
957 void DrawGradientWallpaper( long nX
, long nY
, long nWidth
, long nHeight
, const Wallpaper
& rWallpaper
);
960 SAL_DLLPRIVATE
void DrawWallpaper( long nX
, long nY
, long nWidth
, long nHeight
, const Wallpaper
& rWallpaper
);
961 SAL_DLLPRIVATE
void DrawColorWallpaper( long nX
, long nY
, long nWidth
, long nHeight
, const Wallpaper
& rWallpaper
);
962 SAL_DLLPRIVATE
void DrawBitmapWallpaper( long nX
, long nY
, long nWidth
, long nHeight
, const Wallpaper
& rWallpaper
);
966 /** @name Text functions
972 void DrawText( const Point
& rStartPt
, const OUString
& rStr
,
973 sal_Int32 nIndex
= 0, sal_Int32 nLen
= -1,
974 MetricVector
* pVector
= nullptr, OUString
* pDisplayText
= nullptr );
976 void DrawText( const tools::Rectangle
& rRect
,
977 const OUString
& rStr
, DrawTextFlags nStyle
= DrawTextFlags::NONE
,
978 MetricVector
* pVector
= nullptr, OUString
* pDisplayText
= nullptr,
979 vcl::ITextLayout
* _pTextLayout
= nullptr );
981 static void ImplDrawText( OutputDevice
& rTargetDevice
, const tools::Rectangle
& rRect
,
982 const OUString
& rOrigStr
, DrawTextFlags nStyle
,
983 MetricVector
* pVector
, OUString
* pDisplayText
, vcl::ITextLayout
& _rLayout
);
985 void ImplDrawText( SalLayout
& );
987 void ImplDrawTextBackground( const SalLayout
& );
989 void DrawCtrlText( const Point
& rPos
, const OUString
& rStr
,
990 sal_Int32 nIndex
= 0, sal_Int32 nLen
= -1,
991 DrawTextFlags nStyle
= DrawTextFlags::Mnemonic
, MetricVector
* pVector
= nullptr, OUString
* pDisplayText
= nullptr );
993 void DrawTextLine( const Point
& rPos
, long nWidth
,
994 FontStrikeout eStrikeout
,
995 FontLineStyle eUnderline
,
996 FontLineStyle eOverline
,
997 bool bUnderlineAbove
= false );
999 void ImplDrawTextLine( long nBaseX
, long nX
, long nY
, DeviceCoordinate nWidth
,
1000 FontStrikeout eStrikeout
, FontLineStyle eUnderline
,
1001 FontLineStyle eOverline
, bool bUnderlineAbove
);
1003 void ImplDrawTextLines( SalLayout
&, FontStrikeout eStrikeout
, FontLineStyle eUnderline
,
1004 FontLineStyle eOverline
, bool bWordLine
, bool bUnderlineAbove
);
1006 void DrawWaveLine( const Point
& rStartPos
, const Point
& rEndPos
);
1008 bool ImplDrawRotateText( SalLayout
& );
1010 tools::Rectangle
GetTextRect( const tools::Rectangle
& rRect
,
1011 const OUString
& rStr
, DrawTextFlags nStyle
= DrawTextFlags::WordBreak
,
1012 TextRectInfo
* pInfo
= nullptr,
1013 const vcl::ITextLayout
* _pTextLayout
= nullptr ) const;
1015 /** Return the exact bounding rectangle of rStr.
1017 The text is then drawn exactly from rRect.TopLeft() to
1018 rRect.BottomRight(), don't assume that rRect.TopLeft() is [0, 0].
1020 Please note that you don't always want to use GetTextBoundRect(); in
1021 many cases you actually want to use GetTextHeight(), because
1022 GetTextBoundRect() gives you the exact bounding rectangle regardless
1023 what is the baseline of the text.
1025 Code snippet to get just exactly the text (no filling around that) as
1026 a bitmap via a VirtualDevice (regardless what is the baseline):
1029 VirtualDevice aDevice;
1030 vcl::Font aFont = aDevice.GetFont();
1031 aFont.SetSize(Size(0, 96));
1032 aFont.SetColor(COL_BLACK);
1033 aDevice.SetFont(aFont);
1036 tools::Rectangle aRect;
1037 aDevice.GetTextBoundRect(aRect, aText);
1038 aDevice.SetOutputSize(Size(aRect.BottomRight().X() + 1, aRect.BottomRight().Y() + 1));
1039 aDevice.SetBackground(Wallpaper(COL_TRANSPARENT));
1040 aDevice.DrawText(Point(0,0), aText);
1042 // exactly only the text, regardless of the baseline
1043 Bitmap aBitmap(aDevice.GetBitmap(aRect.TopLeft(), aRect.GetSize()));
1046 Code snippet to get the text as a bitmap via a Virtual device that
1047 contains even the filling so that the baseline is always preserved
1048 (ie. the text will not jump up and down according to whether it
1049 contains 'y' or not etc.)
1052 VirtualDevice aDevice;
1053 // + the appropriate font / device setup, see above
1055 aDevice.SetOutputSize(Size(aDevice.GetTextWidth(aText), aDevice.GetTextHeight()));
1056 aDevice.SetBackground(Wallpaper(COL_TRANSPARENT));
1057 aDevice.DrawText(Point(0,0), aText);
1059 // bitmap that contains even the space around the text,
1060 // that means, preserves the baseline etc.
1061 Bitmap aBitmap(aDevice.GetBitmap(Point(0, 0), aDevice.GetOutputSize()));
1064 bool GetTextBoundRect( tools::Rectangle
& rRect
,
1065 const OUString
& rStr
, sal_Int32 nBase
= 0, sal_Int32 nIndex
= 0, sal_Int32 nLen
= -1,
1066 sal_uLong nLayoutWidth
= 0, const long* pDXArray
= nullptr ) const;
1068 tools::Rectangle
ImplGetTextBoundRect( const SalLayout
& );
1070 bool GetTextOutline( tools::PolyPolygon
&,
1071 const OUString
& rStr
,
1072 sal_Int32 nLen
= -1,
1073 sal_uLong nLayoutWidth
= 0, const long* pDXArray
= nullptr ) const;
1075 bool GetTextOutlines( PolyPolyVector
&,
1076 const OUString
& rStr
, sal_Int32 nBase
= 0, sal_Int32 nIndex
= 0,
1077 sal_Int32 nLen
= -1,
1078 sal_uLong nLayoutWidth
= 0, const long* pDXArray
= nullptr ) const;
1080 bool GetTextOutlines( basegfx::B2DPolyPolygonVector
&rVector
,
1081 const OUString
& rStr
, sal_Int32 nBase
, sal_Int32 nIndex
= 0,
1082 sal_Int32 nLen
= -1,
1083 sal_uLong nLayoutWidth
= 0, const long* pDXArray
= nullptr ) const;
1086 OUString
GetEllipsisString( const OUString
& rStr
, long nMaxWidth
,
1087 DrawTextFlags nStyle
= DrawTextFlags::EndEllipsis
) const;
1089 long GetCtrlTextWidth( const OUString
& rStr
) const;
1091 static OUString
GetNonMnemonicString( const OUString
& rStr
, sal_Int32
& rMnemonicPos
);
1093 static OUString
GetNonMnemonicString( const OUString
& rStr
)
1094 { sal_Int32 nDummy
; return GetNonMnemonicString( rStr
, nDummy
); }
1096 /** Generate MetaTextActions for the text rect
1098 This method splits up the text rect into multiple
1099 MetaTextActions, one for each line of text. This is comparable
1100 to AddGradientActions(), which splits up a gradient into its
1101 constituent polygons. Parameter semantics fully compatible to
1104 void AddTextRectActions( const tools::Rectangle
& rRect
,
1105 const OUString
& rOrigStr
,
1106 DrawTextFlags nStyle
,
1107 GDIMetaFile
& rMtf
);
1109 void SetTextColor( const Color
& rColor
);
1110 const Color
& GetTextColor() const { return maTextColor
; }
1112 void SetTextFillColor();
1113 void SetTextFillColor( const Color
& rColor
);
1114 Color
GetTextFillColor() const;
1115 bool IsTextFillColor() const { return !maFont
.IsTransparent(); }
1117 void SetTextLineColor();
1118 void SetTextLineColor( const Color
& rColor
);
1119 const Color
& GetTextLineColor() const { return maTextLineColor
; }
1120 bool IsTextLineColor() const { return (maTextLineColor
.GetTransparency() == 0); }
1122 void SetOverlineColor();
1123 void SetOverlineColor( const Color
& rColor
);
1124 const Color
& GetOverlineColor() const { return maOverlineColor
; }
1125 bool IsOverlineColor() const { return (maOverlineColor
.GetTransparency() == 0); }
1127 void SetTextAlign( TextAlign eAlign
);
1128 TextAlign
GetTextAlign() const { return maFont
.GetAlignment(); }
1130 /** Width of the text.
1132 See also GetTextBoundRect() for more explanation + code examples.
1134 long GetTextWidth( const OUString
& rStr
, sal_Int32 nIndex
= 0, sal_Int32 nLen
= -1,
1135 vcl::TextLayoutCache
const* = nullptr) const;
1137 /** Height where any character of the current font fits; in logic coordinates.
1139 See also GetTextBoundRect() for more explanation + code examples.
1141 long GetTextHeight() const;
1142 float approximate_char_width() const;
1144 void DrawTextArray( const Point
& rStartPt
, const OUString
& rStr
,
1146 sal_Int32 nIndex
= 0,
1147 sal_Int32 nLen
= -1,
1148 SalLayoutFlags flags
= SalLayoutFlags::NONE
);
1149 long GetTextArray( const OUString
& rStr
, long* pDXAry
,
1150 sal_Int32 nIndex
= 0, sal_Int32 nLen
= -1,
1151 vcl::TextLayoutCache
const* = nullptr) const;
1153 bool GetCaretPositions( const OUString
&, long* pCaretXArray
,
1154 sal_Int32 nIndex
, sal_Int32 nLen
) const;
1155 void DrawStretchText( const Point
& rStartPt
, sal_uLong nWidth
,
1156 const OUString
& rStr
,
1157 sal_Int32 nIndex
= 0, sal_Int32 nLen
= -1);
1158 sal_Int32
GetTextBreak( const OUString
& rStr
, long nTextWidth
,
1159 sal_Int32 nIndex
, sal_Int32 nLen
= -1,
1160 long nCharExtra
= 0,
1161 vcl::TextLayoutCache
const* = nullptr) const;
1162 sal_Int32
GetTextBreak( const OUString
& rStr
, long nTextWidth
,
1163 sal_Unicode nExtraChar
, sal_Int32
& rExtraCharPos
,
1164 sal_Int32 nIndex
, sal_Int32 nLen
,
1166 vcl::TextLayoutCache
const* = nullptr) const;
1167 std::shared_ptr
<vcl::TextLayoutCache
> CreateTextLayoutCache(OUString
const&) const;
1170 SAL_DLLPRIVATE
void ImplInitTextColor();
1172 SAL_DLLPRIVATE
void ImplInitTextLineSize();
1173 SAL_DLLPRIVATE
void ImplInitAboveTextLineSize();
1176 SAL_DLLPRIVATE
void ImplDrawTextDirect( SalLayout
&, bool bTextLines
);
1177 SAL_DLLPRIVATE
void ImplDrawSpecialText( SalLayout
& );
1178 SAL_DLLPRIVATE
void ImplDrawTextRect( long nBaseX
, long nBaseY
, long nX
, long nY
, long nWidth
, long nHeight
);
1180 SAL_DLLPRIVATE
static void ImplDrawWavePixel( long nOriginX
, long nOriginY
, long nCurX
, long nCurY
, short nOrientation
, SalGraphics
* pGraphics
, OutputDevice
* pOutDev
,
1181 bool bDrawPixAsRect
, long nPixWidth
, long nPixHeight
);
1182 SAL_DLLPRIVATE
void ImplDrawWaveLine( long nBaseX
, long nBaseY
, long nStartX
, long nStartY
, long nWidth
, long nHeight
, long nLineWidth
, short nOrientation
, const Color
& rColor
);
1183 SAL_DLLPRIVATE
void ImplDrawWaveTextLine( long nBaseX
, long nBaseY
, long nX
, long nY
, long nWidth
, FontLineStyle eTextLine
, Color aColor
, bool bIsAbove
);
1184 SAL_DLLPRIVATE
void ImplDrawStraightTextLine( long nBaseX
, long nBaseY
, long nX
, long nY
, long nWidth
, FontLineStyle eTextLine
, Color aColor
, bool bIsAbove
);
1185 SAL_DLLPRIVATE
void ImplDrawStrikeoutLine( long nBaseX
, long nBaseY
, long nX
, long nY
, long nWidth
, FontStrikeout eStrikeout
, Color aColor
);
1186 SAL_DLLPRIVATE
void ImplDrawStrikeoutChar( long nBaseX
, long nBaseY
, long nX
, long nY
, long nWidth
, FontStrikeout eStrikeout
, Color aColor
);
1187 SAL_DLLPRIVATE
void ImplDrawMnemonicLine( long nX
, long nY
, long nWidth
);
1189 SAL_DLLPRIVATE
static bool ImplIsUnderlineAbove( const vcl::Font
& );
1192 SAL_DLLPRIVATE
long ImplGetTextLines( ImplMultiTextLineInfo
& rLineInfo
, long nWidth
, const OUString
& rStr
, DrawTextFlags nStyle
, const vcl::ITextLayout
& _rLayout
);
1196 /** @name Font functions
1202 FontMetric
GetDevFont( int nDevFontIndex
) const;
1203 int GetDevFontCount() const;
1205 bool IsFontAvailable( const OUString
& rFontName
) const;
1207 Size
GetDevFontSize( const vcl::Font
& rFont
, int nSizeIndex
) const;
1208 int GetDevFontSizeCount( const vcl::Font
& ) const;
1210 bool AddTempDevFont( const OUString
& rFileURL
, const OUString
& rFontName
);
1211 void RefreshFontData( const bool bNewFontLists
);
1213 FontMetric
GetFontMetric() const;
1214 FontMetric
GetFontMetric( const vcl::Font
& rFont
) const;
1216 bool GetFontCharMap( FontCharMapRef
& rxFontCharMap
) const;
1217 bool GetFontCapabilities( vcl::FontCapabilities
& rFontCapabilities
) const;
1219 /** Retrieve detailed font information in platform independent structure
1221 @param nFallbacklevel Fallback font level (0 = best matching font)
1223 @return SystemFontData
1225 SystemFontData
GetSysFontData( int nFallbacklevel
) const;
1227 SAL_DLLPRIVATE
void ImplGetEmphasisMark( tools::PolyPolygon
& rPolyPoly
, bool& rPolyLine
, tools::Rectangle
& rRect1
, tools::Rectangle
& rRect2
,
1228 long& rYOff
, long& rWidth
, FontEmphasisMark eEmphasis
, long nHeight
);
1229 SAL_DLLPRIVATE
static FontEmphasisMark
1230 ImplGetEmphasisMarkStyle( const vcl::Font
& rFont
);
1232 bool GetGlyphBoundRects( const Point
& rOrigin
, const OUString
& rStr
, int nIndex
,
1233 int nLen
, MetricVector
& rVector
);
1235 sal_Int32
HasGlyphs( const vcl::Font
& rFont
, const OUString
& rStr
,
1236 sal_Int32 nIndex
= 0, sal_Int32 nLen
= -1 ) const;
1238 long GetMinKashida() const;
1241 // validate kashida positions against the current font
1242 // returns count of invalid kashida positions
1243 sal_Int32
ValidateKashidas( const OUString
& rTxt
, sal_Int32 nIdx
, sal_Int32 nLen
,
1244 sal_Int32 nKashCount
, // number of suggested kashida positions (in)
1245 const sal_Int32
* pKashidaPos
, // suggested kashida positions (in)
1246 sal_Int32
* pKashidaPosDropped
// invalid kashida positions (out)
1249 static void BeginFontSubstitution();
1250 static void EndFontSubstitution();
1251 static void AddFontSubstitute( const OUString
& rFontName
,
1252 const OUString
& rReplaceFontName
,
1253 AddFontSubstituteFlags nFlags
);
1254 static void RemoveFontSubstitute( sal_uInt16 n
);
1255 static sal_uInt16
GetFontSubstituteCount();
1257 static vcl::Font
GetDefaultFont( DefaultFontType nType
,
1259 GetDefaultFontFlags nFlags
,
1260 const OutputDevice
* pOutDev
= nullptr );
1262 SAL_DLLPRIVATE
void ImplInitFontList() const;
1263 SAL_DLLPRIVATE
void ImplUpdateFontData();
1265 //drop font data for all outputdevices.
1266 //If bNewFontLists is true then empty lists of system fonts
1267 SAL_DLLPRIVATE
static void ImplClearAllFontData( bool bNewFontLists
);
1268 //fetch font data for all outputdevices
1269 //If bNewFontLists is true then fetch lists of system fonts
1270 SAL_DLLPRIVATE
static void ImplRefreshAllFontData( bool bNewFontLists
);
1271 //drop and fetch font data for all outputdevices
1272 //If bNewFontLists is true then drop and refetch lists of system fonts
1273 SAL_DLLPRIVATE
static void ImplUpdateAllFontData( bool bNewFontLists
);
1277 virtual void InitFont() const;
1278 virtual void SetFontOrientation( LogicalFontInstance
* const pFontInstance
) const;
1279 virtual long GetFontExtLeading() const;
1284 typedef void ( OutputDevice::* FontUpdateHandler_t
)( bool );
1286 SAL_DLLPRIVATE
bool ImplNewFont() const;
1288 SAL_DLLPRIVATE
void ImplClearFontData( bool bNewFontLists
);
1289 SAL_DLLPRIVATE
void ImplRefreshFontData( bool bNewFontLists
);
1290 SAL_DLLPRIVATE
static void ImplUpdateFontDataForAllFrames( FontUpdateHandler_t pHdl
, bool bNewFontLists
);
1293 SAL_DLLPRIVATE OUString
ImplGetEllipsisString( const OutputDevice
& rTargetDevice
, const OUString
& rStr
,
1294 long nMaxWidth
, DrawTextFlags nStyle
, const vcl::ITextLayout
& _rLayout
);
1296 SAL_DLLPRIVATE
void ImplDrawEmphasisMark( long nBaseX
, long nX
, long nY
, const tools::PolyPolygon
& rPolyPoly
, bool bPolyLine
, const tools::Rectangle
& rRect1
, const tools::Rectangle
& rRect2
);
1297 SAL_DLLPRIVATE
void ImplDrawEmphasisMarks( SalLayout
& );
1301 /** @name Layout functions
1307 SystemTextLayoutData
GetSysTextLayoutData( const Point
& rStartPt
, const OUString
& rStr
,
1308 sal_Int32 nIndex
, sal_Int32 nLen
,
1309 const long* pDXAry
) const;
1311 SAL_DLLPRIVATE
bool ImplIsAntiparallel() const ;
1312 SAL_DLLPRIVATE
void ReMirror( Point
&rPoint
) const;
1313 SAL_DLLPRIVATE
void ReMirror( tools::Rectangle
&rRect
) const;
1314 SAL_DLLPRIVATE
void ReMirror( vcl::Region
&rRegion
) const;
1315 SAL_DLLPRIVATE
bool ImplIsRecordLayout() const;
1316 virtual bool HasMirroredGraphics() const;
1317 SAL_DLLPRIVATE SalLayout
* ImplLayout( const OUString
&, sal_Int32 nIndex
, sal_Int32 nLen
,
1318 const Point
& rLogicPos
= Point(0,0), long nLogicWidth
=0,
1319 const long* pLogicDXArray
=nullptr, SalLayoutFlags flags
= SalLayoutFlags::NONE
,
1320 vcl::TextLayoutCache
const* = nullptr) const;
1321 SAL_DLLPRIVATE ImplLayoutArgs
ImplPrepareLayoutArgs( OUString
&, const sal_Int32 nIndex
, const sal_Int32 nLen
,
1322 DeviceCoordinate nPixelWidth
, const DeviceCoordinate
* pPixelDXArray
,
1323 SalLayoutFlags flags
= SalLayoutFlags::NONE
,
1324 vcl::TextLayoutCache
const* = nullptr) const;
1325 SAL_DLLPRIVATE SalLayout
* ImplGlyphFallbackLayout( SalLayout
*, ImplLayoutArgs
& ) const;
1326 // tells whether this output device is RTL in an LTR UI or LTR in a RTL UI
1327 SAL_DLLPRIVATE SalLayout
* getFallbackFont(
1328 FontSelectPattern
&rFontSelData
, int nFallbackLevel
,
1329 ImplLayoutArgs
& rLayoutArgs
) const;
1332 // Enabling/disabling RTL only makes sense for OutputDevices that use a mirroring SalGraphisLayout
1333 virtual void EnableRTL( bool bEnable
= true);
1334 bool IsRTLEnabled() const { return mbEnableRTL
; }
1336 bool GetTextIsRTL( const OUString
&, sal_Int32 nIndex
, sal_Int32 nLen
) const;
1341 /** @name Bitmap functions
1349 const Point& rDestPt,
1350 const Size& rDestSize,
1351 const Point& rSrcPtPixel,
1352 const Size& rSecSizePixel,
1353 const Bitmap& rBitmap,
1354 MetaActionType nAction = MetaActionType::BMPSCALEPART)
1357 const Point
& rDestPt
,
1358 const Bitmap
& rBitmap
);
1362 const Point& rDestPt,
1363 const Size& rDestSize,
1364 const Point& rSrcPtPixel,
1365 const Size& rSecSizePixel,
1366 const Bitmap& rBitmap,
1367 MetaActionType nAction = MetaActionType::BMPSCALEPART)
1370 const Point
& rDestPt
,
1371 const Size
& rDestSize
,
1372 const Bitmap
& rBitmap
);
1375 const Point
& rDestPt
,
1376 const Size
& rDestSize
,
1377 const Point
& rSrcPtPixel
,
1378 const Size
& rSrcSizePixel
,
1379 const Bitmap
& rBitmap
,
1380 MetaActionType nAction
= MetaActionType::BMPSCALEPART
);
1384 const Point& rDestPt,
1385 const Size& rDestSize,
1386 const Point& rSrcPtPixel,
1387 const Size& rSecSizePixel,
1388 const BitmapEx& rBitmapEx,
1389 MetaActionType nAction = MetaActionType::BMPEXSCALEPART)
1392 const Point
& rDestPt
,
1393 const BitmapEx
& rBitmapEx
);
1398 const Point& rDestPt,
1399 const Size& rDestSize,
1400 const Point& rSrcPtPixel,
1401 const Size& rSecSizePixel,
1402 const BitmapEx& rBitmapEx,
1403 MetaActionType nAction = MetaActionType::BMPEXSCALEPART)
1406 const Point
& rDestPt
,
1407 const Size
& rDestSize
,
1408 const BitmapEx
& rBitmapEx
);
1411 const Point
& rDestPt
,
1412 const Size
& rDestSize
,
1413 const Point
& rSrcPtPixel
,
1414 const Size
& rSrcSizePixel
,
1415 const BitmapEx
& rBitmapEx
,
1416 MetaActionType nAction
= MetaActionType::BMPEXSCALEPART
);
1419 virtual void DrawImage(
1422 const Image& rImage,
1423 sal_uInt16 nStyle = 0)
1427 const Image
& rImage
,
1428 DrawImageFlags nStyle
= DrawImageFlags::NONE
);
1433 const Image
& rImage
,
1434 DrawImageFlags nStyle
= DrawImageFlags::NONE
);
1437 virtual Bitmap
GetBitmap( const Point
& rSrcPt
, const Size
& rSize
) const;
1439 /** Query extended bitmap (with alpha channel, if available).
1441 BitmapEx
GetBitmapEx( const Point
& rSrcPt
, const Size
& rSize
) const;
1444 /** Draw BitmapEx transformed
1446 @param rTransformation
1447 The transformation describing the target positioning of the given bitmap. Transforming
1448 the unit object coordinates (0, 0, 1, 1) with this matrix is the transformation to
1449 discrete coordinates
1452 The BitmapEx to be painted
1454 void DrawTransformedBitmapEx(
1455 const basegfx::B2DHomMatrix
& rTransformation
,
1456 const BitmapEx
& rBitmapEx
);
1461 virtual void DrawDeviceBitmap(
1462 const Point
& rDestPt
, const Size
& rDestSize
,
1463 const Point
& rSrcPtPixel
, const Size
& rSrcSizePixel
,
1464 BitmapEx
& rBitmapEx
);
1466 virtual void ScaleBitmap ( Bitmap
&rBmp
, SalTwoRect
&rPosAry
);
1468 /** Transform and draw a bitmap directly
1470 @param aFullTransform The B2DHomMatrix used for the transformation
1471 @param rBitmapEx Reference to the bitmap to be transformed and drawn
1473 @return true if it was able to draw the bitmap, false if not
1475 virtual bool DrawTransformBitmapExDirect(
1476 const basegfx::B2DHomMatrix
& aFullTransform
,
1477 const BitmapEx
& rBitmapEx
);
1479 /** Transform and reduce the area that needs to be drawn of the bitmap and return the new
1480 visible range and the maximum area.
1483 @param aFullTransform B2DHomMatrix used for transformation
1484 @param aVisibleRange The new visible area of the bitmap
1485 @param fMaximumArea The maximum area of the bitmap
1487 @returns true if there is an area to be drawn, otherwise nothing is left to be drawn
1490 virtual bool TransformAndReduceBitmapExToTargetRange(
1491 const basegfx::B2DHomMatrix
& aFullTransform
,
1492 basegfx::B2DRange
&aVisibleRange
,
1493 double &fMaximumArea
);
1497 SAL_DLLPRIVATE
void DrawDeviceAlphaBitmap(
1499 const AlphaMask
& rAlpha
,
1500 const Point
& rDestPt
,
1501 const Size
& rDestSize
,
1502 const Point
& rSrcPtPixel
,
1503 const Size
& rSrcSizePixel
);
1505 SAL_DLLPRIVATE
void DrawDeviceAlphaBitmapSlowPath(
1506 const Bitmap
& rBitmap
, const AlphaMask
& rAlpha
,
1507 tools::Rectangle aDstRect
, tools::Rectangle aBmpRect
,
1508 Size
& aOutSz
, Point
& aOutPt
);
1511 SAL_DLLPRIVATE
bool BlendBitmap(
1512 const SalTwoRect
& rPosAry
,
1513 const Bitmap
& rBmp
);
1515 SAL_DLLPRIVATE Bitmap
BlendBitmap(
1517 BitmapReadAccess
* pP
,
1518 BitmapReadAccess
* pA
,
1519 const sal_Int32 nOffY
,
1520 const sal_Int32 nDstHeight
,
1521 const sal_Int32 nOffX
,
1522 const sal_Int32 nDstWidth
,
1523 const tools::Rectangle
& aBmpRect
,
1528 const long* pMapY
);
1530 SAL_DLLPRIVATE Bitmap
BlendBitmapWithAlpha(
1532 BitmapReadAccess
* pP
,
1533 BitmapReadAccess
* pA
,
1534 const tools::Rectangle
& aDstRect
,
1535 const sal_Int32 nOffY
,
1536 const sal_Int32 nDstHeight
,
1537 const sal_Int32 nOffX
,
1538 const sal_Int32 nDstWidth
,
1540 const long* pMapY
);
1542 /** Retrieve downsampled and cropped bitmap
1544 @attention This method ignores negative rDstSz values, thus
1545 mirroring must happen outside this method (e.g. in DrawBitmap)
1547 SAL_DLLPRIVATE Bitmap
GetDownsampledBitmap(
1549 const Point
& rSrcPt
,
1558 /** @name Transparency functions
1564 /** helper method removing transparencies from a metafile (e.g. for printing)
1567 true: transparencies were removed
1568 false: output metafile is unchanged input metafile
1570 @attention this is a member method, so current state can influence the result !
1571 @attention the output metafile is prepared in pixel mode for the currentOutputDevice
1572 state. It can not be moved or rotated reliably anymore.
1574 bool RemoveTransparenciesFromMetaFile(
1575 const GDIMetaFile
& rInMtf
, GDIMetaFile
& rOutMtf
,
1576 long nMaxBmpDPIX
, long nMaxBmpDPIY
,
1577 bool bReduceTransparency
,
1578 bool bTransparencyAutoMode
,
1579 bool bDownsampleBitmaps
,
1580 const Color
& rBackground
= Color( COL_TRANSPARENT
) );
1582 SAL_DLLPRIVATE
void ImplPrintTransparent (
1583 const Bitmap
& rBmp
, const Bitmap
& rMask
,
1584 const Point
& rDestPt
, const Size
& rDestSize
,
1585 const Point
& rSrcPtPixel
, const Size
& rSrcSizePixel
);
1587 SAL_DLLPRIVATE Color
ImplDrawModeToColor ( const Color
& rColor
) const;
1590 void DrawTransparent( const tools::PolyPolygon
& rPolyPoly
, sal_uInt16 nTransparencePercent
);
1591 void DrawTransparent( const basegfx::B2DPolyPolygon
& rB2DPolyPoly
, double fTransparency
);
1592 void DrawTransparent(
1593 const GDIMetaFile
& rMtf
, const Point
& rPos
, const Size
& rSize
,
1594 const Gradient
& rTransparenceGradient
);
1598 virtual void EmulateDrawTransparent( const tools::PolyPolygon
& rPolyPoly
, sal_uInt16 nTransparencePercent
);
1599 void DrawInvisiblePolygon( const tools::PolyPolygon
& rPolyPoly
);
1601 virtual void ClipAndDrawGradientMetafile ( const Gradient
&rGradient
, const tools::PolyPolygon
&rPolyPoly
);
1605 SAL_DLLPRIVATE
bool DrawTransparentNatively( const tools::PolyPolygon
& rPolyPoly
, sal_uInt16 nTransparencePercent
);
1609 /** @name Mask functions
1615 void DrawMask( const Point
& rDestPt
,
1616 const Bitmap
& rBitmap
, const Color
& rMaskColor
);
1618 void DrawMask( const Point
& rDestPt
, const Size
& rDestSize
,
1619 const Bitmap
& rBitmap
, const Color
& rMaskColor
);
1621 void DrawMask( const Point
& rDestPt
, const Size
& rDestSize
,
1622 const Point
& rSrcPtPixel
, const Size
& rSrcSizePixel
,
1623 const Bitmap
& rBitmap
, const Color
& rMaskColor
,
1624 MetaActionType nAction
);
1628 virtual void DrawDeviceMask (
1629 const Bitmap
& rMask
, const Color
& rMaskColor
,
1630 const Point
& rDestPt
, const Size
& rDestSize
,
1631 const Point
& rSrcPtPixel
, const Size
& rSrcSizePixel
);
1635 /** @name Map functions
1641 void EnableMapMode( bool bEnable
= true );
1642 bool IsMapModeEnabled() const { return mbMap
; }
1645 virtual void SetMapMode( const MapMode
& rNewMapMode
);
1646 void SetRelativeMapMode( const MapMode
& rNewMapMode
);
1647 const MapMode
& GetMapMode() const { return maMapMode
; }
1650 basegfx::B2DHomMatrix
GetViewTransformation() const;
1651 basegfx::B2DHomMatrix
GetInverseViewTransformation() const;
1653 basegfx::B2DHomMatrix
GetViewTransformation( const MapMode
& rMapMode
) const;
1654 basegfx::B2DHomMatrix
GetInverseViewTransformation( const MapMode
& rMapMode
) const;
1657 /** Set an offset in pixel
1659 This method offsets every drawing operation that converts its
1660 coordinates to pixel by the given value. Normally, the effect
1661 can be achieved by setting a MapMode with a different
1662 origin. Unfortunately, this origin is in logical coordinates
1663 and can lead to rounding errors (see #102532# for details).
1665 @attention This offset is only applied when converting to
1666 pixel, i.e. some output modes such as metafile recordings
1667 might be completely unaffected by this method! Use with
1668 care. Furthermore, if the OutputDevice's MapMode is the
1669 default (that's MapUnit::MapPixel), then any pixel offset set is
1670 ignored also. This might be unintuitive for cases, but would
1671 have been far more fragile to implement. What's more, the
1672 reason why the pixel offset was introduced (avoiding rounding
1673 errors) does not apply for MapUnit::MapPixel, because one can always
1674 use the MapMode origin then.
1679 void SetPixelOffset( const Size
& rOffset
);
1681 /** Get the offset in pixel
1683 @see OutputDevice::SetPixelOffset for details
1685 @return the current offset in pixel
1687 Size
GetPixelOffset() const { return Size(mnOutOffOrigX
, mnOutOffOrigY
);}
1689 Point
LogicToPixel( const Point
& rLogicPt
) const;
1690 Size
LogicToPixel( const Size
& rLogicSize
) const;
1691 tools::Rectangle
LogicToPixel( const tools::Rectangle
& rLogicRect
) const;
1692 tools::Polygon
LogicToPixel( const tools::Polygon
& rLogicPoly
) const;
1693 tools::PolyPolygon
LogicToPixel( const tools::PolyPolygon
& rLogicPolyPoly
) const;
1694 basegfx::B2DPolyPolygon
LogicToPixel( const basegfx::B2DPolyPolygon
& rLogicPolyPoly
) const;
1695 vcl::Region
LogicToPixel( const vcl::Region
& rLogicRegion
)const;
1696 Point
LogicToPixel( const Point
& rLogicPt
,
1697 const MapMode
& rMapMode
) const;
1698 Size
LogicToPixel( const Size
& rLogicSize
,
1699 const MapMode
& rMapMode
) const;
1700 tools::Rectangle
LogicToPixel( const tools::Rectangle
& rLogicRect
,
1701 const MapMode
& rMapMode
) const;
1702 tools::Polygon
LogicToPixel( const tools::Polygon
& rLogicPoly
,
1703 const MapMode
& rMapMode
) const;
1704 basegfx::B2DPolyPolygon
LogicToPixel( const basegfx::B2DPolyPolygon
& rLogicPolyPoly
,
1705 const MapMode
& rMapMode
) const;
1707 Point
PixelToLogic( const Point
& rDevicePt
) const;
1708 Size
PixelToLogic( const Size
& rDeviceSize
) const;
1709 tools::Rectangle
PixelToLogic( const tools::Rectangle
& rDeviceRect
) const;
1710 tools::Polygon
PixelToLogic( const tools::Polygon
& rDevicePoly
) const;
1711 tools::PolyPolygon
PixelToLogic( const tools::PolyPolygon
& rDevicePolyPoly
) const;
1712 basegfx::B2DPolyPolygon
PixelToLogic( const basegfx::B2DPolyPolygon
& rDevicePolyPoly
) const;
1713 vcl::Region
PixelToLogic( const vcl::Region
& rDeviceRegion
) const;
1714 Point
PixelToLogic( const Point
& rDevicePt
,
1715 const MapMode
& rMapMode
) const;
1716 Size
PixelToLogic( const Size
& rDeviceSize
,
1717 const MapMode
& rMapMode
) const;
1718 tools::Rectangle
PixelToLogic( const tools::Rectangle
& rDeviceRect
,
1719 const MapMode
& rMapMode
) const;
1720 tools::Polygon
PixelToLogic( const tools::Polygon
& rDevicePoly
,
1721 const MapMode
& rMapMode
) const;
1722 basegfx::B2DPolygon
PixelToLogic( const basegfx::B2DPolygon
& rDevicePoly
,
1723 const MapMode
& rMapMode
) const;
1724 basegfx::B2DPolyPolygon
PixelToLogic( const basegfx::B2DPolyPolygon
& rDevicePolyPoly
,
1725 const MapMode
& rMapMode
) const;
1727 Point
LogicToLogic( const Point
& rPtSource
,
1728 const MapMode
* pMapModeSource
,
1729 const MapMode
* pMapModeDest
) const;
1730 Size
LogicToLogic( const Size
& rSzSource
,
1731 const MapMode
* pMapModeSource
,
1732 const MapMode
* pMapModeDest
) const;
1733 tools::Rectangle
LogicToLogic( const tools::Rectangle
& rRectSource
,
1734 const MapMode
* pMapModeSource
,
1735 const MapMode
* pMapModeDest
) const;
1736 static Point
LogicToLogic( const Point
& rPtSource
,
1737 const MapMode
& rMapModeSource
,
1738 const MapMode
& rMapModeDest
);
1739 static Size
LogicToLogic( const Size
& rSzSource
,
1740 const MapMode
& rMapModeSource
,
1741 const MapMode
& rMapModeDest
);
1742 static tools::Rectangle
LogicToLogic( const tools::Rectangle
& rRectSource
,
1743 const MapMode
& rMapModeSource
,
1744 const MapMode
& rMapModeDest
);
1745 static long LogicToLogic( long nLongSource
,
1746 MapUnit eUnitSource
,
1747 MapUnit eUnitDest
);
1749 static basegfx::B2DPolygon
LogicToLogic( const basegfx::B2DPolygon
& rPoly
,
1750 const MapMode
& rMapModeSource
,
1751 const MapMode
& rMapModeDest
);
1753 // create a mapping transformation from rMapModeSource to rMapModeDest (the above methods
1754 // for B2DPoly/Polygons use this internally anyway to transform the B2DPolygon)
1755 static basegfx::B2DHomMatrix
LogicToLogic(const MapMode
& rMapModeSource
, const MapMode
& rMapModeDest
);
1757 /** Convert a logical rectangle to a rectangle in physical device pixel units.
1759 @param rLogicRect Const reference to a rectangle in logical units
1761 @returns Rectangle based on physical device pixel coordinates and units.
1763 SAL_DLLPRIVATE
tools::Rectangle
ImplLogicToDevicePixel( const tools::Rectangle
& rLogicRect
) const;
1765 /** Convert a logical point to a physical point on the device.
1767 @param rLogicPt Const reference to a point in logical units.
1769 @returns Physical point on the device.
1771 SAL_DLLPRIVATE Point
ImplLogicToDevicePixel( const Point
& rLogicPt
) const;
1773 /** Convert a logical width to a width in units of device pixels.
1775 To get the number of device pixels, it must calculate the X-DPI of the device and
1776 the map scaling factor. If there is no mapping, then it just returns the
1777 width as nothing more needs to be done.
1779 @param nWidth Logical width
1781 @returns Width in units of device pixels.
1783 SAL_DLLPRIVATE
long ImplLogicWidthToDevicePixel( long nWidth
) const;
1785 SAL_DLLPRIVATE DeviceCoordinate
LogicWidthToDeviceCoordinate( long nWidth
) const;
1789 * Notification about some rectangle of the output device got invalidated.
1791 * @param pRectangle If 0, that means the whole area, otherwise the area in logic coordinates.
1793 virtual void LogicInvalidate(const tools::Rectangle
* pRectangle
) { (void)pRectangle
; }
1797 /** Convert a logical X coordinate to a device pixel's X coordinate.
1799 To get the device's X coordinate, it must calculate the mapping offset
1800 coordinate X position (if there is one - if not then it just adds
1801 the pseudo-window offset to the logical X coordinate), the X-DPI of
1802 the device and the mapping's X scaling factor.
1804 @param nX Logical X coordinate
1806 @returns Device's X pixel coordinate
1808 SAL_DLLPRIVATE
long ImplLogicXToDevicePixel( long nX
) const;
1810 /** Convert a logical Y coordinate to a device pixel's Y coordinate.
1812 To get the device's Y coordinate, it must calculate the mapping offset
1813 coordinate Y position (if there is one - if not then it just adds
1814 the pseudo-window offset to the logical Y coordinate), the Y-DPI of
1815 the device and the mapping's Y scaling factor.
1817 @param nY Logical Y coordinate
1819 @returns Device's Y pixel coordinate
1821 SAL_DLLPRIVATE
long ImplLogicYToDevicePixel( long nY
) const;
1823 /** Convert a logical height to a height in units of device pixels.
1825 To get the number of device pixels, it must calculate the Y-DPI of the device and
1826 the map scaling factor. If there is no mapping, then it just returns the
1827 height as nothing more needs to be done.
1829 @param nHeight Logical height
1831 @returns Height in units of device pixels.
1833 SAL_DLLPRIVATE
long ImplLogicHeightToDevicePixel( long nHeight
) const;
1835 /** Convert device pixels to a width in logical units.
1837 To get the logical width, it must calculate the X-DPI of the device and the
1840 @param nWidth Width in device pixels
1842 @returns Width in logical units.
1844 SAL_DLLPRIVATE
long ImplDevicePixelToLogicWidth( long nWidth
) const;
1846 /** Convert device pixels to a height in logical units.
1848 To get the logical height, it must calculate the Y-DPI of the device and the
1851 @param nHeight Height in device pixels
1853 @returns Height in logical units.
1855 SAL_DLLPRIVATE
long ImplDevicePixelToLogicHeight( long nHeight
) const;
1857 /** Convert logical height to device pixels, with exact sub-pixel value.
1859 To get the \em exact pixel height, it must calculate the Y-DPI of the device and the
1862 @param fLogicHeight Exact height in logical units.
1864 @returns Exact height in pixels - returns as a float to provide for subpixel value.
1866 SAL_DLLPRIVATE
float ImplFloatLogicHeightToDevicePixel( float fLogicHeight
) const;
1868 /** Convert a logical size to the size on the physical device.
1870 @param rLogicSize Const reference to a size in logical units
1872 @returns Physical size on the device.
1874 SAL_DLLPRIVATE Size
ImplLogicToDevicePixel( const Size
& rLogicSize
) const;
1876 /** Convert a rectangle in physical pixel units to a rectangle in physical pixel units and coords.
1878 @param rPixelRect Const reference to rectangle in logical units and coords.
1880 @returns Rectangle based on logical coordinates and units.
1882 SAL_DLLPRIVATE
tools::Rectangle
ImplDevicePixelToLogic( const tools::Rectangle
& rPixelRect
) const;
1884 /** Convert a logical polygon to a polygon in physical device pixel units.
1886 @param rLogicPoly Const reference to a polygon in logical units
1888 @returns Polygon based on physical device pixel coordinates and units.
1890 SAL_DLLPRIVATE
tools::Polygon
ImplLogicToDevicePixel( const tools::Polygon
& rLogicPoly
) const;
1892 /** Convert a logical polypolygon to a polypolygon in physical device pixel units.
1894 @param rLogicPolyPoly Const reference to a polypolygon in logical units
1896 @returns Polypolygon based on physical device pixel coordinates and units.
1898 SAL_DLLPRIVATE
tools::PolyPolygon
ImplLogicToDevicePixel( const tools::PolyPolygon
& rLogicPolyPoly
) const;
1900 /** Convert a line in logical units to a line in physical device pixel units.
1902 @param rLineInfo Const refernece to a line in logical units
1904 @returns Line based on physical device pixel coordinates and units.
1906 SAL_DLLPRIVATE LineInfo
ImplLogicToDevicePixel( const LineInfo
& rLineInfo
) const;
1908 /** Convert a region in pixel units to a region in device pixel units and coords.
1910 @param rRegion Const reference to region.
1912 @returns vcl::Region based on device pixel coordinates and units.
1914 SAL_DLLPRIVATE
vcl::Region
ImplPixelToDevicePixel( const vcl::Region
& rRegion
) const;
1916 /** Invalidate the view transformation.
1918 @since AOO bug 75163 (OpenOffice.org 2.4.3 - OOH 680 milestone 212)
1920 SAL_DLLPRIVATE
void ImplInvalidateViewTransform();
1922 /** Get device transformation.
1924 @since AOO bug 75163 (OpenOffice.org 2.4.3 - OOH 680 milestone 212)
1926 SAL_DLLPRIVATE
basegfx::B2DHomMatrix
ImplGetDeviceTransformation() const;
1930 /** @name Native Widget Rendering functions
1932 These all just call through to the private mpGraphics functions of the same name.
1938 /** Query the platform layer for control support
1940 bool IsNativeControlSupported( ControlType nType
, ControlPart nPart
) const;
1942 /** Query the native control to determine if it was acted upon
1944 bool HitTestNativeScrollbar(
1946 const tools::Rectangle
& rControlRegion
,
1948 bool& rIsInside
) const;
1950 /** Request rendering of a particular control and/or part
1952 bool DrawNativeControl(
1955 const tools::Rectangle
& rControlRegion
,
1956 ControlState nState
,
1957 const ImplControlValue
& aValue
,
1958 const OUString
& aCaption
);
1960 /** Query the native control's actual drawing region (including adornment)
1962 bool GetNativeControlRegion(
1965 const tools::Rectangle
& rControlRegion
,
1966 ControlState nState
,
1967 const ImplControlValue
& aValue
,
1968 tools::Rectangle
&rNativeBoundingRegion
,
1969 tools::Rectangle
&rNativeContentRegion
) const;
1972 /** @name EPS functions
1978 /** @returns boolean value to see if EPS could be painted directly.
1979 Theoreticaly, handing over a matrix would be needed to handle
1980 painting rotated EPS files (e.g. contained in Metafiles). This
1981 would then need to be supported for Mac and PS printers, but
1982 that's too much for now, wrote \#i107046# for this */
1984 const Point
& rPt
, const Size
& rSz
,
1985 const GfxLink
& rGfxLink
, GDIMetaFile
* pSubst
= nullptr );
1989 #endif // INCLUDED_VCL_OUTDEV_HXX
1991 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */