44 return pPDFData ==
nullptr;
129 SAL_INFO(
"vcl.virdev",
"ImplInitVirDev(" << nDX <<
"," << nDY <<
")" );
137 bool bErase = nDX > 0 && nDY > 0;
163 throw css::uno::RuntimeException(
164 "Could not create system bitmap!",
165 css::uno::Reference< css::uno::XInterface >() );
192 if( !
pData && bErase)
206 , meFormatAndAlpha(eFormatAndAlpha)
208 SAL_INFO(
"vcl.virdev",
"VirtualDevice::VirtualDevice( " <<
static_cast<int>(eFormatAndAlpha)
209 <<
", " <<
static_cast<int>(eOutDevType) <<
" )" );
217 , meFormatAndAlpha(eFormat)
219 SAL_INFO(
"vcl.virdev",
"VirtualDevice::VirtualDevice( " <<
static_cast<int>(eFormat) <<
" )" );
226 SAL_INFO(
"vcl.virdev",
"VirtualDevice::~VirtualDevice()" );
232 SAL_INFO(
"vcl.virdev",
"VirtualDevice::dispose()" );
256 "VirtualDevice::InnerImplSetOutputSizePixel( " << rNewSize.
Width() <<
", "
257 << rNewSize.
Height() <<
", " <<
int(bErase) <<
" )" );
265 SAL_INFO(
"vcl.virdev",
"Trying to re-use a VirtualDevice but this time using a pre-allocated buffer");
275 if ( nNewHeight < 1 )
281 bRet =
mpVirDev->SetSizeUsingBuffer( nNewWidth, nNewHeight, pBuffer );
283 bRet =
mpVirDev->SetSize( nNewWidth, nNewHeight );
294 std::unique_ptr<SalVirtualDevice> pNewVirDev;
306 SalGraphics* pGraphics = pNewVirDev->AcquireGraphics();
318 nHeight = nNewHeight;
319 SalTwoRect aPosAry(0, 0, nWidth, nHeight, 0, 0, nWidth, nHeight);
321 pNewVirDev->ReleaseGraphics( pGraphics );
355 sal_uInt8 *
const pBuffer,
bool bAlphaMaskTransparent )
419 mm.SetOrigin( rNewOffset );
420 mm.SetScaleX( rScale );
421 mm.SetScaleY( rScale );
428 sal_Int32 nDPIX = 600, nDPIY = 600;
429 switch( i_eRefDevMode )
433 SAL_WARN(
"vcl.virdev",
"VDev::SetRefDev illegal argument!" );
439 nDPIX = nDPIY = 6*1440;
static OutputDevice * GetDefaultDevice()
Get the default "device" (in this case the default window).
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
virtual void ReleaseGraphics(bool bRelease=true)=0
Release the graphics device, and remove it from the graphics device list.
void SetAntialiasing(AntialiasingFlags nMode)
void EnableOutput(bool bEnable=true)
std::shared_ptr< ImplFontCache > mxFontCache
virtual void dispose() override
virtual bool AcquireGraphics() const =0
Acquire a graphics device that the output device uses to draw on.
Size GetOutputSizePixel() const
std::shared_ptr< vcl::font::PhysicalFontCollection > mxFontCollection
void DrawRect(const tools::Rectangle &rRect)
vcl::ExtOutDevData * GetExtOutDevData() const
virtual void ImplReleaseFonts()
virtual sal_uInt16 GetBitCount() const
virtual bool IsScreenComp() const
SalGraphics * mpGraphics
Graphics context to draw on.
VclPtr< OutputDevice > mpNextGraphics
Next output device in list.
rtl::Reference< LogicalFontInstance > mpFontInstance
AntialiasingFlags mnAntialiasing
const Color & GetLineColor() const
VclPtr< VirtualDevice > mpAlphaVDev
const MapMode & GetMapMode() const
sal_Int32 mnDPIScalePercentage
For HiDPI displays, we want to draw elements for a percentage larger.
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
std::unique_ptr< vcl::font::PhysicalFontFaceCollection > mpFontFaceCollection
AntialiasingFlags GetAntialiasing() const
virtual void EnableRTL(bool bEnable=true)
friend class VirtualDevice
VclPtr< OutputDevice > mpPrevGraphics
Previous output device in list.
const Color & GetFillColor() const
void SetLayout(SalLayoutFlags aLayout)
virtual void SetXORMode(bool bSet, bool bInvertOnly)=0
void setAntiAlias(bool bNew)
void CopyBits(const SalTwoRect &rPosAry, const OutputDevice &rOutDev)
virtual std::unique_ptr< SalVirtualDevice > CreateVirtualDevice(SalGraphics &rGraphics, tools::Long &rDX, tools::Long &rDY, DeviceFormat eFormat, const SystemGraphicsData *pData=nullptr)=0
constexpr tools::Long Height() const
constexpr tools::Long Width() const
static VclPtr< reference_type > Create(Arg &&... arg)
A construction helper for VclPtr.
void Compat_ZeroExtleadBug()
VclPtr< VirtualDevice > mpPrev
bool IsVirtual() const override
bool SetOutputSizePixel(const Size &rNewSize, bool bErase=true, bool bAlphaMaskTransparent=false)
virtual void EnableRTL(bool bEnable=true) override
void SetReferenceDevice(RefDevMode)
bool SetOutputSizePixelScaleOffsetAndLOKBuffer(const Size &rNewSize, const Fraction &rScale, const Point &rNewOffset, sal_uInt8 *pBuffer)
bool CanEnableNativeWidget() const override
Determine if native widgets can be enabled.
SAL_DLLPRIVATE void ImplInitVirDev(const OutputDevice *pOutDev, tools::Long nDX, tools::Long nDY, const SystemGraphicsData *pData=nullptr)
virtual tools::Long GetFontExtLeading() const override
SAL_DLLPRIVATE void ImplFillOpaqueRectangle(const tools::Rectangle &rRect)
Used for alpha VDev, to set areas to opaque.
SAL_DLLPRIVATE bool ImplSetOutputSizePixel(const Size &rNewSize, bool bErase, sal_uInt8 *pBuffer, bool bAlphaMaskTransparent=false)
std::unique_ptr< SalVirtualDevice > mpVirDev
virtual ~VirtualDevice() override
bool mbForceZeroExtleadBug
SAL_DLLPRIVATE void ImplSetReferenceDevice(RefDevMode, sal_Int32 i_nDPIX, sal_Int32 i_nDPIY)
const DeviceFormat meFormatAndAlpha
virtual bool UsePolyPolygonForComplexGradient() override
VclPtr< VirtualDevice > mpNext
virtual sal_uInt16 GetBitCount() const override
virtual bool AcquireGraphics() const override
Acquire a graphics device that the output device uses to draw on.
SAL_DLLPRIVATE bool InnerImplSetOutputSizePixel(const Size &rNewSize, bool bErase, sal_uInt8 *pBuffer)
virtual void ReleaseGraphics(bool bRelease=true) override
Release the graphics device, and remove it from the graphics device list.
virtual void dispose() override
::OutputDevice const * GetOutDev() const
constexpr ::Color COL_WHITE(0xFF, 0xFF, 0xFF)
constexpr ::Color COL_ALPHA_OPAQUE(0xff, 0xff, 0xff)
constexpr ::Color COL_ALPHA_TRANSPARENT(0x00, 0x00, 0x00)
constexpr ::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
#define DBG_TESTSOLARMUTEX()
#define SAL_WARN(area, stream)
#define SAL_INFO(area, stream)
std::unique_ptr< sal_Int32[]> pData
VclPtr< OutputDevice > mpLastVirGraphics
std::shared_ptr< vcl::font::PhysicalFontCollection > mxScreenFontList
std::shared_ptr< ImplFontCache > mxScreenFontCache
VclPtr< VirtualDevice > mpFirstVirDev
VclPtr< OutputDevice > mpFirstVirGraphics
ImplSVData * ImplGetSVData()
vcl::Window * ImplGetDefaultWindow()
Returns either the application window, or the default GL context window.