LibreOffice Module vcl (master)  1
Private Member Functions | Private Attributes | Friends | List of all members
OutputDevice Class Referenceabstract

Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inheritance to keep the referencing counting OK. More...

#include <outdev.hxx>

Inheritance diagram for OutputDevice:
[legend]
Collaboration diagram for OutputDevice:
[legend]

Public Member Functions

Helper functions
SAL_DLLPRIVATE sal_Int32 GetDPIX () const
 Get the output device's DPI x-axis value. More...
 
SAL_DLLPRIVATE sal_Int32 GetDPIY () const
 Get the output device's DPI y-axis value. More...
 
SAL_DLLPRIVATE void SetDPIX (sal_Int32 nDPIX)
 
SAL_DLLPRIVATE void SetDPIY (sal_Int32 nDPIY)
 
float GetDPIScaleFactor () const
 
sal_Int32 GetDPIScalePercentage () const
 
OutDevType GetOutDevType () const
 
virtual bool IsVirtual () const
 
bool SupportsOperation (OutDevSupportType) const
 Query an OutputDevice to see whether it supports a specific operation. More...
 
void SetExtOutDevData (vcl::ExtOutDevData *pExtOutDevData)
 
vcl::ExtOutDevDataGetExtOutDevData () const
 
Pixel functions
void DrawPixel (const Point &rPt)
 
void DrawPixel (const Point &rPt, const Color &rColor)
 
Color GetPixel (const Point &rPt) const
 
Rectangle functions
void DrawRect (const tools::Rectangle &rRect)
 
void DrawRect (const tools::Rectangle &rRect, sal_uLong nHorzRount, sal_uLong nVertRound)
 
void DrawCheckered (const Point &rPos, const Size &rSize, sal_uInt32 nLen=8, Color aStart=COL_WHITE, Color aEnd=COL_BLACK)
 Fill the given rectangle with checkered rectangles of size nLen x nLen using the colors aStart and aEnd. More...
 
void DrawGrid (const tools::Rectangle &rRect, const Size &rDist, DrawGridFlags nFlags)
 
Invert functions
void Invert (const tools::Rectangle &rRect, InvertFlags nFlags=InvertFlags::NONE)
 
void Invert (const tools::Polygon &rPoly, InvertFlags nFlags=InvertFlags::NONE)
 
Curved shape functions
void DrawEllipse (const tools::Rectangle &rRect)
 
void DrawArc (const tools::Rectangle &rRect, const Point &rStartPt, const Point &rEndPt)
 
void DrawPie (const tools::Rectangle &rRect, const Point &rStartPt, const Point &rEndPt)
 
void DrawChord (const tools::Rectangle &rRect, const Point &rStartPt, const Point &rEndPt)
 
Layout functions
SystemTextLayoutData GetSysTextLayoutData (const Point &rStartPt, const OUString &rStr, sal_Int32 nIndex, sal_Int32 nLen, const long *pDXAry) const
 OutputDevice::GetSysTextLayoutData. More...
 
SAL_DLLPRIVATE bool ImplIsAntiparallel () const
 
SAL_DLLPRIVATE void ReMirror (Point &rPoint) const
 
SAL_DLLPRIVATE void ReMirror (tools::Rectangle &rRect) const
 
SAL_DLLPRIVATE void ReMirror (vcl::Region &rRegion) const
 
SAL_DLLPRIVATE bool ImplIsRecordLayout () const
 
virtual bool HasMirroredGraphics () const
 
std::unique_ptr< SalLayoutImplLayout (const OUString &, sal_Int32 nIndex, sal_Int32 nLen, const Point &rLogicPos=Point(0, 0), long nLogicWidth=0, const long *pLogicDXArray=nullptr, SalLayoutFlags flags=SalLayoutFlags::NONE, vcl::TextLayoutCache const *=nullptr, const SalLayoutGlyphs *pGlyphs=nullptr) const
 
SAL_DLLPRIVATE ImplLayoutArgs ImplPrepareLayoutArgs (OUString &, const sal_Int32 nIndex, const sal_Int32 nLen, DeviceCoordinate nPixelWidth, const DeviceCoordinate *pPixelDXArray, SalLayoutFlags flags=SalLayoutFlags::NONE, vcl::TextLayoutCache const *=nullptr) const
 
SAL_DLLPRIVATE std::unique_ptr< SalLayoutImplGlyphFallbackLayout (std::unique_ptr< SalLayout >, ImplLayoutArgs &) const
 
SAL_DLLPRIVATE std::unique_ptr< SalLayoutgetFallbackLayout (LogicalFontInstance *pLogicalFont, int nFallbackLevel, ImplLayoutArgs &rLayoutArgs) const
 
virtual void EnableRTL (bool bEnable=true)
 
bool IsRTLEnabled () const
 
bool GetTextIsRTL (const OUString &, sal_Int32 nIndex, sal_Int32 nLen) const
 
Native Widget Rendering functions

These all just call through to the private mpGraphics functions of the same name.

bool IsNativeControlSupported (ControlType nType, ControlPart nPart) const
 Query the platform layer for control support. More...
 
bool HitTestNativeScrollbar (ControlPart nPart, const tools::Rectangle &rControlRegion, const Point &aPos, bool &rIsInside) const
 Query the native control to determine if it was acted upon. More...
 
bool DrawNativeControl (ControlType nType, ControlPart nPart, const tools::Rectangle &rControlRegion, ControlState nState, const ImplControlValue &aValue, const OUString &aCaption)
 Request rendering of a particular control and/or part. More...
 
bool GetNativeControlRegion (ControlType nType, ControlPart nPart, const tools::Rectangle &rControlRegion, ControlState nState, const ImplControlValue &aValue, tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion) const
 Query the native control's actual drawing region (including adornment) More...
 
EPS functions
bool DrawEPS (const Point &rPt, const Size &rSz, const GfxLink &rGfxLink, GDIMetaFile *pSubst=nullptr)
 
- Public Member Functions inherited from VclReferenceBase
void acquire () const
 
void release () const
 
sal_Int32 getRefCount () const
 
void disposeOnce ()
 
bool isDisposed () const
 

Private Member Functions

 OutputDevice (const OutputDevice &)=delete
 
OutputDeviceoperator= (const OutputDevice &)=delete
 

Private Attributes

SalGraphicsmpGraphics
 Graphics context to draw on. More...
 
VclPtr< OutputDevicempPrevGraphics
 Previous output device in list. More...
 
VclPtr< OutputDevicempNextGraphics
 Next output device in list. More...
 
GDIMetaFilempMetaFile
 
rtl::Reference< LogicalFontInstancempFontInstance
 
std::shared_ptr< ImplFontCachemxFontCache
 
std::shared_ptr< PhysicalFontCollectionmxFontCollection
 
std::unique_ptr< ImplDeviceFontListmpDeviceFontList
 
std::unique_ptr< ImplDeviceFontSizeListmpDeviceFontSizeList
 
std::vector< OutDevStatemaOutDevStateStack
 
std::unique_ptr< ImplOutDevDatampOutDevData
 
std::vector< VCLXGraphics * > * mpUnoGraphicsList
 
vcl::ExtOutDevDatampExtOutDevData
 
VclPtr< VirtualDevicempAlphaVDev
 
long mnOutOffOrigX
 Additional output pixel offset, applied in LogicToPixel (used by SetPixelOffset/GetPixelOffset) More...
 
long mnOutOffLogicX
 Additional output offset in logical coordinates, applied in PixelToLogic (used by SetPixelOffset/GetPixelOffset) More...
 
long mnOutOffOrigY
 Additional output pixel offset, applied in LogicToPixel (used by SetPixelOffset/GetPixelOffset) More...
 
long mnOutOffLogicY
 Additional output offset in logical coordinates, applied in PixelToLogic (used by SetPixelOffset/GetPixelOffset) More...
 
long mnOutOffX
 Output offset for device output in pixel (pseudo window offset within window system's frames) More...
 
long mnOutOffY
 Output offset for device output in pixel (pseudo window offset within window system's frames) More...
 
long mnOutWidth
 
long mnOutHeight
 
sal_Int32 mnDPIX
 
sal_Int32 mnDPIY
 
sal_Int32 mnDPIScalePercentage
 For HiDPI displays, we want to draw elements for a percentage larger. More...
 
long mnTextOffX
 font specific text alignment offsets in pixel units More...
 
long mnTextOffY
 
long mnEmphasisAscent
 
long mnEmphasisDescent
 
DrawModeFlags mnDrawMode
 
ComplexTextLayoutFlags mnTextLayoutMode
 
ImplMapRes maMapRes
 
ImplThresholdRes maThresRes
 
const OutDevType meOutDevType
 
OutDevViewType meOutDevViewType
 
vcl::Region maRegion
 
Color maLineColor
 
Color maFillColor
 
vcl::Font maFont
 
Color maTextColor
 
Color maTextLineColor
 
Color maOverlineColor
 
RasterOp meRasterOp
 
Wallpaper maBackground
 
std::unique_ptr< AllSettingsmxSettings
 
MapMode maMapMode
 
Point maRefPoint
 
AntialiasingFlags mnAntialiasing
 
LanguageType meTextLanguage
 
bool mbMap: 1
 
bool mbClipRegion: 1
 
bool mbBackground: 1
 
bool mbOutput: 1
 
bool mbDevOutput: 1
 
bool mbOutputClipped: 1
 
bool mbLineColor: 1
 
bool mbFillColor: 1
 
bool mbInitLineColor: 1
 
bool mbInitFillColor: 1
 
bool mbInitFont: 1
 
bool mbInitTextColor: 1
 
bool mbInitClipRegion: 1
 
bool mbClipRegionSet: 1
 
bool mbNewFont: 1
 
bool mbTextLines: 1
 
bool mbTextSpecial: 1
 
bool mbRefPoint: 1
 
bool mbEnableRTL: 1
 

Friends

class Printer
 
class VirtualDevice
 
class vcl::Window
 
class WorkWindow
 
void ImplHandleResize (vcl::Window *pWindow, long nNewWidth, long nNewHeight)
 

Initialization and accessor functions

 OutputDevice (OutDevType eOutDevType)
 
virtual ~OutputDevice () override
 
virtual void dispose () override
 
virtual bool AcquireGraphics () const =0
 Acquire a graphics device that the output device uses to draw on. More...
 
virtual void ReleaseGraphics (bool bRelease=true)=0
 Release the graphics device, and remove it from the graphics device list. More...
 
SalGraphics const * GetGraphics () const
 Get the graphic context that the output device uses to draw on. More...
 
SalGraphicsGetGraphics ()
 
void SetConnectMetaFile (GDIMetaFile *pMtf)
 
GDIMetaFileGetConnectMetaFile () const
 
virtual void SetSettings (const AllSettings &rSettings)
 
const AllSettingsGetSettings () const
 
SystemGraphicsData GetSystemGfxData () const
 
bool SupportsCairo () const
 
cairo::SurfaceSharedPtr CreateSurface (const cairo::CairoSurfaceSharedPtr &rSurface) const
 Create Surface from given cairo surface. More...
 
cairo::SurfaceSharedPtr CreateSurface (int x, int y, int width, int height) const
 Create surface with given dimensions. More...
 
cairo::SurfaceSharedPtr CreateBitmapSurface (const BitmapSystemData &rData, const Size &rSize) const
 Create Surface for given bitmap data. More...
 
css::uno::Any GetNativeSurfaceHandle (cairo::SurfaceSharedPtr &rSurface, const basegfx::B2ISize &rSize) const
 Return native handle for underlying surface. More...
 
css::uno::Any GetSystemGfxDataAny () const
 
void SetRefPoint ()
 
void SetRefPoint (const Point &rRefPoint)
 
const PointGetRefPoint () const
 
bool IsRefPoint () const
 
virtual sal_uInt16 GetBitCount () const
 
Size GetOutputSizePixel () const
 
long GetOutputWidthPixel () const
 
long GetOutputHeightPixel () const
 
long GetOutOffXPixel () const
 
long GetOutOffYPixel () const
 
void SetOutOffXPixel (long nOutOffX)
 
void SetOutOffYPixel (long nOutOffY)
 
Size GetOutputSize () const
 
css::uno::Reference< css::awt::XGraphics > CreateUnoGraphics ()
 
std::vector< VCLXGraphics * > * GetUnoGraphicsList () const
 
std::vector< VCLXGraphics * > * CreateUnoGraphicsList ()
 

Direct OutputDevice drawing functions

SAL_DLLPRIVATE void DrawOutDev (const Point &, const Size &, const Point &, const Size &, const Printer &)=delete
 
virtual void CopyDeviceArea (SalTwoRect &aPosAry, bool bWindowInvalidate)
 
SAL_DLLPRIVATE void drawOutDevDirect (const OutputDevice *pSrcDev, SalTwoRect &rPosAry)
 
SAL_DLLPRIVATE bool is_double_buffered_window () const
 
virtual void Flush ()
 
virtual void DrawOutDev (const Point &rDestPt, const Size &rDestSize, const Point &rSrcPt, const Size &rSrcSize)
 
virtual void DrawOutDev (const Point &rDestPt, const Size &rDestSize, const Point &rSrcPt, const Size &rSrcSize, const OutputDevice &rOutDev)
 
virtual void CopyArea (const Point &rDestPt, const Point &rSrcPt, const Size &rSrcSize, bool bWindowInvalidate=false)
 

OutputDevice state functions

SAL_DLLPRIVATE void InitLineColor ()
 
SAL_DLLPRIVATE void InitFillColor ()
 
virtual void ImplReleaseFonts ()
 
void Push (PushFlags nFlags=PushFlags::ALL)
 
void Pop ()
 
sal_uInt32 GetGCStackDepth () const
 
void EnableOutput (bool bEnable=true)
 
bool IsOutputEnabled () const
 
bool IsDeviceOutputNecessary () const
 
void SetAntialiasing (AntialiasingFlags nMode)
 
AntialiasingFlags GetAntialiasing () const
 
void SetDrawMode (DrawModeFlags nDrawMode)
 
DrawModeFlags GetDrawMode () const
 
void SetLayoutMode (ComplexTextLayoutFlags nTextLayoutMode)
 
ComplexTextLayoutFlags GetLayoutMode () const
 
void SetDigitLanguage (LanguageType)
 
LanguageType GetDigitLanguage () const
 
void SetRasterOp (RasterOp eRasterOp)
 
RasterOp GetRasterOp () const
 
void SetOutDevViewType (OutDevViewType eOutDevViewType)
 If this OutputDevice is used for displaying a Print Preview the OutDevViewType should be set to 'OutDevViewType::PrintPreview'. More...
 
OutDevViewType GetOutDevViewType () const
 
void SetLineColor ()
 
void SetLineColor (const Color &rColor)
 
const ColorGetLineColor () const
 
bool IsLineColor () const
 
void SetFillColor ()
 
void SetFillColor (const Color &rColor)
 
const ColorGetFillColor () const
 
bool IsFillColor () const
 
void SetBackground ()
 
void SetBackground (const Wallpaper &rBackground)
 
virtual void SaveBackground (VirtualDevice &rSaveDevice, const Point &rPos, const Size &rSize, const Size &rBackgroundSize) const
 
const WallpaperGetBackground () const
 
virtual Color GetBackgroundColor () const
 
virtual Color GetReadableFontColor (const Color &rFontColor, const Color &rBgColor) const
 
bool IsBackground () const
 
void SetFont (const vcl::Font &rNewFont)
 
const vcl::FontGetFont () const
 

Clipping functions

SAL_DLLPRIVATE void SetDeviceClipRegion (const vcl::Region *pRegion)
 
virtual void InitClipRegion ()
 
virtual vcl::Region ClipToDeviceBounds (vcl::Region aRegion) const
 Perform actual rect clip against outdev dimensions, to generate empty clips whenever one of the values is completely off the device. More...
 
virtual void ClipToPaintRegion (tools::Rectangle &rDstRect)
 
vcl::Region GetClipRegion () const
 
void SetClipRegion ()
 
void SetClipRegion (const vcl::Region &rRegion)
 
bool SelectClipRegion (const vcl::Region &, SalGraphics *pGraphics=nullptr)
 
bool IsClipRegion () const
 
void MoveClipRegion (long nHorzMove, long nVertMove)
 
void IntersectClipRegion (const tools::Rectangle &rRect)
 
void IntersectClipRegion (const vcl::Region &rRegion)
 
virtual vcl::Region GetActiveClipRegion () const
 

Line functions

SAL_DLLPRIVATE void drawLine (basegfx::B2DPolyPolygon aLinePolyPolygon, const LineInfo &rInfo)
 Helper for line geometry paint with support for graphic expansion (pattern and fat_to_area) More...
 
virtual void DrawHatchLine_DrawLine (const Point &rStartPoint, const Point &rEndPoint)
 
void DrawLine (const Point &rStartPt, const Point &rEndPt)
 
void DrawLine (const Point &rStartPt, const Point &rEndPt, const LineInfo &rLineInfo)
 

Polyline functions

SAL_DLLPRIVATE void drawPolyLine (const tools::Polygon &rPoly, const LineInfo &rLineInfo)
 
void DrawPolyLine (const tools::Polygon &rPoly)
 Render the given polygon as a line stroke. More...
 
void DrawPolyLine (const basegfx::B2DPolygon &, double fLineWidth=0.0, basegfx::B2DLineJoin eLineJoin=basegfx::B2DLineJoin::Round, css::drawing::LineCap eLineCap=css::drawing::LineCap_BUTT, double fMiterMinimumAngle=basegfx::deg2rad(15.0))
 
void DrawPolyLine (const tools::Polygon &rPoly, const LineInfo &rLineInfo)
 Render the given polygon as a line stroke. More...
 
bool DrawPolyLineDirect (const basegfx::B2DHomMatrix &rObjectTransform, const basegfx::B2DPolygon &rB2DPolygon, double fLineWidth=0.0, double fTransparency=0.0, basegfx::B2DLineJoin eLineJoin=basegfx::B2DLineJoin::NONE, css::drawing::LineCap eLineCap=css::drawing::LineCap_BUTT, double fMiterMinimumAngle=basegfx::deg2rad(15.0), bool bBypassAACheck=false)
 

Polygon functions

SAL_DLLPRIVATE void ImplDrawPolygon (const tools::Polygon &rPoly, const tools::PolyPolygon *pClipPolyPoly=nullptr)
 
SAL_DLLPRIVATE void ImplDrawPolyPolygon (const tools::PolyPolygon &rPolyPoly, const tools::PolyPolygon *pClipPolyPoly)
 
SAL_DLLPRIVATE void ImplDrawPolyPolygon (sal_uInt16 nPoly, const tools::PolyPolygon &rPolyPoly)
 
SAL_DLLPRIVATE void ImplDrawPolyPolygonWithB2DPolyPolygon (const basegfx::B2DPolyPolygon &rB2DPolyPoly)
 
void DrawPolygon (const tools::Polygon &rPoly)
 Render the given polygon. More...
 
void DrawPolygon (const basegfx::B2DPolygon &)
 
void DrawPolyPolygon (const tools::PolyPolygon &rPolyPoly)
 Render the given poly-polygon. More...
 
void DrawPolyPolygon (const basegfx::B2DPolyPolygon &)
 

Gradient functions

SAL_DLLPRIVATE void DrawLinearGradient (const tools::Rectangle &rRect, const Gradient &rGradient, const tools::PolyPolygon *pClipPolyPoly)
 
SAL_DLLPRIVATE void DrawComplexGradient (const tools::Rectangle &rRect, const Gradient &rGradient, const tools::PolyPolygon *pClipPolyPoly)
 
SAL_DLLPRIVATE void DrawGradientToMetafile (const tools::PolyPolygon &rPolyPoly, const Gradient &rGradient)
 
SAL_DLLPRIVATE void DrawLinearGradientToMetafile (const tools::Rectangle &rRect, const Gradient &rGradient)
 
SAL_DLLPRIVATE void DrawComplexGradientToMetafile (const tools::Rectangle &rRect, const Gradient &rGradient)
 
SAL_DLLPRIVATE long GetGradientSteps (const Gradient &rGradient, const tools::Rectangle &rRect, bool bMtf, bool bComplex=false)
 
SAL_DLLPRIVATE Color GetSingleColorGradientFill ()
 
SAL_DLLPRIVATE void SetGrayscaleColors (Gradient &rGradient)
 
virtual bool UsePolyPolygonForComplexGradient ()=0
 
virtual long GetGradientStepCount (long nMinRect)
 
void DrawGradient (const tools::Rectangle &rRect, const Gradient &rGradient)
 
void DrawGradient (const tools::PolyPolygon &rPolyPoly, const Gradient &rGradient)
 
void AddGradientActions (const tools::Rectangle &rRect, const Gradient &rGradient, GDIMetaFile &rMtf)
 

Hatch functions

SAL_DLLPRIVATE void CalcHatchValues (const tools::Rectangle &rRect, long nDist, sal_uInt16 nAngle10, Point &rPt1, Point &rPt2, Size &rInc, Point &rEndPt1)
 
SAL_DLLPRIVATE void DrawHatchLine (const tools::Line &rLine, const tools::PolyPolygon &rPolyPoly, Point *pPtBuffer, bool bMtf)
 
void DrawHatch (const tools::PolyPolygon &rPolyPoly, const Hatch &rHatch)
 
void AddHatchActions (const tools::PolyPolygon &rPolyPoly, const Hatch &rHatch, GDIMetaFile &rMtf)
 
void DrawHatch (const tools::PolyPolygon &rPolyPoly, const Hatch &rHatch, bool bMtf)
 

Wallpaper functions

SAL_DLLPRIVATE void DrawWallpaper (long nX, long nY, long nWidth, long nHeight, const Wallpaper &rWallpaper)
 
SAL_DLLPRIVATE void DrawColorWallpaper (long nX, long nY, long nWidth, long nHeight, const Wallpaper &rWallpaper)
 
SAL_DLLPRIVATE void DrawBitmapWallpaper (long nX, long nY, long nWidth, long nHeight, const Wallpaper &rWallpaper)
 
void DrawGradientWallpaper (long nX, long nY, long nWidth, long nHeight, const Wallpaper &rWallpaper)
 
void DrawWallpaper (const tools::Rectangle &rRect, const Wallpaper &rWallpaper)
 
void Erase ()
 
void Erase (const tools::Rectangle &rRect)
 

Text functions

SAL_DLLPRIVATE void ImplInitTextColor ()
 
SAL_DLLPRIVATE void ImplDrawTextDirect (SalLayout &, bool bTextLines)
 
SAL_DLLPRIVATE void ImplDrawSpecialText (SalLayout &)
 
SAL_DLLPRIVATE void ImplDrawTextRect (long nBaseX, long nBaseY, long nX, long nY, long nWidth, long nHeight)
 
SAL_DLLPRIVATE void ImplDrawWaveLine (long nBaseX, long nBaseY, long nStartX, long nStartY, long nWidth, long nHeight, long nLineWidth, short nOrientation, const Color &rColor)
 
SAL_DLLPRIVATE void ImplDrawWaveTextLine (long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontLineStyle eTextLine, Color aColor, bool bIsAbove)
 
SAL_DLLPRIVATE void ImplDrawStraightTextLine (long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontLineStyle eTextLine, Color aColor, bool bIsAbove)
 
SAL_DLLPRIVATE void ImplDrawStrikeoutLine (long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontStrikeout eStrikeout, Color aColor)
 
SAL_DLLPRIVATE void ImplDrawStrikeoutChar (long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontStrikeout eStrikeout, Color aColor)
 
SAL_DLLPRIVATE void ImplDrawMnemonicLine (long nX, long nY, long nWidth)
 
SAL_DLLPRIVATE void ImplInitTextLineSize ()
 
SAL_DLLPRIVATE void ImplInitAboveTextLineSize ()
 
void DrawText (const Point &rStartPt, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, MetricVector *pVector=nullptr, OUString *pDisplayText=nullptr, const SalLayoutGlyphs *pLayoutCache=nullptr)
 
void DrawText (const tools::Rectangle &rRect, const OUString &rStr, DrawTextFlags nStyle=DrawTextFlags::NONE, MetricVector *pVector=nullptr, OUString *pDisplayText=nullptr, vcl::ITextLayout *_pTextLayout=nullptr)
 
void ImplDrawText (SalLayout &)
 
void ImplDrawTextBackground (const SalLayout &)
 
void DrawCtrlText (const Point &rPos, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, DrawTextFlags nStyle=DrawTextFlags::Mnemonic, MetricVector *pVector=nullptr, OUString *pDisplayText=nullptr, const SalLayoutGlyphs *pGlyphs=nullptr)
 
void DrawTextLine (const Point &rPos, long nWidth, FontStrikeout eStrikeout, FontLineStyle eUnderline, FontLineStyle eOverline, bool bUnderlineAbove=false)
 
void ImplDrawTextLine (long nBaseX, long nX, long nY, DeviceCoordinate nWidth, FontStrikeout eStrikeout, FontLineStyle eUnderline, FontLineStyle eOverline, bool bUnderlineAbove)
 
void ImplDrawTextLines (SalLayout &, FontStrikeout eStrikeout, FontLineStyle eUnderline, FontLineStyle eOverline, bool bWordLine, bool bUnderlineAbove)
 
void DrawWaveLine (const Point &rStartPos, const Point &rEndPos, long nLineWidth=1)
 
bool ImplDrawRotateText (SalLayout &)
 
tools::Rectangle GetTextRect (const tools::Rectangle &rRect, const OUString &rStr, DrawTextFlags nStyle=DrawTextFlags::WordBreak, TextRectInfo *pInfo=nullptr, const vcl::ITextLayout *_pTextLayout=nullptr) const
 
bool GetTextBoundRect (tools::Rectangle &rRect, const OUString &rStr, sal_Int32 nBase=0, sal_Int32 nIndex=0, sal_Int32 nLen=-1, sal_uLong nLayoutWidth=0, const long *pDXArray=nullptr, const SalLayoutGlyphs *pGlyphs=nullptr) const
 Return the exact bounding rectangle of rStr. More...
 
tools::Rectangle ImplGetTextBoundRect (const SalLayout &)
 
bool GetTextOutline (tools::PolyPolygon &, const OUString &rStr, sal_Int32 nLen=-1, sal_uLong nLayoutWidth=0, const long *pDXArray=nullptr) const
 
bool GetTextOutlines (PolyPolyVector &, const OUString &rStr, sal_Int32 nBase=0, sal_Int32 nIndex=0, sal_Int32 nLen=-1, sal_uLong nLayoutWidth=0, const long *pDXArray=nullptr) const
 
bool GetTextOutlines (basegfx::B2DPolyPolygonVector &rVector, const OUString &rStr, sal_Int32 nBase, sal_Int32 nIndex=0, sal_Int32 nLen=-1, sal_uLong nLayoutWidth=0, const long *pDXArray=nullptr) const
 
OUString GetEllipsisString (const OUString &rStr, long nMaxWidth, DrawTextFlags nStyle=DrawTextFlags::EndEllipsis) const
 
long GetCtrlTextWidth (const OUString &rStr, const SalLayoutGlyphs *pLayoutCache=nullptr) const
 
void AddTextRectActions (const tools::Rectangle &rRect, const OUString &rOrigStr, DrawTextFlags nStyle, GDIMetaFile &rMtf)
 Generate MetaTextActions for the text rect. More...
 
void SetTextColor (const Color &rColor)
 
const ColorGetTextColor () const
 
void SetTextFillColor ()
 
void SetTextFillColor (const Color &rColor)
 
Color GetTextFillColor () const
 
bool IsTextFillColor () const
 
void SetTextLineColor ()
 
void SetTextLineColor (const Color &rColor)
 
const ColorGetTextLineColor () const
 
bool IsTextLineColor () const
 
void SetOverlineColor ()
 
void SetOverlineColor (const Color &rColor)
 
const ColorGetOverlineColor () const
 
bool IsOverlineColor () const
 
void SetTextAlign (TextAlign eAlign)
 
TextAlign GetTextAlign () const
 
long GetTextWidth (const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, vcl::TextLayoutCache const *=nullptr, SalLayoutGlyphs const *const pLayoutCache=nullptr) const
 Width of the text. More...
 
long GetTextHeight () const
 Height where any character of the current font fits; in logic coordinates. More...
 
float approximate_char_width () const
 
float approximate_digit_width () const
 
void DrawTextArray (const Point &rStartPt, const OUString &rStr, const long *pDXAry, sal_Int32 nIndex=0, sal_Int32 nLen=-1, SalLayoutFlags flags=SalLayoutFlags::NONE, const SalLayoutGlyphs *pLayoutCache=nullptr)
 
long GetTextArray (const OUString &rStr, long *pDXAry, sal_Int32 nIndex=0, sal_Int32 nLen=-1, vcl::TextLayoutCache const *=nullptr, SalLayoutGlyphs const *const pLayoutCache=nullptr) const
 
void GetCaretPositions (const OUString &, long *pCaretXArray, sal_Int32 nIndex, sal_Int32 nLen, const SalLayoutGlyphs *pGlyphs=nullptr) const
 
void DrawStretchText (const Point &rStartPt, sal_uLong nWidth, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1)
 
sal_Int32 GetTextBreak (const OUString &rStr, long nTextWidth, sal_Int32 nIndex, sal_Int32 nLen=-1, long nCharExtra=0, vcl::TextLayoutCache const *=nullptr, const SalLayoutGlyphs *pGlyphs=nullptr) const
 
sal_Int32 GetTextBreak (const OUString &rStr, long nTextWidth, sal_Unicode nExtraChar, sal_Int32 &rExtraCharPos, sal_Int32 nIndex, sal_Int32 nLen, long nCharExtra, vcl::TextLayoutCache const *=nullptr) const
 
static void ImplDrawText (OutputDevice &rTargetDevice, const tools::Rectangle &rRect, const OUString &rOrigStr, DrawTextFlags nStyle, MetricVector *pVector, OUString *pDisplayText, vcl::ITextLayout &_rLayout)
 
static OUString GetNonMnemonicString (const OUString &rStr, sal_Int32 &rMnemonicPos)
 
static OUString GetNonMnemonicString (const OUString &rStr)
 
static std::shared_ptr< vcl::TextLayoutCacheCreateTextLayoutCache (OUString const &)
 
static SAL_DLLPRIVATE long ImplGetTextLines (ImplMultiTextLineInfo &rLineInfo, long nWidth, const OUString &rStr, DrawTextFlags nStyle, const vcl::ITextLayout &_rLayout)
 
static SAL_DLLPRIVATE void ImplDrawWavePixel (long nOriginX, long nOriginY, long nCurX, long nCurY, short nOrientation, SalGraphics *pGraphics, OutputDevice const *pOutDev, bool bDrawPixAsRect, long nPixWidth, long nPixHeight)
 

Font functions

typedef void(OutputDevice::* FontUpdateHandler_t) (bool)
 
SAL_DLLPRIVATE bool ImplNewFont () const
 
SAL_DLLPRIVATE void ImplDrawEmphasisMark (long nBaseX, long nX, long nY, const tools::PolyPolygon &rPolyPoly, bool bPolyLine, const tools::Rectangle &rRect1, const tools::Rectangle &rRect2)
 
SAL_DLLPRIVATE void ImplDrawEmphasisMarks (SalLayout &)
 
SAL_DLLPRIVATE const LogicalFontInstanceGetFontInstance () const
 
SAL_DLLPRIVATE long GetEmphasisAscent () const
 
SAL_DLLPRIVATE long GetEmphasisDescent () const
 
SAL_DLLPRIVATE bool InitFont () const
 
virtual void SetFontOrientation (LogicalFontInstance *const pFontInstance) const
 
virtual long GetFontExtLeading () const
 
virtual void ImplClearFontData (bool bNewFontLists)
 
virtual void ImplRefreshFontData (bool bNewFontLists)
 
void ReleaseFontCache ()
 
void ReleaseFontCollection ()
 
void SetFontCollectionFromSVData ()
 
void ResetNewFontCache ()
 
FontMetric GetDevFont (int nDevFontIndex) const
 
int GetDevFontCount () const
 
bool IsFontAvailable (const OUString &rFontName) const
 
Size GetDevFontSize (const vcl::Font &rFont, int nSizeIndex) const
 
int GetDevFontSizeCount (const vcl::Font &) const
 
bool AddTempDevFont (const OUString &rFileURL, const OUString &rFontName)
 
void RefreshFontData (const bool bNewFontLists)
 
FontMetric GetFontMetric () const
 
FontMetric GetFontMetric (const vcl::Font &rFont) const
 
bool GetFontCharMap (FontCharMapRef &rxFontCharMap) const
 
bool GetFontCapabilities (vcl::FontCapabilities &rFontCapabilities) const
 
bool GetFontFeatures (std::vector< vcl::font::Feature > &rFontFeatures) const
 
SystemFontData GetSysFontData (int nFallbacklevel) const
 Retrieve detailed font information in platform independent structure. More...
 
SAL_DLLPRIVATE void ImplGetEmphasisMark (tools::PolyPolygon &rPolyPoly, bool &rPolyLine, tools::Rectangle &rRect1, tools::Rectangle &rRect2, long &rYOff, long &rWidth, FontEmphasisMark eEmphasis, long nHeight)
 
bool GetGlyphBoundRects (const Point &rOrigin, const OUString &rStr, int nIndex, int nLen, MetricVector &rVector)
 
sal_Int32 HasGlyphs (const vcl::Font &rFont, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1) const
 
long GetMinKashida () const
 
sal_Int32 ValidateKashidas (const OUString &rTxt, sal_Int32 nIdx, sal_Int32 nLen, sal_Int32 nKashCount, const sal_Int32 *pKashidaPos, sal_Int32 *pKashidaPosDropped) const
 
SAL_DLLPRIVATE void ImplInitFontList () const
 
SAL_DLLPRIVATE void ImplUpdateFontData ()
 
static SAL_DLLPRIVATE FontEmphasisMark ImplGetEmphasisMarkStyle (const vcl::Font &rFont)
 
static void BeginFontSubstitution ()
 
static void EndFontSubstitution ()
 
static void AddFontSubstitute (const OUString &rFontName, const OUString &rReplaceFontName, AddFontSubstituteFlags nFlags)
 
static void RemoveFontsSubstitute ()
 
static vcl::Font GetDefaultFont (DefaultFontType nType, LanguageType eLang, GetDefaultFontFlags nFlags, const OutputDevice *pOutDev=nullptr)
 
static SAL_DLLPRIVATE void ImplClearAllFontData (bool bNewFontLists)
 
static SAL_DLLPRIVATE void ImplRefreshAllFontData (bool bNewFontLists)
 
static SAL_DLLPRIVATE void ImplUpdateAllFontData (bool bNewFontLists)
 
static void LockFontUpdates (bool bLock)
 
static SAL_DLLPRIVATE void ImplUpdateFontDataForAllFrames (FontUpdateHandler_t pHdl, bool bNewFontLists)
 
static SAL_DLLPRIVATE OUString ImplGetEllipsisString (const OutputDevice &rTargetDevice, const OUString &rStr, long nMaxWidth, DrawTextFlags nStyle, const vcl::ITextLayout &_rLayout)
 

Bitmap functions

SAL_DLLPRIVATE void DrawDeviceAlphaBitmap (const Bitmap &rBmp, const AlphaMask &rAlpha, const Point &rDestPt, const Size &rDestSize, const Point &rSrcPtPixel, const Size &rSrcSizePixel)
 
SAL_DLLPRIVATE void DrawDeviceAlphaBitmapSlowPath (const Bitmap &rBitmap, const AlphaMask &rAlpha, tools::Rectangle aDstRect, tools::Rectangle aBmpRect, Size const &aOutSz, Point const &aOutPt)
 
SAL_DLLPRIVATE void BlendBitmap (const SalTwoRect &rPosAry, const Bitmap &rBmp)
 
SAL_DLLPRIVATE Bitmap BlendBitmap (Bitmap &aBmp, BitmapReadAccess const *pP, BitmapReadAccess const *pA, const sal_Int32 nOffY, const sal_Int32 nDstHeight, const sal_Int32 nOffX, const sal_Int32 nDstWidth, const tools::Rectangle &aBmpRect, const Size &aOutSz, const bool bHMirr, const bool bVMirr, const long *pMapX, const long *pMapY)
 
SAL_DLLPRIVATE Bitmap BlendBitmapWithAlpha (Bitmap &aBmp, BitmapReadAccess const *pP, BitmapReadAccess const *pA, const tools::Rectangle &aDstRect, const sal_Int32 nOffY, const sal_Int32 nDstHeight, const sal_Int32 nOffX, const sal_Int32 nDstWidth, const long *pMapX, const long *pMapY)
 
SAL_DLLPRIVATE Bitmap GetDownsampledBitmap (const Size &rDstSz, const Point &rSrcPt, const Size &rSrcSz, const Bitmap &rBmp, long nMaxBmpDPIX, long nMaxBmpDPIY)
 Retrieve downsampled and cropped bitmap. More...
 
virtual void DrawDeviceBitmap (const Point &rDestPt, const Size &rDestSize, const Point &rSrcPtPixel, const Size &rSrcSizePixel, BitmapEx &rBitmapEx)
 
virtual void ScaleBitmap (Bitmap &rBmp, SalTwoRect &rPosAry)
 
virtual bool DrawTransformBitmapExDirect (const basegfx::B2DHomMatrix &aFullTransform, const BitmapEx &rBitmapEx)
 Transform and draw a bitmap directly. More...
 
virtual bool TransformAndReduceBitmapExToTargetRange (const basegfx::B2DHomMatrix &aFullTransform, basegfx::B2DRange &aVisibleRange, double &fMaximumArea)
 Transform and reduce the area that needs to be drawn of the bitmap and return the new visible range and the maximum area. More...
 
void DrawBitmap (const Point &rDestPt, const Bitmap &rBitmap)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. void DrawBitmap( const Point& rDestPt, const Size& rDestSize, const Point& rSrcPtPixel, const Size& rSecSizePixel, const Bitmap& rBitmap, MetaActionType nAction = MetaActionType::BMPSCALEPART) More...
 
void DrawBitmap (const Point &rDestPt, const Size &rDestSize, const Bitmap &rBitmap)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. void DrawBitmap( const Point& rDestPt, const Size& rDestSize, const Point& rSrcPtPixel, const Size& rSecSizePixel, const Bitmap& rBitmap, MetaActionType nAction = MetaActionType::BMPSCALEPART) More...
 
void DrawBitmap (const Point &rDestPt, const Size &rDestSize, const Point &rSrcPtPixel, const Size &rSrcSizePixel, const Bitmap &rBitmap, MetaActionType nAction=MetaActionType::BMPSCALEPART)
 
void DrawBitmapEx (const Point &rDestPt, const BitmapEx &rBitmapEx)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. void DrawBitmapEx( const Point& rDestPt, const Size& rDestSize, const Point& rSrcPtPixel, const Size& rSecSizePixel, const BitmapEx& rBitmapEx, MetaActionType nAction = MetaActionType::BMPEXSCALEPART) More...
 
void DrawBitmapEx (const Point &rDestPt, const Size &rDestSize, const BitmapEx &rBitmapEx)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. void DrawBitmapEx( const Point& rDestPt, const Size& rDestSize, const Point& rSrcPtPixel, const Size& rSecSizePixel, const BitmapEx& rBitmapEx, MetaActionType nAction = MetaActionType::BMPEXSCALEPART) More...
 
void DrawBitmapEx (const Point &rDestPt, const Size &rDestSize, const Point &rSrcPtPixel, const Size &rSrcSizePixel, const BitmapEx &rBitmapEx, MetaActionType nAction=MetaActionType::BMPEXSCALEPART)
 
void DrawImage (const Point &rPos, const Image &rImage, DrawImageFlags nStyle=DrawImageFlags::NONE)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. virtual void DrawImage( const Point& rPos, const Size& rSize, const Image& rImage, sal_uInt16 nStyle = 0) More...
 
void DrawImage (const Point &rPos, const Size &rSize, const Image &rImage, DrawImageFlags nStyle=DrawImageFlags::NONE)
 
virtual Bitmap GetBitmap (const Point &rSrcPt, const Size &rSize) const
 
BitmapEx GetBitmapEx (const Point &rSrcPt, const Size &rSize) const
 Query extended bitmap (with alpha channel, if available). More...
 
void DrawTransformedBitmapEx (const basegfx::B2DHomMatrix &rTransformation, const BitmapEx &rBitmapEx)
 Draw BitmapEx transformed. More...
 
void DrawShadowBitmapEx (const BitmapEx &rBitmapEx,::Color aShadowColor)
 

Transparency functions

SAL_DLLPRIVATE bool DrawTransparentNatively (const tools::PolyPolygon &rPolyPoly, sal_uInt16 nTransparencePercent)
 
virtual void EmulateDrawTransparent (const tools::PolyPolygon &rPolyPoly, sal_uInt16 nTransparencePercent)
 
void DrawInvisiblePolygon (const tools::PolyPolygon &rPolyPoly)
 
virtual void ClipAndDrawGradientMetafile (const Gradient &rGradient, const tools::PolyPolygon &rPolyPoly)
 
bool RemoveTransparenciesFromMetaFile (const GDIMetaFile &rInMtf, GDIMetaFile &rOutMtf, long nMaxBmpDPIX, long nMaxBmpDPIY, bool bReduceTransparency, bool bTransparencyAutoMode, bool bDownsampleBitmaps, const Color &rBackground=COL_TRANSPARENT)
 helper method removing transparencies from a metafile (e.g. More...
 
SAL_DLLPRIVATE void ImplPrintTransparent (const Bitmap &rBmp, const Bitmap &rMask, const Point &rDestPt, const Size &rDestSize, const Point &rSrcPtPixel, const Size &rSrcSizePixel)
 
SAL_DLLPRIVATE Color ImplDrawModeToColor (const Color &rColor) const
 
void DrawTransparent (const tools::PolyPolygon &rPolyPoly, sal_uInt16 nTransparencePercent)
 
void DrawTransparent (const basegfx::B2DHomMatrix &rObjectTransform, const basegfx::B2DPolyPolygon &rB2DPolyPoly, double fTransparency)
 
void DrawTransparent (const GDIMetaFile &rMtf, const Point &rPos, const Size &rSize, const Gradient &rTransparenceGradient)
 

Mask functions

virtual void DrawDeviceMask (const Bitmap &rMask, const Color &rMaskColor, const Point &rDestPt, const Size &rDestSize, const Point &rSrcPtPixel, const Size &rSrcSizePixel)
 
void DrawMask (const Point &rDestPt, const Bitmap &rBitmap, const Color &rMaskColor)
 
void DrawMask (const Point &rDestPt, const Size &rDestSize, const Bitmap &rBitmap, const Color &rMaskColor)
 
void DrawMask (const Point &rDestPt, const Size &rDestSize, const Point &rSrcPtPixel, const Size &rSrcSizePixel, const Bitmap &rBitmap, const Color &rMaskColor, MetaActionType nAction)
 

Map functions

void EnableMapMode (bool bEnable=true)
 
bool IsMapModeEnabled () const
 
void SetMapMode ()
 
virtual void SetMapMode (const MapMode &rNewMapMode)
 
void SetRelativeMapMode (const MapMode &rNewMapMode)
 
const MapModeGetMapMode () const
 
basegfx::B2DHomMatrix GetViewTransformation () const
 
basegfx::B2DHomMatrix GetInverseViewTransformation () const
 
basegfx::B2DHomMatrix GetViewTransformation (const MapMode &rMapMode) const
 
basegfx::B2DHomMatrix GetInverseViewTransformation (const MapMode &rMapMode) const
 
void SetPixelOffset (const Size &rOffset)
 Set an offset in pixel. More...
 
Size GetPixelOffset () const
 Get the offset in pixel. More...
 
Point LogicToPixel (const Point &rLogicPt) const
 
Size LogicToPixel (const Size &rLogicSize) const
 
tools::Rectangle LogicToPixel (const tools::Rectangle &rLogicRect) const
 
tools::Polygon LogicToPixel (const tools::Polygon &rLogicPoly) const
 
tools::PolyPolygon LogicToPixel (const tools::PolyPolygon &rLogicPolyPoly) const
 
basegfx::B2DPolyPolygon LogicToPixel (const basegfx::B2DPolyPolygon &rLogicPolyPoly) const
 
vcl::Region LogicToPixel (const vcl::Region &rLogicRegion) const
 
Point LogicToPixel (const Point &rLogicPt, const MapMode &rMapMode) const
 
Size LogicToPixel (const Size &rLogicSize, const MapMode &rMapMode) const
 
tools::Rectangle LogicToPixel (const tools::Rectangle &rLogicRect, const MapMode &rMapMode) const
 
tools::Polygon LogicToPixel (const tools::Polygon &rLogicPoly, const MapMode &rMapMode) const
 
basegfx::B2DPolyPolygon LogicToPixel (const basegfx::B2DPolyPolygon &rLogicPolyPoly, const MapMode &rMapMode) const
 
Point PixelToLogic (const Point &rDevicePt) const
 
Size PixelToLogic (const Size &rDeviceSize) const
 
tools::Rectangle PixelToLogic (const tools::Rectangle &rDeviceRect) const
 
tools::Polygon PixelToLogic (const tools::Polygon &rDevicePoly) const
 
tools::PolyPolygon PixelToLogic (const tools::PolyPolygon &rDevicePolyPoly) const
 
basegfx::B2DPolyPolygon PixelToLogic (const basegfx::B2DPolyPolygon &rDevicePolyPoly) const
 
vcl::Region PixelToLogic (const vcl::Region &rDeviceRegion) const
 
Point PixelToLogic (const Point &rDevicePt, const MapMode &rMapMode) const
 
Size PixelToLogic (const Size &rDeviceSize, const MapMode &rMapMode) const
 
tools::Rectangle PixelToLogic (const tools::Rectangle &rDeviceRect, const MapMode &rMapMode) const
 
tools::Polygon PixelToLogic (const tools::Polygon &rDevicePoly, const MapMode &rMapMode) const
 
basegfx::B2DPolygon PixelToLogic (const basegfx::B2DPolygon &rDevicePoly, const MapMode &rMapMode) const
 
basegfx::B2DPolyPolygon PixelToLogic (const basegfx::B2DPolyPolygon &rDevicePolyPoly, const MapMode &rMapMode) const
 
Point LogicToLogic (const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
 
Size LogicToLogic (const Size &rSzSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
 
tools::Rectangle LogicToLogic (const tools::Rectangle &rRectSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
 
SAL_DLLPRIVATE tools::Rectangle ImplLogicToDevicePixel (const tools::Rectangle &rLogicRect) const
 Convert a logical rectangle to a rectangle in physical device pixel units. More...
 
SAL_DLLPRIVATE Point ImplLogicToDevicePixel (const Point &rLogicPt) const
 Convert a logical point to a physical point on the device. More...
 
SAL_DLLPRIVATE long ImplLogicWidthToDevicePixel (long nWidth) const
 Convert a logical width to a width in units of device pixels. More...
 
SAL_DLLPRIVATE DeviceCoordinate LogicWidthToDeviceCoordinate (long nWidth) const
 
SAL_DLLPRIVATE long ImplLogicXToDevicePixel (long nX) const
 Convert a logical X coordinate to a device pixel's X coordinate. More...
 
SAL_DLLPRIVATE long ImplLogicYToDevicePixel (long nY) const
 Convert a logical Y coordinate to a device pixel's Y coordinate. More...
 
SAL_DLLPRIVATE long ImplLogicHeightToDevicePixel (long nHeight) const
 Convert a logical height to a height in units of device pixels. More...
 
SAL_DLLPRIVATE long ImplDevicePixelToLogicWidth (long nWidth) const
 Convert device pixels to a width in logical units. More...
 
SAL_DLLPRIVATE long ImplDevicePixelToLogicHeight (long nHeight) const
 Convert device pixels to a height in logical units. More...
 
SAL_DLLPRIVATE float ImplFloatLogicHeightToDevicePixel (float fLogicHeight) const
 Convert logical height to device pixels, with exact sub-pixel value. More...
 
SAL_DLLPRIVATE Size ImplLogicToDevicePixel (const Size &rLogicSize) const
 Convert a logical size to the size on the physical device. More...
 
SAL_DLLPRIVATE tools::Rectangle ImplDevicePixelToLogic (const tools::Rectangle &rPixelRect) const
 Convert a rectangle in physical pixel units to a rectangle in physical pixel units and coords. More...
 
SAL_DLLPRIVATE tools::Polygon ImplLogicToDevicePixel (const tools::Polygon &rLogicPoly) const
 Convert a logical polygon to a polygon in physical device pixel units. More...
 
SAL_DLLPRIVATE tools::PolyPolygon ImplLogicToDevicePixel (const tools::PolyPolygon &rLogicPolyPoly) const
 Convert a logical polypolygon to a polypolygon in physical device pixel units. More...
 
SAL_DLLPRIVATE LineInfo ImplLogicToDevicePixel (const LineInfo &rLineInfo) const
 Convert a line in logical units to a line in physical device pixel units. More...
 
SAL_DLLPRIVATE vcl::Region ImplPixelToDevicePixel (const vcl::Region &rRegion) const
 Convert a region in pixel units to a region in device pixel units and coords. More...
 
SAL_DLLPRIVATE void ImplInvalidateViewTransform ()
 Invalidate the view transformation. More...
 
SAL_DLLPRIVATE basegfx::B2DHomMatrix ImplGetDeviceTransformation () const
 Get device transformation. More...
 
static Point LogicToLogic (const Point &rPtSource, const MapMode &rMapModeSource, const MapMode &rMapModeDest)
 
static Size LogicToLogic (const Size &rSzSource, const MapMode &rMapModeSource, const MapMode &rMapModeDest)
 
static tools::Rectangle LogicToLogic (const tools::Rectangle &rRectSource, const MapMode &rMapModeSource, const MapMode &rMapModeDest)
 
static long LogicToLogic (long nLongSource, MapUnit eUnitSource, MapUnit eUnitDest)
 
static basegfx::B2DPolygon LogicToLogic (const basegfx::B2DPolygon &rPoly, const MapMode &rMapModeSource, const MapMode &rMapModeDest)
 
static basegfx::B2DHomMatrix LogicToLogic (const MapMode &rMapModeSource, const MapMode &rMapModeDest)
 

Additional Inherited Members

- Protected Member Functions inherited from VclReferenceBase
 VclReferenceBase ()
 
virtual ~VclReferenceBase ()
 

Detailed Description

Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inheritance to keep the referencing counting OK.

Definition at line 304 of file outdev.hxx.

Member Typedef Documentation

typedef void( OutputDevice::* OutputDevice::FontUpdateHandler_t) (bool)
private

Definition at line 1302 of file outdev.hxx.

Constructor & Destructor Documentation

OutputDevice::OutputDevice ( const OutputDevice )
privatedelete
OutputDevice::OutputDevice ( OutDevType  eOutDevType)
protected
OutputDevice::~OutputDevice ( )
overrideprotectedvirtual

Definition at line 136 of file outdev.cxx.

References VclReferenceBase::disposeOnce().

Member Function Documentation

virtual bool OutputDevice::AcquireGraphics ( ) const
protectedpure virtual

Acquire a graphics device that the output device uses to draw on.

There is an LRU of OutputDevices that is used to get the graphics. The actual creation of a SalGraphics instance is done via the SalFrame implementation.

However, the SalFrame instance will only return a valid SalGraphics instance if it is not in use or there wasn't one in the first place. When this happens, AcquireGraphics finds the least recently used OutputDevice in a different frame and "steals" it (releases it then starts using it).

If there are no frames to steal an OutputDevice's SalGraphics instance from then it blocks until the graphics is released.

Once it has acquired a graphics instance, then we add the OutputDevice to the LRU.

Returns
true if was able to initialize the graphics device, false otherwise.

Implemented in vcl::Window, Printer, and VirtualDevice.

Referenced by AddTempDevFont(), AddTextRectActions(), CopyArea(), DrawArc(), DrawBitmap(), DrawBitmapEx(), DrawChord(), DrawCtrlText(), DrawEllipse(), DrawEPS(), DrawGradient(), DrawGrid(), DrawHatch(), DrawLine(), DrawMask(), DrawNativeControl(), DrawOutDev(), drawOutDevDirect(), DrawPie(), DrawPixel(), DrawPolygon(), DrawPolyLine(), drawPolyLine(), DrawPolyLineDirect(), DrawPolyPolygon(), DrawRect(), DrawText(), DrawTextArray(), DrawTransparent(), DrawWaveLine(), GetBitCount(), GetBitmap(), getFallbackLayout(), GetGraphics(), GetNativeControlRegion(), GetPixel(), GetSystemGfxData(), HasMirroredGraphics(), HitTestNativeScrollbar(), ImplClearFontData(), ImplDrawPolyPolygonWithB2DPolyPolygon(), vcl::Window::ImplGetFrameGraphics(), vcl::Window::ImplInit(), ImplInitFontList(), VirtualDevice::ImplInitVirDev(), ImplIsAntiparallel(), ImplNewFont(), ImplRefreshFontData(), InitFont(), Invert(), vcl::Window::InvertTracking(), IsNativeControlSupported(), SelectClipRegion(), SetRasterOp(), and SupportsOperation().

void OutputDevice::AddFontSubstitute ( const OUString &  rFontName,
const OUString &  rReplaceFontName,
AddFontSubstituteFlags  nFlags 
)
static
void OutputDevice::AddGradientActions ( const tools::Rectangle rRect,
const Gradient rGradient,
GDIMetaFile rMtf 
)
void OutputDevice::AddHatchActions ( const tools::PolyPolygon rPolyPoly,
const Hatch rHatch,
GDIMetaFile rMtf 
)
bool OutputDevice::AddTempDevFont ( const OUString &  rFileURL,
const OUString &  rFontName 
)
void OutputDevice::AddTextRectActions ( const tools::Rectangle rRect,
const OUString &  rOrigStr,
DrawTextFlags  nStyle,
GDIMetaFile rMtf 
)

Generate MetaTextActions for the text rect.

This method splits up the text rect into multiple MetaTextActions, one for each line of text. This is comparable to AddGradientActions(), which splits up a gradient into its constituent polygons. Parameter semantics fully compatible to DrawText().

Definition at line 1712 of file text.cxx.

References AcquireGraphics(), EnableOutput(), ImplDrawText(), InitClipRegion(), tools::Rectangle::IsEmpty(), IsOutputEnabled(), mbInitClipRegion, mpGraphics, and mpMetaFile.

float OutputDevice::approximate_char_width ( ) const
float OutputDevice::approximate_digit_width ( ) const

Definition at line 910 of file text.cxx.

References GetTextWidth().

Referenced by ComboBox::CalcMinimumSize().

void OutputDevice::BeginFontSubstitution ( )
static
void OutputDevice::BlendBitmap ( const SalTwoRect rPosAry,
const Bitmap rBmp 
)
private
Bitmap OutputDevice::BlendBitmap ( Bitmap aBmp,
BitmapReadAccess const *  pP,
BitmapReadAccess const *  pA,
const sal_Int32  nOffY,
const sal_Int32  nDstHeight,
const sal_Int32  nOffX,
const sal_Int32  nDstWidth,
const tools::Rectangle aBmpRect,
const Size aOutSz,
const bool  bHMirr,
const bool  bVMirr,
const long *  pMapX,
const long *  pMapY 
)
private
Bitmap OutputDevice::BlendBitmapWithAlpha ( Bitmap aBmp,
BitmapReadAccess const *  pP,
BitmapReadAccess const *  pA,
const tools::Rectangle aDstRect,
const sal_Int32  nOffY,
const sal_Int32  nDstHeight,
const sal_Int32  nOffX,
const sal_Int32  nDstWidth,
const long *  pMapX,
const long *  pMapY 
)
private
void OutputDevice::CalcHatchValues ( const tools::Rectangle rRect,
long  nDist,
sal_uInt16  nAngle10,
Point rPt1,
Point rPt2,
Size rInc,
Point rEndPt1 
)
private
void OutputDevice::ClipAndDrawGradientMetafile ( const Gradient rGradient,
const tools::PolyPolygon rPolyPoly 
)
protectedvirtual
vcl::Region OutputDevice::ClipToDeviceBounds ( vcl::Region  aRegion) const
protectedvirtual

Perform actual rect clip against outdev dimensions, to generate empty clips whenever one of the values is completely off the device.

Parameters
aRegionregion to be clipped to the device dimensions
Returns
region clipped to the device bounds

Reimplemented in vcl::PDFWriterImpl, and Printer.

Definition at line 184 of file outdev/clipping.cxx.

References GetOutputHeightPixel(), GetOutputWidthPixel(), vcl::Region::Intersect(), mnOutOffX, and mnOutOffY.

Referenced by InitClipRegion().

void OutputDevice::ClipToPaintRegion ( tools::Rectangle rDstRect)
protectedvirtual

Reimplemented in vcl::Window.

Definition at line 199 of file outdev/clipping.cxx.

Referenced by DrawDeviceAlphaBitmap(), DrawTransparent(), and EmulateDrawTransparent().

void OutputDevice::CopyArea ( const Point rDestPt,
const Point rSrcPt,
const Size rSrcSize,
bool  bWindowInvalidate = false 
)
virtual
void OutputDevice::CopyDeviceArea ( SalTwoRect aPosAry,
bool  bWindowInvalidate 
)
protectedvirtual
cairo::SurfaceSharedPtr OutputDevice::CreateBitmapSurface ( const BitmapSystemData rData,
const Size rSize 
) const

Create Surface for given bitmap data.

cairo::SurfaceSharedPtr OutputDevice::CreateSurface ( const cairo::CairoSurfaceSharedPtr rSurface) const

Create Surface from given cairo surface.

cairo::SurfaceSharedPtr OutputDevice::CreateSurface ( int  x,
int  y,
int  width,
int  height 
) const

Create surface with given dimensions.

std::shared_ptr< vcl::TextLayoutCache > OutputDevice::CreateTextLayoutCache ( OUString const &  rString)
static

Definition at line 1350 of file text.cxx.

References GenericSalLayout::CreateTextLayoutCache().

css::uno::Reference< css::awt::XGraphics > OutputDevice::CreateUnoGraphics ( )
std::vector< VCLXGraphics * > * OutputDevice::CreateUnoGraphicsList ( )

Definition at line 330 of file outdev.cxx.

References mpUnoGraphicsList.

void OutputDevice::dispose ( void  )
overrideprotectedvirtual

Reimplemented from VclReferenceBase.

Reimplemented in vcl::PDFWriterImpl, TimeBox, DateBox, CurrencyBox, MetricBox, NumericBox, PatternBox, TimeField, vcl::Window, VclEventBox, DateField, CurrencyField, ImplListBoxFloatingWindow, MetricField, VclScrolledWindow, VclExpander, NumericField, PatternField, VclFrame, ImplListBox, VclPaned, SvTreeListBox, RadioButton, VerticalTabControl, DockingWindow, Printer, ToolBox, ImplListBoxWindow, SvtIconChoiceCtrl, NotebookbarTabControlBase, Calendar, VirtualDevice, Edit, Control, FloatingWindow, ListBox, ImplBorderWindow, SystemWindow, vcl::RoadmapWizard, SplitWindow, SvHeaderTabListBox, MenuBarWindow, StatusBar, VclMultiLineEdit, Dialog, TabControl, MenuFloatingWindow, ScrollBar, Slider, ImplWheelWindow, WorkWindow, Button, Splitter, FixedText, MenuButton, SvTabListBox, ComboBox, HelpTextWindow, vcl::ORoadmap, MessageDialog, TextWindow, MoreButton, Throbber, vcl::HyperLabel, vcl::AboutDialog, SystemChildWindow, TabDialog, TabPage, DockingAreaWindow, IntroWindow, PopupMenuFloatingWindow, NotebookBar, and SpinField.

Definition at line 141 of file outdev.cxx.

References VclPtr< reference_type >::clear(), VclReferenceBase::dispose(), VclPtr< reference_type >::disposeAndClear(), GetUnoGraphicsList(), UnoWrapperBase::GetUnoWrapper(), ImplInvalidateViewTransform(), maOutDevStateStack, mpAlphaVDev, mpDeviceFontList, mpDeviceFontSizeList, mpFontInstance, mpNextGraphics, mpOutDevData, mpPrevGraphics, mpUnoGraphicsList, mxFontCache, mxFontCollection, UnoWrapperBase::ReleaseAllGraphics(), and SAL_WARN.

Referenced by VirtualDevice::dispose(), Printer::dispose(), and vcl::Window::dispose().

void OutputDevice::DrawArc ( const tools::Rectangle rRect,
const Point rStartPt,
const Point rEndPt 
)
void OutputDevice::DrawBitmap ( const Point rDestPt,
const Bitmap rBitmap 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. void DrawBitmap( const Point& rDestPt, const Size& rDestSize, const Point& rSrcPtPixel, const Size& rSecSizePixel, const Bitmap& rBitmap, MetaActionType nAction = MetaActionType::BMPSCALEPART)

Definition at line 51 of file outdev/bitmap.cxx.

References BMP, Bitmap::GetSizePixel(), is_double_buffered_window(), and PixelToLogic().

Referenced by BlendBitmapWithAlpha(), DrawBitmap(), DrawBitmapEx(), DrawDeviceAlphaBitmapSlowPath(), Printer::DrawDeviceBitmap(), EmulateDrawTransparent(), MetaBmpAction::Execute(), MetaBmpScaleAction::Execute(), MetaBmpScalePartAction::Execute(), and ImplPrintTransparent().

void OutputDevice::DrawBitmap ( const Point rDestPt,
const Size rDestSize,
const Bitmap rBitmap 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. void DrawBitmap( const Point& rDestPt, const Size& rDestSize, const Point& rSrcPtPixel, const Size& rSecSizePixel, const Bitmap& rBitmap, MetaActionType nAction = MetaActionType::BMPSCALEPART)

Definition at line 59 of file outdev/bitmap.cxx.

References BMPSCALE, DrawBitmap(), Bitmap::GetSizePixel(), and is_double_buffered_window().

void OutputDevice::DrawBitmap ( const Point rDestPt,
const Size rDestSize,
const Point rSrcPtPixel,
const Size rSrcSizePixel,
const Bitmap rBitmap,
MetaActionType  nAction = MetaActionType::BMPSCALEPART 
)
void OutputDevice::DrawBitmapEx ( const Point rDestPt,
const BitmapEx rBitmapEx 
)
void OutputDevice::DrawBitmapEx ( const Point rDestPt,
const Size rDestSize,
const BitmapEx rBitmapEx 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. void DrawBitmapEx( const Point& rDestPt, const Size& rDestSize, const Point& rSrcPtPixel, const Size& rSecSizePixel, const BitmapEx& rBitmapEx, MetaActionType nAction = MetaActionType::BMPEXSCALEPART)

Definition at line 260 of file outdev/bitmap.cxx.

References BMPEXSCALE, DrawBitmap(), DrawBitmapEx(), BitmapEx::GetBitmap(), BitmapEx::GetSizePixel(), BitmapEx::GetTransparentType(), ImplIsRecordLayout(), is_double_buffered_window(), and NONE.

void OutputDevice::DrawBitmapEx ( const Point rDestPt,
const Size rDestSize,
const Point rSrcPtPixel,
const Size rSrcSizePixel,
const BitmapEx rBitmapEx,
MetaActionType  nAction = MetaActionType::BMPEXSCALEPART 
)
void OutputDevice::DrawBitmapWallpaper ( long  nX,
long  nY,
long  nWidth,
long  nHeight,
const Wallpaper rWallpaper 
)
private
void OutputDevice::DrawCheckered ( const Point rPos,
const Size rSize,
sal_uInt32  nLen = 8,
Color  aStart = COL_WHITE,
Color  aEnd = COL_BLACK 
)

Fill the given rectangle with checkered rectangles of size nLen x nLen using the colors aStart and aEnd.

Definition at line 190 of file rect.cxx.

References DrawRect(), FILLCOLOR, Size::Height(), is_double_buffered_window(), LINECOLOR, Pop(), Push(), SetFillColor(), SetLineColor(), Size::Width(), Point::X(), x, Point::Y(), and y.

void OutputDevice::DrawChord ( const tools::Rectangle rRect,
const Point rStartPt,
const Point rEndPt 
)
void OutputDevice::DrawColorWallpaper ( long  nX,
long  nY,
long  nWidth,
long  nHeight,
const Wallpaper rWallpaper 
)
private
void OutputDevice::DrawComplexGradient ( const tools::Rectangle rRect,
const Gradient rGradient,
const tools::PolyPolygon pClipPolyPoly 
)
private
void OutputDevice::DrawComplexGradientToMetafile ( const tools::Rectangle rRect,
const Gradient rGradient 
)
private
void OutputDevice::DrawCtrlText ( const Point rPos,
const OUString &  rStr,
sal_Int32  nIndex = 0,
sal_Int32  nLen = -1,
DrawTextFlags  nStyle = DrawTextFlags::Mnemonic,
MetricVector pVector = nullptr,
OUString *  pDisplayText = nullptr,
const SalLayoutGlyphs pGlyphs = nullptr 
)
void OutputDevice::DrawDeviceAlphaBitmap ( const Bitmap rBmp,
const AlphaMask rAlpha,
const Point rDestPt,
const Size rDestSize,
const Point rSrcPtPixel,
const Size rSrcSizePixel 
)
private
void OutputDevice::DrawDeviceAlphaBitmapSlowPath ( const Bitmap rBitmap,
const AlphaMask rAlpha,
tools::Rectangle  aDstRect,
tools::Rectangle  aBmpRect,
Size const &  aOutSz,
Point const &  aOutPt 
)
private
void OutputDevice::DrawDeviceBitmap ( const Point rDestPt,
const Size rDestSize,
const Point rSrcPtPixel,
const Size rSrcSizePixel,
BitmapEx rBitmapEx 
)
protectedvirtual
void OutputDevice::DrawDeviceMask ( const Bitmap rMask,
const Color rMaskColor,
const Point rDestPt,
const Size rDestSize,
const Point rSrcPtPixel,
const Size rSrcSizePixel 
)
protectedvirtual
void OutputDevice::DrawEllipse ( const tools::Rectangle rRect)
bool OutputDevice::DrawEPS ( const Point rPt,
const Size rSz,
const GfxLink rGfxLink,
GDIMetaFile pSubst = nullptr 
)
Returns
boolean value to see if EPS could be painted directly. Theoretically, handing over a matrix would be needed to handle painting rotated EPS files (e.g. contained in Metafiles). This would then need to be supported for Mac and PS printers, but that's too much for now, wrote #i107046# for this

Definition at line 667 of file outdev.cxx.

References AcquireGraphics(), GDIMetaFile::AddAction(), Graphic::Draw(), SalGraphics::DrawEPS(), DrawEPS(), GfxLink::GetData(), GfxLink::GetDataSize(), tools::Rectangle::GetHeight(), tools::Rectangle::GetWidth(), ImplIsRecordLayout(), ImplLogicToDevicePixel(), InitClipRegion(), IsDeviceOutputNecessary(), tools::Rectangle::IsEmpty(), tools::Rectangle::Justify(), tools::Rectangle::Left(), mbInitClipRegion, mbOutputClipped, mpAlphaVDev, mpGraphics, mpMetaFile, and tools::Rectangle::Top().

Referenced by DrawEPS(), and MetaEPSAction::Execute().

void OutputDevice::DrawGradient ( const tools::Rectangle rRect,
const Gradient rGradient 
)
void OutputDevice::DrawGradient ( const tools::PolyPolygon rPolyPoly,
const Gradient rGradient 
)
void OutputDevice::DrawGradientToMetafile ( const tools::PolyPolygon rPolyPoly,
const Gradient rGradient 
)
private
void OutputDevice::DrawGradientWallpaper ( long  nX,
long  nY,
long  nWidth,
long  nHeight,
const Wallpaper rWallpaper 
)
protected
void OutputDevice::DrawGrid ( const tools::Rectangle rRect,
const Size rDist,
DrawGridFlags  nFlags 
)
void OutputDevice::DrawHatch ( const tools::PolyPolygon rPolyPoly,
const Hatch rHatch 
)
void OutputDevice::DrawHatch ( const tools::PolyPolygon rPolyPoly,
const Hatch rHatch,
bool  bMtf 
)
void OutputDevice::DrawHatchLine ( const tools::Line rLine,
const tools::PolyPolygon rPolyPoly,
Point pPtBuffer,
bool  bMtf 
)
private
void OutputDevice::DrawHatchLine_DrawLine ( const Point rStartPoint,
const Point rEndPoint 
)
protectedvirtual

Reimplemented in vcl::PDFWriterImpl.

Definition at line 401 of file outdev/hatch.cxx.

References SalGraphics::DrawLine(), ImplLogicToDevicePixel(), and mpGraphics.

Referenced by DrawHatchLine().

void OutputDevice::DrawImage ( const Point rPos,
const Image rImage,
DrawImageFlags  nStyle = DrawImageFlags::NONE 
)
void OutputDevice::DrawImage ( const Point rPos,
const Size rSize,
const Image rImage,
DrawImageFlags  nStyle = DrawImageFlags::NONE 
)
void OutputDevice::DrawInvisiblePolygon ( const tools::PolyPolygon rPolyPoly)
protected
void OutputDevice::DrawLine ( const Point rStartPt,
const Point rEndPt 
)
void OutputDevice::DrawLine ( const Point rStartPt,
const Point rEndPt,
const LineInfo rLineInfo 
)
void OutputDevice::drawLine ( basegfx::B2DPolyPolygon  aLinePolyPolygon,
const LineInfo rInfo 
)
private
void OutputDevice::DrawLinearGradient ( const tools::Rectangle rRect,
const Gradient rGradient,
const tools::PolyPolygon pClipPolyPoly 
)
private
void OutputDevice::DrawLinearGradientToMetafile ( const tools::Rectangle rRect,
const Gradient rGradient 
)
private
void OutputDevice::DrawMask ( const Point rDestPt,
const Bitmap rBitmap,
const Color rMaskColor 
)
void OutputDevice::DrawMask ( const Point rDestPt,
const Size rDestSize,
const Bitmap rBitmap,
const Color rMaskColor 
)

Definition at line 39 of file mask.cxx.

References DrawMask(), Bitmap::GetSizePixel(), is_double_buffered_window(), and MASKSCALE.

void OutputDevice::DrawMask ( const Point rDestPt,
const Size rDestSize,
const Point rSrcPtPixel,
const Size rSrcSizePixel,
const Bitmap rBitmap,
const Color rMaskColor,
MetaActionType  nAction 
)
bool OutputDevice::DrawNativeControl ( ControlType  nType,
ControlPart  nPart,
const tools::Rectangle rControlRegion,
ControlState  nState,
const ImplControlValue aValue,
const OUString &  aCaption 
)
void OutputDevice::DrawOutDev ( const Point rDestPt,
const Size rDestSize,
const Point rSrcPt,
const Size rSrcSize 
)
virtual
void OutputDevice::DrawOutDev ( const Point rDestPt,
const Size rDestSize,
const Point rSrcPt,
const Size rSrcSize,
const OutputDevice rOutDev 
)
virtual
SAL_DLLPRIVATE void OutputDevice::DrawOutDev ( const Point ,
const Size ,
const Point ,
const Size ,
const Printer  
)
privatedelete
void OutputDevice::drawOutDevDirect ( const OutputDevice pSrcDev,
SalTwoRect rPosAry 
)
protected
void OutputDevice::DrawPie ( const tools::Rectangle rRect,
const Point rStartPt,
const Point rEndPt 
)
void OutputDevice::DrawPixel ( const Point rPt)
void OutputDevice::DrawPixel ( const Point rPt,
const Color rColor 
)
void OutputDevice::DrawPolygon ( const tools::Polygon rPoly)
void OutputDevice::DrawPolygon ( const basegfx::B2DPolygon rB2DPolygon)
void OutputDevice::DrawPolyLine ( const tools::Polygon rPoly)
void OutputDevice::DrawPolyLine ( const basegfx::B2DPolygon rB2DPolygon,
double  fLineWidth = 0.0,
basegfx::B2DLineJoin  eLineJoin = basegfx::B2DLineJoin::Round,
css::drawing::LineCap  eLineCap = css::drawing::LineCap_BUTT,
double  fMiterMinimumAngle = basegfx::deg2rad(15.0) 
)
void OutputDevice::DrawPolyLine ( const tools::Polygon rPoly,
const LineInfo rLineInfo 
)

Render the given polygon as a line stroke.

The given polygon is stroked with the current LineColor, start and end point are not automatically connected. The line is rendered according to the specified LineInfo, e.g. supplying a dash pattern, or a line thickness.

See also
DrawPolygon
DrawPolyPolygon

Definition at line 108 of file polyline.cxx.

References GDIMetaFile::AddAction(), basegfx::deg2rad(), DrawPolyLine(), drawPolyLine(), EnableB2dDraw, tools::Polygon::getB2DPolygon(), is_double_buffered_window(), mnAntialiasing, mpMetaFile, and Solid.

void OutputDevice::drawPolyLine ( const tools::Polygon rPoly,
const LineInfo rLineInfo 
)
private
bool OutputDevice::DrawPolyLineDirect ( const basegfx::B2DHomMatrix rObjectTransform,
const basegfx::B2DPolygon rB2DPolygon,
double  fLineWidth = 0.0,
double  fTransparency = 0.0,
basegfx::B2DLineJoin  eLineJoin = basegfx::B2DLineJoin::NONE,
css::drawing::LineCap  eLineCap = css::drawing::LineCap_BUTT,
double  fMiterMinimumAngle = basegfx::deg2rad(15.0),
bool  bBypassAACheck = false 
)
void OutputDevice::DrawPolyPolygon ( const tools::PolyPolygon rPolyPoly)
void OutputDevice::DrawPolyPolygon ( const basegfx::B2DPolyPolygon rB2DPolyPoly)
void OutputDevice::DrawRect ( const tools::Rectangle rRect)

Definition at line 32 of file rect.cxx.

References AcquireGraphics(), GDIMetaFile::AddAction(), SalGraphics::DrawRect(), DrawRect(), tools::Rectangle::GetHeight(), tools::Rectangle::GetWidth(), ImplIsRecordLayout(), ImplLogicToDevicePixel(), InitClipRegion(), InitFillColor(), InitLineColor(), is_double_buffered_window(), IsDeviceOutputNecessary(), tools::Rectangle::IsEmpty(), tools::Rectangle::Justify(), tools::Rectangle::Left(), mbFillColor, mbInitClipRegion, mbInitFillColor, mbInitLineColor, mbLineColor, mbOutputClipped, mpAlphaVDev, mpGraphics, mpMetaFile, and tools::Rectangle::Top().

Referenced by TabPage::Draw(), ComboBox::Draw(), FixedText::Draw(), Dialog::Draw(), ListBox::Draw(), Edit::Draw(), VclMultiLineEdit::Draw(), CheckBox::Draw(), DrawBitmap(), DrawBitmapEx(), DrawCheckered(), DrawColorWallpaper(), Printer::DrawDeviceMask(), Printer::DrawGradientEx(), DrawMask(), DrawOutDev(), DrawProgress(), DrawRect(), vcl::RenderTools::DrawSelectionBackground(), vcl::Window::DrawSelectionBackground(), ImplStdBorderWindowView::DrawWindow(), Printer::EmulateDrawTransparent(), MetaRectAction::Execute(), MetaRoundRectAction::Execute(), MenuBarWindow::HighlightItem(), Slider::ImplDraw(), ScrollBar::ImplDraw(), Calendar::ImplDraw(), ImplWin::ImplDraw(), ImplDrawBrdWinSymbolButton(), Calendar::ImplDrawDate(), ImplDrawEmphasisMark(), SplitWindow::ImplDrawGrip(), ScrollBar::ImplDrawNative(), RadioButton::ImplDrawRadioButtonState(), ToolBox::ImplErase(), VirtualDevice::ImplFillOpaqueRectangle(), HeaderBar::ImplInvertDrag(), ImplListBoxWindow::ImplPaint(), Menu::ImplPaintMenuTitle(), GraphicObject::ImplRenderTileRecursive(), Edit::ImplRepaint(), TextEngine::ImpPaint(), ImageControl::Paint(), HelpTextWindow::Paint(), Splitter::Paint(), SvxIconChoiceCtrl_Impl::PaintEmphasis(), IconView::PaintEntry(), SvxIconChoiceCtrl_Impl::PaintEntry(), SvTreeListBox::PaintEntry1(), and MenuFloatingWindow::RenderHighlightItem().

void OutputDevice::DrawRect ( const tools::Rectangle rRect,
sal_uLong  nHorzRount,
sal_uLong  nVertRound 
)
void OutputDevice::DrawShadowBitmapEx ( const BitmapEx rBitmapEx,
::Color  aShadowColor 
)
void OutputDevice::DrawStretchText ( const Point rStartPt,
sal_uLong  nWidth,
const OUString &  rStr,
sal_Int32  nIndex = 0,
sal_Int32  nLen = -1 
)
void OutputDevice::DrawText ( const Point rStartPt,
const OUString &  rStr,
sal_Int32  nIndex = 0,
sal_Int32  nLen = -1,
MetricVector pVector = nullptr,
OUString *  pDisplayText = nullptr,
const SalLayoutGlyphs pLayoutCache = nullptr 
)
void OutputDevice::DrawText ( const tools::Rectangle rRect,
const OUString &  rStr,
DrawTextFlags  nStyle = DrawTextFlags::NONE,
MetricVector pVector = nullptr,
OUString *  pDisplayText = nullptr,
vcl::ITextLayout _pTextLayout = nullptr 
)
void OutputDevice::DrawTextArray ( const Point rStartPt,
const OUString &  rStr,
const long *  pDXAry,
sal_Int32  nIndex = 0,
sal_Int32  nLen = -1,
SalLayoutFlags  flags = SalLayoutFlags::NONE,
const SalLayoutGlyphs pLayoutCache = nullptr 
)
void OutputDevice::DrawTextLine ( const Point rPos,
long  nWidth,
FontStrikeout  eStrikeout,
FontLineStyle  eUnderline,
FontLineStyle  eOverline,
bool  bUnderlineAbove = false 
)
bool OutputDevice::DrawTransformBitmapExDirect ( const basegfx::B2DHomMatrix aFullTransform,
const BitmapEx rBitmapEx 
)
protectedvirtual

Transform and draw a bitmap directly.

Parameters
aFullTransformThe B2DHomMatrix used for the transformation
rBitmapExReference to the bitmap to be transformed and drawn
Returns
true if it was able to draw the bitmap, false if not

Reimplemented in Printer.

Definition at line 1041 of file outdev/bitmap.cxx.

References SalGraphics::DrawTransformedBitmap(), BitmapEx::GetAlpha(), BitmapEx::GetBitmap(), BitmapEx::GetMask(), Bitmap::ImplGetSalBitmap(), is_double_buffered_window(), BitmapEx::IsAlpha(), BitmapEx::IsTransparent(), and mpGraphics.

Referenced by DrawTransformedBitmapEx().

void OutputDevice::DrawTransformedBitmapEx ( const basegfx::B2DHomMatrix rTransformation,
const BitmapEx rBitmapEx 
)
void OutputDevice::DrawTransparent ( const tools::PolyPolygon rPolyPoly,
sal_uInt16  nTransparencePercent 
)
void OutputDevice::DrawTransparent ( const basegfx::B2DHomMatrix rObjectTransform,
const basegfx::B2DPolyPolygon rB2DPolyPoly,
double  fTransparency 
)
void OutputDevice::DrawTransparent ( const GDIMetaFile rMtf,
const Point rPos,
const Size rSize,
const Gradient rTransparenceGradient 
)
bool OutputDevice::DrawTransparentNatively ( const tools::PolyPolygon rPolyPoly,
sal_uInt16  nTransparencePercent 
)
private
void OutputDevice::DrawWallpaper ( const tools::Rectangle rRect,
const Wallpaper rWallpaper 
)
void OutputDevice::DrawWallpaper ( long  nX,
long  nY,
long  nWidth,
long  nHeight,
const Wallpaper rWallpaper 
)
private
void OutputDevice::DrawWaveLine ( const Point rStartPos,
const Point rEndPos,
long  nLineWidth = 1 
)
void OutputDevice::EmulateDrawTransparent ( const tools::PolyPolygon rPolyPoly,
sal_uInt16  nTransparencePercent 
)
protectedvirtual
void OutputDevice::EnableMapMode ( bool  bEnable = true)
void OutputDevice::EnableOutput ( bool  bEnable = true)
void OutputDevice::EnableRTL ( bool  bEnable = true)
virtual
void OutputDevice::EndFontSubstitution ( )
static
void OutputDevice::Erase ( )
void OutputDevice::Erase ( const tools::Rectangle rRect)
inline

Definition at line 950 of file outdev.hxx.

References DrawWallpaper(), and GetBackground().

virtual void OutputDevice::Flush ( void  )
inlinevirtual

Reimplemented in vcl::Window.

Definition at line 542 of file outdev.hxx.

vcl::Region OutputDevice::GetActiveClipRegion ( ) const
virtual

Reimplemented in vcl::Window.

Definition at line 194 of file outdev/clipping.cxx.

References GetClipRegion().

Referenced by lcl_canPaint(), and TransformAndReduceBitmapExToTargetRange().

AntialiasingFlags OutputDevice::GetAntialiasing ( ) const
inline
const Wallpaper& OutputDevice::GetBackground ( ) const
inline
Color OutputDevice::GetBackgroundColor ( ) const
virtual

Reimplemented in vcl::Window, and Printer.

Definition at line 37 of file wallpaper.cxx.

References GetBackground(), and Wallpaper::GetColor().

sal_uInt16 OutputDevice::GetBitCount ( ) const
virtual
Bitmap OutputDevice::GetBitmap ( const Point rSrcPt,
const Size rSize 
) const
virtual
BitmapEx OutputDevice::GetBitmapEx ( const Point rSrcPt,
const Size rSize 
) const

Query extended bitmap (with alpha channel, if available).

Definition at line 470 of file outdev/bitmap.cxx.

References Bitmap::Convert(), GetBitmap(), mpAlphaVDev, and N8BitGreys.

Referenced by DrawOutDev().

void OutputDevice::GetCaretPositions ( const OUString &  rStr,
long *  pCaretXArray,
sal_Int32  nIndex,
sal_Int32  nLen,
const SalLayoutGlyphs pGlyphs = nullptr 
) const
vcl::Region OutputDevice::GetClipRegion ( ) const
GDIMetaFile* OutputDevice::GetConnectMetaFile ( ) const
inline
long OutputDevice::GetCtrlTextWidth ( const OUString &  rStr,
const SalLayoutGlyphs pLayoutCache = nullptr 
) const
vcl::Font OutputDevice::GetDefaultFont ( DefaultFontType  nType,
LanguageType  eLang,
GetDefaultFontFlags  nFlags,
const OutputDevice pOutDev = nullptr 
)
static
FontMetric OutputDevice::GetDevFont ( int  nDevFontIndex) const
int OutputDevice::GetDevFontCount ( ) const

Definition at line 71 of file outdev/font.cxx.

References mpDeviceFontList, and mxFontCollection.

Referenced by GetDevFont().

Size OutputDevice::GetDevFontSize ( const vcl::Font rFont,
int  nSizeIndex 
) const
int OutputDevice::GetDevFontSizeCount ( const vcl::Font rFont) const
LanguageType OutputDevice::GetDigitLanguage ( ) const
inline

Definition at line 601 of file outdev.hxx.

References meTextLanguage.

Referenced by vcl::Window::ImplPaintToDevice(), PaintBufferGuard::PaintBufferGuard(), and Push().

Bitmap OutputDevice::GetDownsampledBitmap ( const Size rDstSz,
const Point rSrcPt,
const Size rSrcSz,
const Bitmap rBmp,
long  nMaxBmpDPIX,
long  nMaxBmpDPIY 
)
private

Retrieve downsampled and cropped bitmap.

Attention:
This method ignores negative rDstSz values, thus mirroring must happen outside this method (e.g. in DrawBitmap)

Definition at line 175 of file outdev/bitmap.cxx.

References Bitmap::Crop(), FRound(), Bitmap::GetSizePixel(), Size::Height(), Bitmap::IsEmpty(), LogicToPixel(), MapMode, PixelToLogic(), Bitmap::Scale(), Bitmap::SetEmpty(), Size::setHeight(), Size::setWidth(), and Size::Width().

Referenced by RemoveTransparenciesFromMetaFile().

float OutputDevice::GetDPIScaleFactor ( ) const
inline
sal_Int32 OutputDevice::GetDPIScalePercentage ( ) const
inline

Definition at line 517 of file outdev.hxx.

References mnDPIScalePercentage.

Referenced by ImageRequestParameters::scalePercentage().

SAL_DLLPRIVATE sal_Int32 OutputDevice::GetDPIX ( ) const
inline
SAL_DLLPRIVATE sal_Int32 OutputDevice::GetDPIY ( ) const
inline

Get the output device's DPI y-axis value.

Returns
y-axis DPI value

Definition at line 507 of file outdev.hxx.

References mnDPIY.

Referenced by vcl::PDFWriterImpl::drawPixel(), ImplFontMetricData::ImplInitTextLineSize(), vcl::Window::ImplPaintToDevice(), Application::SetSettings(), and vcl::PDFWriterImpl::writeReferenceXObject().

DrawModeFlags OutputDevice::GetDrawMode ( ) const
inline
OUString OutputDevice::GetEllipsisString ( const OUString &  rStr,
long  nMaxWidth,
DrawTextFlags  nStyle = DrawTextFlags::EndEllipsis 
) const

Definition at line 1919 of file text.cxx.

References ImplGetEllipsisString().

Referenced by vcl::PDFWriterImpl::drawText(), and getShortenedString().

SAL_DLLPRIVATE long OutputDevice::GetEmphasisAscent ( ) const
inlineprotected

Definition at line 1286 of file outdev.hxx.

References mnEmphasisAscent.

Referenced by vcl::PDFWriterImpl::drawLayout().

SAL_DLLPRIVATE long OutputDevice::GetEmphasisDescent ( ) const
inlineprotected

Definition at line 1287 of file outdev.hxx.

References mnEmphasisDescent.

Referenced by vcl::PDFWriterImpl::drawLayout().

vcl::ExtOutDevData* OutputDevice::GetExtOutDevData ( ) const
inline

Definition at line 532 of file outdev.hxx.

References mpExtOutDevData.

Referenced by EnableNativeWidget().

std::unique_ptr< SalLayout > OutputDevice::getFallbackLayout ( LogicalFontInstance pLogicalFont,
int  nFallbackLevel,
ImplLayoutArgs rLayoutArgs 
) const
const Color& OutputDevice::GetFillColor ( ) const
inline
const vcl::Font& OutputDevice::GetFont ( ) const
inline
bool OutputDevice::GetFontCapabilities ( vcl::FontCapabilities rFontCapabilities) const

Definition at line 273 of file outdev/font.cxx.

References SalGraphics::GetFontCapabilities(), InitFont(), and mpGraphics.

bool OutputDevice::GetFontCharMap ( FontCharMapRef rxFontCharMap) const
long OutputDevice::GetFontExtLeading ( ) const
protectedvirtual

Reimplemented in VirtualDevice.

Definition at line 484 of file outdev/font.cxx.

References mpFontInstance.

Referenced by GetFontMetric().

bool OutputDevice::GetFontFeatures ( std::vector< vcl::font::Feature > &  rFontFeatures) const
const LogicalFontInstance * OutputDevice::GetFontInstance ( ) const
protected
FontMetric OutputDevice::GetFontMetric ( ) const

Definition at line 197 of file outdev/font.cxx.

References ImplFontMetricData::GetAscent(), ImplFontMetricData::GetBulletOffset(), ImplFontMetricData::GetDescent(), vcl::Font::GetFamilyName(), FontAttributes::GetFamilyType(), GetFontExtLeading(), ImplFontMetricData::GetInternalLeading(), FontAttributes::GetItalic(), ImplFontMetricData::GetOrientation(), FontAttributes::GetPitch(), FontAttributes::GetQuality(), ImplFontMetricData::GetSlant(), FontAttributes::GetStyleName(), FontAttributes::GetWeight(), ImplFontMetricData::GetWidth(), FontAttributes::GetWidthType(), ImplDevicePixelToLogicHeight(), ImplNewFont(), ImplFontMetricData::IsFullstopCentered(), FontAttributes::IsSymbolFont(), maFont, mnEmphasisAscent, mnEmphasisDescent, LogicalFontInstance::mnOwnOrientation, mpFontInstance, LogicalFontInstance::mxFontMetric, PixelToLogic(), SAL_INFO, vcl::Font::SetAlignment(), FontMetric::SetAscent(), FontMetric::SetBulletOffset(), vcl::Font::SetCharSet(), FontMetric::SetDescent(), FontMetric::SetExternalLeading(), vcl::Font::SetFamily(), vcl::Font::SetFamilyName(), vcl::Font::SetFontSize(), FontMetric::SetFullstopCenteredFlag(), FontMetric::SetInternalLeading(), vcl::Font::SetItalic(), FontMetric::SetLineHeight(), vcl::Font::SetOrientation(), vcl::Font::SetPitch(), vcl::Font::SetQuality(), FontMetric::SetSlant(), vcl::Font::SetStyleName(), vcl::Font::SetWeight(), and vcl::Font::SetWidthType().

Referenced by DrawCtrlText(), vcl::PDFWriterImpl::drawLayout(), vcl::PDFWriterImpl::drawStrikeoutChar(), vcl::PDFWriterImpl::drawVerticalGlyphs(), GetFontMetric(), and ImplDrawText().

FontMetric OutputDevice::GetFontMetric ( const vcl::Font rFont) const

Definition at line 246 of file outdev/font.cxx.

References GetFont(), GetFontMetric(), and SetFont().

sal_uInt32 OutputDevice::GetGCStackDepth ( ) const

Definition at line 223 of file outdevstate.cxx.

References maOutDevStateStack.

bool OutputDevice::GetGlyphBoundRects ( const Point rOrigin,
const OUString &  rStr,
int  nIndex,
int  nLen,
MetricVector rVector 
)
long OutputDevice::GetGradientStepCount ( long  nMinRect)
protectedvirtual

Reimplemented in Printer.

Definition at line 936 of file outdev/gradient.cxx.

Referenced by GetGradientSteps().

long OutputDevice::GetGradientSteps ( const Gradient rGradient,
const tools::Rectangle rRect,
bool  bMtf,
bool  bComplex = false 
)
private
SalGraphics const * OutputDevice::GetGraphics ( ) const

Get the graphic context that the output device uses to draw on.

If no graphics device exists, then initialize it.

Returns
SalGraphics instance.

Definition at line 198 of file outdev.cxx.

References AcquireGraphics(), DBG_TESTSOLARMUTEX, mpGraphics, and SAL_WARN.

Referenced by Bitmap::CreateDisplayBitmap(), vcl::PDFWriterImpl::drawLayout(), vcl::PDFWriterImpl::emitFonts(), vcl::PDFWriterImpl::emitSystemFont(), EmbeddedFontsHelper::fontFileUrl(), OpenGLContext::getVCLContext(), and ImplGetDefaultContextWindow().

SalGraphics * OutputDevice::GetGraphics ( )

Definition at line 188 of file outdev.cxx.

References AcquireGraphics(), DBG_TESTSOLARMUTEX, mpGraphics, and SAL_WARN.

basegfx::B2DHomMatrix OutputDevice::GetInverseViewTransformation ( ) const

Definition at line 881 of file map.cxx.

References GetViewTransformation(), mbMap, and mpOutDevData.

Referenced by PixelToLogic().

basegfx::B2DHomMatrix OutputDevice::GetInverseViewTransformation ( const MapMode rMapMode) const

Definition at line 924 of file map.cxx.

References GetViewTransformation(), and basegfx::B2DHomMatrix::invert().

ComplexTextLayoutFlags OutputDevice::GetLayoutMode ( ) const
inline
const Color& OutputDevice::GetLineColor ( ) const
inline
const MapMode& OutputDevice::GetMapMode ( ) const
inline

Definition at line 1674 of file outdev.hxx.

References maMapMode.

Referenced by SvxIconChoiceCtrl_Impl::AdjustScrollBars(), SvImpLBox::AdjustScrollBars(), SvxIconChoiceCtrl_Impl::CheckHorScrollBar(), SvxIconChoiceCtrl_Impl::CheckVerScrollBar(), SvImpLBox::Clear(), vcl::PDFExtOutDevData::CreateDest(), vcl::PDFExtOutDevData::CreateLink(), vcl::PDFExtOutDevData::CreateNamedDest(), vcl::PDFExtOutDevData::CreateNote(), vcl::PDFExtOutDevData::CreateScreen(), vcl::PDFExtOutDevData::DescribeRegisteredDest(), GraphicObject::DrawTiled(), DrawTransformedBitmapEx(), DrawTransparent(), SvTreeListBox::EditItemText(), SvImpLBox::EntryReallyHit(), SvImpLBox::GetClipRegionRect(), SvtIconChoiceCtrl::GetEntry(), SvTreeListBox::GetFocusRect(), SvTreeListBox::GetItem_Impl(), SvxIconChoiceCtrl_Impl::GetOutputRect(), SvImpLBox::GetVisibleArea(), SvTreeListBox::GetXOffset(), FloatingWindow::ImplCalcPos(), GraphicObject::ImplDrawTiled(), vcl::Window::ImplInitResolutionSettings(), vcl::Window::ImplPaintToDevice(), GDIMetaFile::ImplPlayWithRenderer(), VirtualDevice::ImplSetOutputSizePixel(), SvImpLBox::IsNodeButton(), SvImpLBox::KeyLeftRight(), SvxIconChoiceCtrl_Impl::MakeVisible(), ScrollBar::MouseButtonDown(), SvxIconChoiceCtrl_Impl::Paint(), PaintBufferGuard::PaintBufferGuard(), SvTreeListBox::PaintEntry1(), vcl::PDFWriterImpl::playMetafile(), vcl::ReferenceDeviceTextLayout::ReferenceDeviceTextLayout(), vcl::PDFWriterImpl::replaceFont(), SvxIconChoiceCtrl_Impl::RequestHelp(), vcl::Window::SaveBackground(), SvxIconChoiceCtrl_Impl::Scroll(), SvImpLBox::SetMostRight(), SvxIconChoiceCtrl_Impl::SetOrigin(), VirtualDevice::SetOutputSizePixelScaleOffsetAndBuffer(), Application::SetSettings(), SvImpLBox::ShowVerSBar(), vcl::OldStylePrintAdaptor::StartPage(), SvxIconChoiceCtrl_Impl::ToDocPos(), ScrollBar::Tracking(), and PaintBufferGuard::~PaintBufferGuard().

long OutputDevice::GetMinKashida ( ) const

Definition at line 1381 of file outdev/font.cxx.

References ImplDevicePixelToLogicWidth(), ImplNewFont(), and mpFontInstance.

bool OutputDevice::GetNativeControlRegion ( ControlType  nType,
ControlPart  nPart,
const tools::Rectangle rControlRegion,
ControlState  nState,
const ImplControlValue aValue,
tools::Rectangle rNativeBoundingRegion,
tools::Rectangle rNativeContentRegion 
) const
css::uno::Any OutputDevice::GetNativeSurfaceHandle ( cairo::SurfaceSharedPtr rSurface,
const basegfx::B2ISize rSize 
) const

Return native handle for underlying surface.

OUString OutputDevice::GetNonMnemonicString ( const OUString &  rStr,
sal_Int32 &  rMnemonicPos 
)
static
static OUString OutputDevice::GetNonMnemonicString ( const OUString &  rStr)
inlinestatic

Definition at line 1093 of file outdev.hxx.

References GetNonMnemonicString().

OutDevType OutputDevice::GetOutDevType ( ) const
inline
OutDevViewType OutputDevice::GetOutDevViewType ( ) const
inline

Definition at line 614 of file outdev.hxx.

References meOutDevViewType.

long OutputDevice::GetOutOffXPixel ( ) const
inline
long OutputDevice::GetOutOffYPixel ( ) const
inline
long OutputDevice::GetOutputHeightPixel ( ) const
inline
Size OutputDevice::GetOutputSize ( ) const
inline
Size OutputDevice::GetOutputSizePixel ( ) const
inline

Definition at line 441 of file outdev.hxx.

Referenced by vcl::BufferDevice::BufferDevice(), SvxIconChoiceCtrl_Impl::Clear(), TextWindow::Command(), Edit::Command(), SystemWindow::createScreenshot(), ImplBorderWindow::DataChanged(), DrawBitmapWallpaper(), DrawDeviceAlphaBitmap(), ImplListBoxWindow::DrawEntry(), ImplWin::DrawEntry(), vcl::ORoadmap::DrawHeadline(), DrawTransparent(), EmulateDrawTransparent(), SpinField::EndDropDown(), vcl::Window::Erase(), SpinField::EventNotify(), GroupBox::FillLayoutData(), FixedText::FillLayoutData(), ImplListBoxWindow::GetDisplayLineCount(), ListBox::GetIndexForPoint(), Edit::GetMaxVisChars(), ImpVclMEdit::GetMaxVisColumnsAndLines(), ListBox::GetMaxVisColumnsAndLines(), ComboBox::getMaxWidthScrollBarAndDownButton(), IcnGridMap_Impl::GetMinMapSize(), GetOutputSize(), DockingWindow::GetOutputSizePixel(), SvxIconChoiceCtrl_Impl::HideDDIcon(), MenuBarWindow::HighlightItem(), ImpVclMEdit::ImpInitScrollBars(), Edit::ImplAlign(), Slider::ImplCalc(), ScrollBar::ImplCalc(), SpinField::ImplCalcButtonAreas(), MenuFloatingWindow::ImplCalcClipRegion(), ImplListBoxWindow::ImplCalcMetrics(), ImplCallCommand(), TabControl::ImplChangeTabPage(), ImplListBox::ImplCheckScrollBars(), Edit::ImplClearBackground(), MenuBarWindow::ImplCreatePopup(), MenuFloatingWindow::ImplCursorUpDown(), ScrollBar::ImplDoMouseAction(), ImplListBoxWindow::ImplDoPaint(), Slider::ImplDraw(), FixedLine::ImplDraw(), Calendar::ImplDraw(), CheckBox::ImplDrawCheckBox(), ToolBox::ImplDrawGrip(), ScrollBar::ImplDrawNative(), ProgressBar::ImplDrawProgress(), PushButton::ImplDrawPushButton(), RadioButton::ImplDrawRadioButton(), MenuFloatingWindow::ImplDrawScroller(), Menu::ImplFillLayoutData(), ScrollBar::ImplFindPartRect(), Calendar::ImplFormat(), ToolBox::ImplGetDragWidth(), MenuFloatingWindow::ImplGetItemRect(), MenuBarWindow::ImplGetItemRect(), TabControl::ImplGetTabRect(), Edit::ImplGetTextYPosition(), ImplGetTopDockingAreaHeight(), ImplHandleResize(), MenuFloatingWindow::ImplHighlightItem(), PushButton::ImplHitTestPushButton(), ImplListBox::ImplInitScrollBars(), FixedHyperlink::ImplIsOverText(), Slider::ImplIsPageDown(), Slider::ImplIsPageUp(), ImplMouseAutoPos(), SystemWindow::ImplMoveToScreen(), ImplListBoxWindow::ImplPaint(), Edit::ImplPaintBorder(), vcl::Window::ImplPaintToDevice(), TabDialog::ImplPosControls(), vcl::RoadmapWizard::ImplPosCtrls(), vcl::RoadmapWizard::ImplPosTabPage(), Edit::ImplRepaint(), ImplListBox::ImplResizeControls(), MenuFloatingWindow::ImplScroll(), Button::ImplSetFocusRect(), VirtualDevice::ImplSetOutputSizePixel(), Edit::ImplShowCursor(), ImplDockingWindowWrapper::ImplStartDocking(), SplitWindow::ImplStartSplit(), vcl::Window::ImplTestMousePointerSet(), ImplWheelWindow::ImplWheelWindow(), ImpVclMEdit::ImpUpdateSrollBarVis(), vcl::RoadmapImpl::initItemSize(), SvxIconChoiceCtrl_Impl::InitScrollBarBox(), ImplBorderWindow::InitView(), VirtualDevice::InnerImplSetOutputSizePixel(), ImplBorderWindow::InvalidateBorder(), SpinField::MouseButtonDown(), ScrollBar::MouseButtonDown(), ImplStdBorderWindowView::MouseButtonDown(), MenuFloatingWindow::MouseButtonUp(), ImplListBoxWindow::MouseMove(), ImpVclMEdit::Notify(), vcl::AboutDialog::Paint(), TabPage::Paint(), ImageControl::Paint(), HelpTextWindow::Paint(), DockingAreaWindow::Paint(), GroupBox::Paint(), FixedText::Paint(), MenuFloatingWindow::Paint(), vcl::ORoadmap::Paint(), MenuBarWindow::Paint(), FixedBitmap::Paint(), FixedImage::Paint(), ImplListBoxWindow::Paint(), GDIMetaFile::Play(), PushButton::PreNotify(), RemoveTransparenciesFromMetaFile(), MenuFloatingWindow::RenderHighlightItem(), SvxIconChoiceCtrl_Impl::ResetVirtSize(), IconView::Resize(), SpinField::Resize(), ComboBox::Resize(), SpinButton::Resize(), ImpVclMEdit::Resize(), TabControl::Resize(), StatusBar::Resize(), MenuBarWindow::Resize(), ListBox::Resize(), ImplBorderWindow::Resize(), ImplListBoxWindow::Resize(), HeaderBar::Resize(), SvxIconChoiceCtrl_Impl::Resize(), ImplWin::Resize(), VclDrawingArea::Resize(), SystemWindow::RollUp(), ImplListBoxWindow::ScrollHorz(), ImplBorderWindow::SetBorderStyle(), ImplBorderWindow::SetCloseButton(), ImplBorderWindow::SetDockButton(), ImplBorderWindow::SetHideButton(), ImplBorderWindow::SetMenuButton(), TabPage::SetPosPixel(), TabControl::SetPosPixel(), VclContainer::SetPosSizePixel(), ImplListBoxFloatingWindow::setPosSizePixel(), FloatingWindow::SetTitleType(), vcl::Window::Show(), PushButton::ShowFocus(), ImplListBoxFloatingWindow::StartFloat(), ImplDockingWindowWrapper::Tracking(), ImplListBoxWindow::Tracking(), ImplStdBorderWindowView::Tracking(), TransformAndReduceBitmapExToTargetRange(), and vcl::BufferDevice::~BufferDevice().

long OutputDevice::GetOutputWidthPixel ( ) const
inline
const Color& OutputDevice::GetOverlineColor ( ) const
inline
Color OutputDevice::GetPixel ( const Point rPt) const
Size OutputDevice::GetPixelOffset ( ) const
inline

Get the offset in pixel.

See also
OutputDevice::SetPixelOffset for details
Returns
the current offset in pixel

Definition at line 1714 of file outdev.hxx.

Referenced by GDIMetaFile::Play().

RasterOp OutputDevice::GetRasterOp ( ) const
inline
Color OutputDevice::GetReadableFontColor ( const Color rFontColor,
const Color rBgColor 
) const
virtual

Reimplemented in Printer.

Definition at line 27 of file wallpaper.cxx.

References COL_BLACK(), COL_WHITE(), Color::IsBright(), and Color::IsDark().

const Point& OutputDevice::GetRefPoint ( ) const
inline
const AllSettings& OutputDevice::GetSettings ( ) const
inline

Definition at line 420 of file outdev.hxx.

References mxSettings.

Referenced by ComboBox::AdaptDropDownLineCountToMaximum(), ListBox::AdaptDropDownLineCountToMaximum(), DockingAreaWindow::ApplySettings(), HelpTextWindow::ApplySettings(), vcl::HyperLabel::ApplySettings(), Dialog::ApplySettings(), vcl::ORoadmap::ApplySettings(), MenuBarWindow::ApplySettings(), VclMultiLineEdit::ApplySettings(), MenuFloatingWindow::ApplySettings(), Control::ApplySettings(), StatusBar::ApplySettings(), FloatingWindow::ApplySettings(), ScrollBarBox::ApplySettings(), Edit::ApplySettings(), Calendar::ApplySettings(), HeaderBar::ApplySettings(), ToolBox::ApplySettings(), ImplListBoxWindow::ApplySettings(), SvTreeListBox::ApplySettings(), ImplWin::ApplySettings(), ComboBox::CalcBlockSize(), ListBox::CalcBlockSize(), ImplListBoxFloatingWindow::CalcFloatSize(), ListBox::CalcMinimumSize(), SpinField::CalcMinimumSizeForText(), SpinField::CalcSize(), ListBox::CalcSubEditSize(), vcl::Window::CalcTitleWidth(), MenuFloatingWindow::ChangeHighlightItem(), vcl::HyperLabel::DataChanged(), ComboBox::DataChanged(), vcl::ORoadmap::DataChanged(), ListBox::DataChanged(), NumericField::DataChanged(), MetricField::DataChanged(), CurrencyField::DataChanged(), DateField::DataChanged(), TimeField::DataChanged(), NumericBox::DataChanged(), MetricBox::DataChanged(), CurrencyBox::DataChanged(), DateBox::DataChanged(), TimeBox::DataChanged(), SystemWindow::DoInitialLayout(), DockingWindow::DoInitialLayout(), TabPage::Draw(), SpinField::Draw(), ComboBox::Draw(), SpinButton::Draw(), Image::Draw(), ScrollBar::Draw(), PushButton::Draw(), ListBox::Draw(), VclMultiLineEdit::Draw(), Edit::Draw(), HeaderBar::Draw(), DrawCtrlText(), DecorationView::DrawFrame(), DecorationView::DrawHandle(), DrawHatch(), vcl::ORoadmap::DrawHeadline(), DecorationView::DrawHighlightFrame(), SvImpLBox::DrawNet(), vcl::RenderTools::DrawSelectionBackground(), vcl::Window::DrawSelectionBackground(), DecorationView::DrawSeparator(), DecorationView::DrawSymbol(), ImplStdBorderWindowView::DrawWindow(), MenuFloatingWindow::EnableScrollMenu(), ComboBox::EventNotify(), SpinField::EventNotify(), ImplEntryList::FindMatchingEntry(), TextWindow::GetFocus(), ScrollBar::GetFocus(), Edit::GetFocus(), FormatterBase::GetLanguageTag(), FormatterBase::GetLocale(), ComboBox::getMaxWidthScrollBarAndDownButton(), ScrollBar::GetOptimalSize(), SvTreeListBox::GetOptimalSize(), GetSingleColorGradientFill(), HelpTextWindow::HelpTextWindow(), MenuBarWindow::HighlightItem(), ImplAddNWFSeparator(), ScrollBar::ImplCalc(), ToolBox::ImplCalcBreaks(), SpinField::ImplCalcButtonAreas(), Menu::ImplCalcSize(), ImplChangeTipTimeout(), MenuFloatingWindow::ImplCursorUpDown(), Edit::ImplDelete(), vcl::Cursor::ImplDoShow(), GroupBox::ImplDraw(), FixedText::ImplDraw(), Slider::ImplDraw(), ScrollBar::ImplDraw(), FixedLine::ImplDraw(), Calendar::ImplDraw(), ImplWin::ImplDraw(), SplitWindow::ImplDrawBorder(), ToolBox::ImplDrawBorder(), SplitWindow::ImplDrawBorderLine(), ImplDrawBrdWinSymbol(), ImplDrawBrdWinSymbolButton(), CheckBox::ImplDrawCheckBoxState(), ToolBox::ImplDrawConstantBackground(), Calendar::ImplDrawDate(), ImplDrawDropdownArrow(), ToolBox::ImplDrawFloatwinBorder(), Control::ImplDrawFrame(), ToolBox::ImplDrawGradientBackground(), SplitWindow::ImplDrawGrip(), ToolBox::ImplDrawGrip(), TabControl::ImplDrawItem(), ToolBox::ImplDrawItem(), HeaderBar::ImplDrawItem(), ImplDrawModeToColor(), ScrollBar::ImplDrawNative(), PushButton::ImplDrawPushButtonContent(), PushButton::ImplDrawPushButtonFrame(), RadioButton::ImplDrawRadioButtonState(), MenuFloatingWindow::ImplDrawScroller(), ToolBox::ImplDrawSeparator(), Calendar::ImplDrawSpin(), ImplDrawSplit(), ImplDrawText(), ImplDrawUpDownButtons(), ToolBox::ImplErase(), CheckBox::ImplGetCheckImageSize(), RadioButton::ImplGetRadioImageSize(), PushButton::ImplGetTextStyle(), ImplHandleExtTextInputPos(), ImplHandleKey(), Edit::ImplHandleKeyEvent(), ImplHandleMouseEvent(), Splitter::ImplInit(), ScrollBar::ImplInit(), ScrollBarBox::ImplInit(), vcl::Window::ImplInit(), Splitter::ImplInitHorVer(), Dialog::ImplInitSettings(), ProgressBar::ImplInitSettings(), SplitWindow::ImplInitSettings(), VclMultiLineEdit::ImplInitSettings(), FloatingWindow::ImplInitSettings(), Calendar::ImplInitSettings(), ToolBox::ImplInitSettings(), HeaderBar::ImplInitSettings(), DockingWindow::ImplInitSettings(), ScrollBar::ImplInitStyle(), MenuBarWindow::ImplInitStyleSettings(), ImplBorderWindowView::ImplInitTitle(), ImplIsMnemonicCtrl(), ImplListBoxWindow::ImplListBoxWindow(), ImplMouseAutoPos(), ImplNewFont(), Menu::ImplPaint(), ImplListBoxWindow::ImplPaint(), ImplPaintCheckBackground(), Menu::ImplPaintMenuTitle(), vcl::Cursor::ImplPrepForDraw(), Edit::ImplRepaint(), ImplListBox::ImplResizeControls(), TabControl::ImplShowFocus(), Splitter::ImplSplitterActive(), DockingWindow::ImplStartDocking(), SplitWindow::ImplStartSplit(), ImplWin::ImplWin(), TextEngine::ImpPaint(), ImplStdBorderWindowView::Init(), SvxIconChoiceCtrl_Impl::InitSettings(), SvTreeListBox::InitSettings(), vcl::Cursor::LOKNotify(), MenuFloatingWindow::MenuFloatingWindow(), ScrollBar::MouseButtonDown(), Edit::MouseButtonDown(), TextView::MouseButtonUp(), Edit::MouseButtonUp(), SpinField::Paint(), DockingAreaWindow::Paint(), vcl::PrintDialog::PrintPreviewWindow::Paint(), MenuFloatingWindow::Paint(), vcl::PrintDialog::ShowNupOrderWindow::Paint(), TabControl::Paint(), StatusBar::Paint(), MenuBarWindow::Paint(), HeaderBar::Paint(), PaintBufferGuard::PaintBufferGuard(), IconView::PaintEntry(), SvxIconChoiceCtrl_Impl::PaintEntry(), SvTreeListBox::PaintEntry1(), ListBox::PreNotify(), MenuFloatingWindow::RenderHighlightItem(), ImpVclMEdit::Resize(), ListBox::Resize(), ImplBorderWindow::Resize(), vcl::ORoadmap::SelectRoadmapItemByID(), Dialog::set_action_area(), SvTreeListBox::SetAlternatingRowColors(), SvtIconChoiceCtrl::SetBackground(), SvLBoxButtonData::SetDefaultImages(), SetFillColor(), SetFont(), MessageDialog::SetMessagesWidths(), SetOverlineColor(), FormattedField::SetTextFormatted(), SetTextLineColor(), Dialog::settingOptimalLayoutSize(), TabPage::StateChanged(), TextView::TextView(), TextWindow::TextWindow(), NotebookBar::UpdateBackground(), NotebookBar::UpdateDefaultSettings(), and NotebookBar::UpdatePersonaSettings().

Color OutputDevice::GetSingleColorGradientFill ( )
private
SystemFontData OutputDevice::GetSysFontData ( int  nFallbacklevel) const

Retrieve detailed font information in platform independent structure.

Parameters
nFallbacklevelFallback font level (0 = best matching font)
Returns
SystemFontData
SystemGraphicsData OutputDevice::GetSystemGfxData ( ) const

Definition at line 221 of file outdev.cxx.

References AcquireGraphics(), SalGraphics::GetGraphicsData(), and mpGraphics.

Referenced by GetSystemGfxDataAny().

css::uno::Any OutputDevice::GetSystemGfxDataAny ( ) const

Definition at line 269 of file outdev.cxx.

References aSeq, GetSystemGfxData(), and SystemGraphicsData::nSize.

Referenced by vcl::Window::ImplGetCanvas().

SystemTextLayoutData OutputDevice::GetSysTextLayoutData ( const Point rStartPt,
const OUString &  rStr,
sal_Int32  nIndex,
sal_Int32  nLen,
const long *  pDXAry 
) const

OutputDevice::GetSysTextLayoutData.

Parameters
rStartPtStart point of the text
rStrText string that will be transformed into layout of glyphs
nIndexPosition in the string from where layout will be done
nLenLength of the string
pDXAryCustom layout adjustment data

Export finalized glyph layout data as platform independent SystemTextLayoutData (see vcl/inc/vcl/sysdata.hxx)

Only parameters rStartPt and rStr are mandatory, the rest is optional (default values will be used)

Returns
SystemTextLayoutData

Definition at line 2262 of file text.cxx.

References GDIMetaFile::AddAction(), SystemGlyphData::fallbacklevel, GlyphItem::glyphId(), ImplLayout(), SystemGlyphData::index, IsDeviceOutputNecessary(), mpMetaFile, SystemTextLayoutData::orientation, SystemTextLayoutData::rGlyphData, Point::X(), SystemGlyphData::x, Point::Y(), and SystemGlyphData::y.

TextAlign OutputDevice::GetTextAlign ( ) const
inline
long OutputDevice::GetTextArray ( const OUString &  rStr,
long *  pDXAry,
sal_Int32  nIndex = 0,
sal_Int32  nLen = -1,
vcl::TextLayoutCache const *  pLayoutCache = nullptr,
SalLayoutGlyphs const *const  pLayoutCache = nullptr 
) const
bool OutputDevice::GetTextBoundRect ( tools::Rectangle rRect,
const OUString &  rStr,
sal_Int32  nBase = 0,
sal_Int32  nIndex = 0,
sal_Int32  nLen = -1,
sal_uLong  nLayoutWidth = 0,
const long *  pDXArray = nullptr,
const SalLayoutGlyphs pGlyphs = nullptr 
) const

Return the exact bounding rectangle of rStr.

The text is then drawn exactly from rRect.TopLeft() to rRect.BottomRight(), don't assume that rRect.TopLeft() is [0, 0].

Please note that you don't always want to use GetTextBoundRect(); in many cases you actually want to use GetTextHeight(), because GetTextBoundRect() gives you the exact bounding rectangle regardless what is the baseline of the text.

Code snippet to get just exactly the text (no filling around that) as a bitmap via a VirtualDevice (regardless what is the baseline):

VirtualDevice aDevice; vcl::Font aFont = aDevice.GetFont(); aFont.SetSize(Size(0, 96)); aFont.SetColor(COL_BLACK); aDevice.SetFont(aFont); aDevice.Erase();

tools::Rectangle aRect; aDevice.GetTextBoundRect(aRect, aText); aDevice.SetOutputSize(Size(aRect.BottomRight().X() + 1, aRect.BottomRight().Y() + 1)); aDevice.SetBackground(Wallpaper(COL_TRANSPARENT)); aDevice.DrawText(Point(0,0), aText);

exactly only the text, regardless of the baseline Bitmap aBitmap(aDevice.GetBitmap(aRect.TopLeft(), aRect.GetSize()));

Code snippet to get the text as a bitmap via a Virtual device that contains even the filling so that the baseline is always preserved (ie. the text will not jump up and down according to whether it contains 'y' or not etc.)

VirtualDevice aDevice;

  • the appropriate font / device setup, see above
      aDevice.SetOutputSize(Size(aDevice.GetTextWidth(aText), aDevice.GetTextHeight()));
      aDevice.SetBackground(Wallpaper(COL_TRANSPARENT));
      aDevice.DrawText(Point(0,0), aText);
    

bitmap that contains even the space around the text, that means, preserves the baseline etc. Bitmap aBitmap(aDevice.GetBitmap(Point(0, 0), aDevice.GetOutputSize()));

Definition at line 2307 of file text.cxx.

References tools::Rectangle::Bottom(), ImplLayout(), tools::Rectangle::Left(), maMapRes, mbMap, ImplMapRes::mnMapOfsX, ImplMapRes::mnMapOfsY, mnTextOffX, mnTextOffY, NONE, PixelToLogic(), tools::Rectangle::Right(), tools::Rectangle::SetBottom(), tools::Rectangle::SetEmpty(), tools::Rectangle::SetLeft(), tools::Rectangle::SetRight(), tools::Rectangle::SetTop(), and tools::Rectangle::Top().

Referenced by GetGlyphBoundRects(), Menu::ImplCalcSize(), ImplFontMetricData::ImplInitFlags(), and Menu::ImplPaintMenuTitle().

sal_Int32 OutputDevice::GetTextBreak ( const OUString &  rStr,
long  nTextWidth,
sal_Int32  nIndex,
sal_Int32  nLen = -1,
long  nCharExtra = 0,
vcl::TextLayoutCache const *  pLayoutCache = nullptr,
const SalLayoutGlyphs pGlyphs = nullptr 
) const
sal_Int32 OutputDevice::GetTextBreak ( const OUString &  rStr,
long  nTextWidth,
sal_Unicode  nExtraChar,
sal_Int32 &  rExtraCharPos,
sal_Int32  nIndex,
sal_Int32  nLen,
long  nCharExtra,
vcl::TextLayoutCache const *  pLayoutCache = nullptr 
) const

Definition at line 1398 of file text.cxx.

References ImplLayout(), LogicWidthToDeviceCoordinate(), and NONE.

const Color& OutputDevice::GetTextColor ( ) const
inline
Color OutputDevice::GetTextFillColor ( ) const
long OutputDevice::GetTextHeight ( ) const

Height where any character of the current font fits; in logic coordinates.

See also GetTextBoundRect() for more explanation + code examples.

Definition at line 889 of file text.cxx.

References ImplDevicePixelToLogicHeight(), InitFont(), mbMap, mnEmphasisAscent, mnEmphasisDescent, and mpFontInstance.

Referenced by SvTreeListBox::AdjustEntryHeight(), ImpVclMEdit::CalcBlockSize(), PushButton::CalcMinimumSize(), RadioButton::CalcMinimumSize(), Edit::CalcMinimumSizeForText(), FixedText::CalcMinimumTextSize(), Edit::CalcSize(), StatusBar::CalcWindowSizePixel(), Calendar::CalcWindowSizePixel(), HeaderBar::CalcWindowSizePixel(), Edit::Command(), MessageDialog::create_message_area(), StatusBar::DataChanged(), ComboBox::Draw(), ListBox::Draw(), Edit::Draw(), VclMultiLineEdit::Draw(), vcl::ReferenceDeviceTextLayout::DrawText(), vcl::PDFWriterImpl::drawText(), StatusBar::GetItemTextPos(), ImpVclMEdit::GetMaxVisColumnsAndLines(), SvxIconChoiceCtrl_Impl::GetMinGrid(), GetTextRect(), ImpVclMEdit::ImpInitScrollBars(), ToolBox::ImplCalcItem(), ImplListBoxWindow::ImplCalcMetrics(), StatusBar::ImplCalcProgressRect(), Menu::ImplCalcSize(), FixedLine::ImplDraw(), RadioButton::ImplDraw(), Button::ImplDrawAlignedImage(), Calendar::ImplDrawDate(), TabControl::ImplDrawItem(), StatusBar::ImplDrawItem(), ToolBox::ImplDrawItem(), HeaderBar::ImplDrawItem(), PushButton::ImplDrawPushButtonContent(), StatusBar::ImplDrawText(), ImplDrawText(), Calendar::ImplFormat(), MenuFloatingWindow::ImplGetItemRect(), TabControl::ImplGetItemSize(), Edit::ImplGetTextYPosition(), MenuFloatingWindow::ImplHighlightItem(), ListBox::ImplInit(), vcl::Window::ImplInitAppFontData(), ImplBorderWindowView::ImplInitTitle(), Menu::ImplPaint(), Edit::ImplRepaint(), Edit::ImplShowCursor(), Edit::ImplShowDDCursor(), TabControl::ImplShowFocus(), SvLBoxString::InitViewData(), StatusBar::InsertItem(), MenuFloatingWindow::MouseButtonUp(), vcl::PrintDialog::PrintPreviewWindow::Paint(), vcl::PrintDialog::ShowNupOrderWindow::Paint(), SvTreeListBox::Paint(), MenuFloatingWindow::RenderHighlightItem(), StatusBar::Resize(), SvxIconChoiceCtrl_Impl::SetDefaultTextSize(), TextEngine::SetFont(), HelpTextWindow::SetHelpText(), and StatusBar::SetItemText().

bool OutputDevice::GetTextIsRTL ( const OUString &  rString,
sal_Int32  nIndex,
sal_Int32  nLen 
) const

Definition at line 1356 of file text.cxx.

References aStr, ImplLayoutArgs::GetNextPos(), and ImplPrepareLayoutArgs().

const Color& OutputDevice::GetTextLineColor ( ) const
inline
bool OutputDevice::GetTextOutline ( tools::PolyPolygon rPolyPoly,
const OUString &  rStr,
sal_Int32  nLen = -1,
sal_uLong  nLayoutWidth = 0,
const long *  pDXArray = nullptr 
) const

Definition at line 2479 of file text.cxx.

References