37 #include <com/sun/star/awt/DeviceCapability.hpp>
39 #ifdef DISABLE_DYNLOADING
45 #ifdef DISABLE_DYNLOADING
52 meOutDevType(eOutDevType),
158 SAL_WARN(
"vcl.gdi",
"OutputDevice::~OutputDevice(): OutputDevice::Push() calls != OutputDevice::Pop() calls" );
190 SAL_WARN(
"vcl.gdi",
"No mpGraphics set");
200 SAL_WARN(
"vcl.gdi",
"No mpGraphics set");
227 #if ENABLE_CAIRO_CANVAS
251 return mpGraphics->CreateSurface(*
this, x, y, width, height);
259 return mpGraphics->CreateBitmapSurface(*
this, rData, rSize);
265 return css::uno::Any();
267 return mpGraphics->GetNativeSurfaceHandle(rSurface, rSize);
270 #endif // ENABLE_CAIRO_CANVAS
275 css::uno::Sequence< sal_Int8 >
aSeq( reinterpret_cast<sal_Int8 const *>(&aSysData),
278 return css::uno::makeAny(aSeq);
331 return pWrapper ? pWrapper->
CreateGraphics(
this ) : css::uno::Reference< css::awt::XGraphics >();
354 const Point& rSrcPt,
const Size& rSrcSize )
389 if (nSrcWidth && nSrcHeight && nDestWidth && nDestHeight)
392 nSrcWidth, nSrcHeight,
394 nDestWidth, nDestHeight);
407 const Point& rSrcPt,
const Size& rSrcSize,
471 const Point& rSrcPt,
const Size& rSrcSize,
472 bool bWindowInvalidate )
495 if (nSrcWidth && nSrcHeight)
498 nSrcWidth, nSrcHeight,
500 nSrcWidth, nSrcHeight);
531 if (!pCheckedSrc->mpGraphics && !pCheckedSrc->AcquireGraphics())
533 pSrcGraphics = pCheckedSrc->mpGraphics;
536 pSrcGraphics =
nullptr;
558 return this == &rSrcDev ?
nullptr : &rSrcDev;
635 rRegion = aMirroredRegion;
695 if( !bDrawn && pSubst )
713 css::awt::DeviceInfo aInfo;
715 aInfo.Width = rDevSz.
Width();
716 aInfo.Height = rDevSz.
Height();
719 aInfo.PixelPerMeterX = aTmpSz.
Width() / 10;
720 aInfo.PixelPerMeterY = aTmpSz.
Height() / 10;
723 aInfo.Capabilities = css::awt::DeviceCapability::RASTEROPERATIONS |
724 css::awt::DeviceCapability::GETBITS;
735 aInfo.RightInset = 0;
736 aInfo.BottomInset = 0;
sal_Int32 mnDPIScalePercentage
For HiDPI displays, we want to draw elements for a percentage larger.
VclPtr< OutputDevice > mpNextGraphics
Next output device in list.
tools::Long mnTextOffX
font specific text alignment offsets in pixel units
tools::Long mnOutOffLogicX
Additional output offset in logical coordinates, applied in PixelToLogic (used by SetPixelOffset/GetP...
SAL_DLLPRIVATE bool ImplIsRecordLayout() const
tools::Long mnOutOffOrigY
Additional output pixel offset, applied in LogicToPixel (used by SetPixelOffset/GetPixelOffset) ...
OutputDevice(const OutputDevice &)=delete
virtual bool IsVirtual() const
bool SupportsCairo() const
virtual ~OutputDevice() override
void DrawBitmapEx(const Point &rDestPt, const BitmapEx &rBitmapEx)
This is an overloaded member function, provided for convenience. It differs from the above function o...
virtual bool supportsOperation(OutDevSupportType) const =0
void Union(const tools::Rectangle &rRegion)
constexpr::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
BmpMirrorFlags AdjustTwoRect(SalTwoRect &rTwoRect, const Size &rSizePix)
void CopyBits(const SalTwoRect &rPosAry, const OutputDevice &rOutDev)
tools::Long mnOutOffY
Output offset for device output in pixel (pseudo window offset within window system's frames) ...
cairo::SurfaceSharedPtr CreateSurface(const cairo::CairoSurfaceSharedPtr &rSurface) const
Create Surface from given cairo surface.
std::shared_ptr< PhysicalFontCollection > mxFontCollection
std::vector< VCLXGraphics * > * mpUnoGraphicsList
std::unique_ptr< ImplDeviceFontSizeList > mpDeviceFontSizeList
cairo::SurfaceSharedPtr CreateBitmapSurface(const BitmapSystemData &rData, const Size &rSize) const
Create Surface for given bitmap data.
virtual void SetSettings(const AllSettings &rSettings)
bool SupportsOperation(OutDevSupportType) const
Query an OutputDevice to see whether it supports a specific operation.
std::vector< VCLXGraphics * > * CreateUnoGraphicsList()
virtual void DrawOutDevDirectProcess(const OutputDevice &rSrcDev, SalTwoRect &rPosAry, SalGraphics *pSrcGraphics)
tools::Long mnMapScDenomX
const sal_uInt8 * GetData() const
tools::Long mnEmphasisDescent
tools::Long mnOutOffOrigX
Additional output pixel offset, applied in LogicToPixel (used by SetPixelOffset/GetPixelOffset) ...
bool DrawEPS(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, void *pPtr, sal_uInt32 nSize, const OutputDevice &rOutDev)
std::vector< tools::Rectangle > RectangleVector
constexpr tools::Long Width() const
void SetOutOffYPixel(tools::Long nOutOffY)
SAL_DLLPRIVATE void ReMirror(Point &rPoint) const
virtual void ReleaseAllGraphics(OutputDevice *pOutDev)=0
SAL_DLLPRIVATE tools::Long ImplLogicXToDevicePixel(tools::Long nX) const
Convert a logical X coordinate to a device pixel's X coordinate.
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
OutDevViewType meOutDevViewType
AntialiasingFlags mnAntialiasing
virtual Bitmap GetBitmap(const Point &rSrcPt, const Size &rSize) const
tools::Long mnMapScDenomY
virtual void EnableRTL(bool bEnable=true)
SystemGraphicsData GetSystemGfxData() const
virtual void CopyDeviceArea(SalTwoRect &aPosAry, bool bWindowInvalidate)
void DrawRect(const tools::Rectangle &rRect)
std::unique_ptr< AllSettings > mxSettings
SalGraphics * mpGraphics
Graphics context to draw on.
std::shared_ptr< Surface > SurfaceSharedPtr
std::vector< OutDevState > maOutDevStateStack
virtual void CopyArea(const Point &rDestPt, const Point &rSrcPt, const Size &rSrcSize, bool bWindowInvalidate=false)
SAL_DLLPRIVATE void ImplInvalidateViewTransform()
Invalidate the view transformation.
void SetConnectMetaFile(GDIMetaFile *pMtf)
bool IsRTLEnabled() const
void Draw(OutputDevice *pOutDev, const Point &rDestPt) const
virtual tools::Rectangle GetBackgroundComponentBounds() const
css::uno::Any GetNativeSurfaceHandle(cairo::SurfaceSharedPtr &rSurface, const basegfx::B2ISize &rSize) const
Return native handle for underlying surface.
virtual void dispose() override
virtual const OutputDevice * DrawOutDevDirectCheck(const OutputDevice &rSrcDev) const
virtual bool AcquireGraphics() const =0
Acquire a graphics device that the output device uses to draw on.
std::unique_ptr< ImplDeviceFontList > mpDeviceFontList
virtual void EnableRTL(bool bEnable=true) override
SAL_DLLPRIVATE bool ImplIsAntiparallel() const
virtual bool HasMirroredGraphics() const
SAL_DLLPRIVATE void drawOutDevDirect(const OutputDevice &rSrcDev, SalTwoRect &rPosAry)
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
SAL_DLLPRIVATE tools::Long ImplLogicWidthToDevicePixel(tools::Long nWidth) const
Convert a logical width to a width in units of device pixels.
SAL_DLLPRIVATE void ImplFillOpaqueRectangle(const tools::Rectangle &rRect)
Used for alpha VDev, to set areas to opaque.
static bool GetLayoutRTL()
std::shared_ptr< cairo_surface_t > CairoSurfaceSharedPtr
Size GetOutputSizePixel() const
Base class used mainly for the LibreOffice Desktop class.
css::uno::Any GetSystemGfxDataAny() const
virtual SystemGraphicsData GetGraphicsData() const =0
void mirror(tools::Long &nX, const OutputDevice &rOutDev) const
virtual sal_uInt16 GetBitCount() const
tools::Long mnEmphasisAscent
std::vector< VCLXGraphics * > * GetUnoGraphicsList() const
virtual css::uno::Reference< css::awt::XGraphics > CreateGraphics(OutputDevice *pOutDev)=0
Point LogicToPixel(const Point &rLogicPt) const
uno::Sequence< double > maFillColor
VclPtr< OutputDevice > mpPrevGraphics
Previous output device in list.
virtual sal_uInt16 GetBitCount() const =0
VclPtr< VirtualDevice > mpAlphaVDev
css::awt::DeviceInfo GetCommonDeviceInfo(Size const &aDevSize) const
constexpr tools::Long Height() const
SalLayoutFlags GetLayout() const
tools::Rectangle GetOutputRectPixel() const
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_WHITE
void GetRegionRectangles(RectangleVector &rTarget) const
void SetRasterOp(RasterOp eRasterOp)
void SetOutOffXPixel(tools::Long nOutOffX)
bool DrawEPS(const Point &rPt, const Size &rSz, const GfxLink &rGfxLink, GDIMetaFile *pSubst=nullptr)
SalGraphics const * GetGraphics() const
Get the graphic context that the output device uses to draw on.
css::uno::Reference< css::awt::XGraphics > CreateUnoGraphics()
virtual void InitClipRegion()
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_BLACK
Sequence< sal_Int8 > aSeq
RasterOp GetRasterOp() const
virtual void DrawOutDev(const Point &rDestPt, const Size &rDestSize, const Point &rSrcPt, const Size &rSrcSize)
rtl::Reference< LogicalFontInstance > mpFontInstance
SAL_DLLPRIVATE tools::Rectangle ImplLogicToDevicePixel(const tools::Rectangle &rLogicRect) const
Convert a logical rectangle to a rectangle in physical device pixel units.
ComplexTextLayoutFlags mnTextLayoutMode
BitmapEx GetBitmapEx(const Point &rSrcPt, const Size &rSize) const
Query extended bitmap (with alpha channel, if available).
sal_uInt32 GetDataSize() const
std::shared_ptr< ImplFontCache > mxFontCache
tools::Long mnOutOffX
Output offset for device output in pixel (pseudo window offset within window system's frames) ...
#define SAL_WARN(area, stream)
std::unique_ptr< ImplOutDevData > mpOutDevData
SAL_DLLPRIVATE tools::Long ImplLogicYToDevicePixel(tools::Long nY) const
Convert a logical Y coordinate to a device pixel's Y coordinate.
vcl::ExtOutDevData * mpExtOutDevData
#define DBG_TESTSOLARMUTEX()
static UnoWrapperBase * GetUnoWrapper(bool bCreateIfNotExists=true)
Get the application's UNO wrapper object.
tools::Long mnOutOffLogicY
Additional output offset in logical coordinates, applied in PixelToLogic (used by SetPixelOffset/GetP...
bool IsDeviceOutputNecessary() const
SAL_DLLPRIVATE tools::Long ImplLogicHeightToDevicePixel(tools::Long nHeight) const
Convert a logical height to a height in units of device pixels.
virtual css::awt::DeviceInfo GetDeviceInfo() const
LanguageType meTextLanguage