LibreOffice Module vcl (master)  1
virdev.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #include <sal/config.h>
21 
22 #include <sal/log.hxx>
23 #include <tools/debug.hxx>
24 
25 #include <vcl/pdfextoutdevdata.hxx>
26 #include <vcl/virdev.hxx>
27 
28 #include <ImplOutDevData.hxx>
31 #include <impfontcache.hxx>
32 #include <salinst.hxx>
33 #include <salgdi.hxx>
34 #include <salvd.hxx>
35 #include <svdata.hxx>
36 
37 using namespace ::com::sun::star::uno;
38 
40 {
41  const vcl::ExtOutDevData* pOutDevData(GetExtOutDevData());
42  const vcl::PDFExtOutDevData* pPDFData(dynamic_cast<const vcl::PDFExtOutDevData*>(pOutDevData));
43  return pPDFData == nullptr;
44 }
45 
47 {
49 
50  if ( mpGraphics )
51  return true;
52 
53  mbInitLineColor = true;
54  mbInitFillColor = true;
55  mbInitFont = true;
56  mbInitTextColor = true;
57  mbInitClipRegion = true;
58 
59  ImplSVData* pSVData = ImplGetSVData();
60 
61  if ( mpVirDev )
62  {
63  mpGraphics = mpVirDev->AcquireGraphics();
64  // if needed retry after releasing least recently used virtual device graphics
65  while ( !mpGraphics )
66  {
67  if ( !pSVData->maGDIData.mpLastVirGraphics )
68  break;
70  mpGraphics = mpVirDev->AcquireGraphics();
71  }
72  // update global LRU list of virtual device graphics
73  if ( mpGraphics )
74  {
76  pSVData->maGDIData.mpFirstVirGraphics = const_cast<VirtualDevice*>(this);
77  if ( mpNextGraphics )
78  mpNextGraphics->mpPrevGraphics = const_cast<VirtualDevice*>(this);
79  if ( !pSVData->maGDIData.mpLastVirGraphics )
80  pSVData->maGDIData.mpLastVirGraphics = const_cast<VirtualDevice*>(this);
81  }
82  }
83 
84  if ( mpGraphics )
85  {
88  }
89 
90  return mpGraphics != nullptr;
91 }
92 
93 void VirtualDevice::ReleaseGraphics( bool bRelease )
94 {
96 
97  if ( !mpGraphics )
98  return;
99 
100  // release the fonts of the physically released graphics device
101  if ( bRelease )
103 
104  ImplSVData* pSVData = ImplGetSVData();
105 
106  VirtualDevice* pVirDev = this;
107 
108  if ( bRelease )
109  pVirDev->mpVirDev->ReleaseGraphics( mpGraphics );
110  // remove from global LRU list of virtual device graphics
111  if ( mpPrevGraphics )
113  else
115  if ( mpNextGraphics )
117  else
119 
120  mpGraphics = nullptr;
121  mpPrevGraphics = nullptr;
122  mpNextGraphics = nullptr;
123 }
124 
126  tools::Long nDX, tools::Long nDY, const SystemGraphicsData *pData )
127 {
128  SAL_INFO( "vcl.virdev", "ImplInitVirDev(" << nDX << "," << nDY << ")" );
129 
131  mbForceZeroExtleadBug = false;
132  mnBitCount = 0;
133  mbScreenComp = false;
134 
135 
136  bool bErase = nDX > 0 && nDY > 0;
137 
138  if ( nDX < 1 )
139  nDX = 1;
140 
141  if ( nDY < 1 )
142  nDY = 1;
143 
144  ImplSVData* pSVData = ImplGetSVData();
145 
146  if ( !pOutDev )
147  pOutDev = ImplGetDefaultWindow()->GetOutDev();
148  if( !pOutDev )
149  return;
150 
151  SalGraphics* pGraphics;
152  if ( !pOutDev->mpGraphics )
153  (void)pOutDev->AcquireGraphics();
154  pGraphics = pOutDev->mpGraphics;
155  if ( pGraphics )
156  mpVirDev = pSVData->mpDefInst->CreateVirtualDevice(*pGraphics, nDX, nDY, meFormat, pData);
157  else
158  mpVirDev = nullptr;
159  if ( !mpVirDev )
160  {
161  // do not abort but throw an exception, may be the current thread terminates anyway (plugin-scenario)
162  throw css::uno::RuntimeException(
163  "Could not create system bitmap!",
164  css::uno::Reference< css::uno::XInterface >() );
165  }
166 
167  mnBitCount = pOutDev->GetBitCount();
168  mnOutWidth = nDX;
169  mnOutHeight = nDY;
170 
171  mbScreenComp = pOutDev->IsScreenComp();
172 
173  mbDevOutput = true;
176  mnDPIX = pOutDev->mnDPIX;
177  mnDPIY = pOutDev->mnDPIY;
179  maFont = pOutDev->maFont;
180 
181  if( maTextColor != pOutDev->maTextColor )
182  {
183  maTextColor = pOutDev->maTextColor;
184  mbInitTextColor = true;
185  }
186 
187  // virtual devices have white background by default
189 
190  // #i59283# don't erase user-provided surface
191  if( !pData && bErase)
192  Erase();
193 
194  // register VirDev in the list
195  mpNext = pSVData->maGDIData.mpFirstVirDev;
196  mpPrev = nullptr;
197  if ( mpNext )
198  mpNext->mpPrev = this;
199  pSVData->maGDIData.mpFirstVirDev = this;
200 }
201 
203  DeviceFormat eAlphaFormat, OutDevType eOutDevType)
204  : OutputDevice(eOutDevType)
205  , meFormat(eFormat)
206  , meAlphaFormat(eAlphaFormat)
207 {
208  SAL_INFO( "vcl.virdev", "VirtualDevice::VirtualDevice( " << static_cast<int>(eFormat)
209  << ", " << static_cast<int>(eAlphaFormat)
210  << ", " << static_cast<int>(eOutDevType) << " )" );
211 
212  ImplInitVirDev(pCompDev ? pCompDev : Application::GetDefaultDevice(), 0, 0);
213 }
214 
216  DeviceFormat eFormat)
218  , meFormat(eFormat)
219  , meAlphaFormat(DeviceFormat::NONE)
220 {
221  SAL_INFO( "vcl.virdev", "VirtualDevice::VirtualDevice( " << static_cast<int>(eFormat) << " )" );
222 
223  ImplInitVirDev(Application::GetDefaultDevice(), rSize.Width(), rSize.Height(), &rData);
224 }
225 
227 {
228  SAL_INFO( "vcl.virdev", "VirtualDevice::~VirtualDevice()" );
229  disposeOnce();
230 }
231 
233 {
234  SAL_INFO( "vcl.virdev", "VirtualDevice::dispose()" );
235 
236  ImplSVData* pSVData = ImplGetSVData();
237 
238  ReleaseGraphics();
239 
240  mpVirDev.reset();
241 
242  // remove this VirtualDevice from the double-linked global list
243  if( mpPrev )
244  mpPrev->mpNext = mpNext;
245  else
246  pSVData->maGDIData.mpFirstVirDev = mpNext;
247 
248  if( mpNext )
249  mpNext->mpPrev = mpPrev;
250 
252 }
253 
254 bool VirtualDevice::InnerImplSetOutputSizePixel( const Size& rNewSize, bool bErase,
255  sal_uInt8 *const pBuffer)
256 {
257  SAL_INFO( "vcl.virdev",
258  "VirtualDevice::InnerImplSetOutputSizePixel( " << rNewSize.Width() << ", "
259  << rNewSize.Height() << ", " << int(bErase) << " )" );
260 
261  if ( !mpVirDev )
262  return false;
263  else if ( rNewSize == GetOutputSizePixel() )
264  {
265  if ( bErase )
266  Erase();
267  SAL_INFO( "vcl.virdev", "Trying to re-use a VirtualDevice but this time using a pre-allocated buffer");
268  return true;
269  }
270 
271  bool bRet;
272  tools::Long nNewWidth = rNewSize.Width(), nNewHeight = rNewSize.Height();
273 
274  if ( nNewWidth < 1 )
275  nNewWidth = 1;
276 
277  if ( nNewHeight < 1 )
278  nNewHeight = 1;
279 
280  if ( bErase )
281  {
282  if ( pBuffer )
283  bRet = mpVirDev->SetSizeUsingBuffer( nNewWidth, nNewHeight, pBuffer );
284  else
285  bRet = mpVirDev->SetSize( nNewWidth, nNewHeight );
286 
287  if ( bRet )
288  {
289  mnOutWidth = rNewSize.Width();
290  mnOutHeight = rNewSize.Height();
291  Erase();
292  }
293  }
294  else
295  {
296  std::unique_ptr<SalVirtualDevice> pNewVirDev;
297  ImplSVData* pSVData = ImplGetSVData();
298 
299  // we need a graphics
300  if ( !mpGraphics && !AcquireGraphics() )
301  return false;
302 
303  assert(mpGraphics);
304 
305  pNewVirDev = pSVData->mpDefInst->CreateVirtualDevice(*mpGraphics, nNewWidth, nNewHeight, meFormat);
306  if ( pNewVirDev )
307  {
308  SalGraphics* pGraphics = pNewVirDev->AcquireGraphics();
309  if ( pGraphics )
310  {
311  tools::Long nWidth;
312  tools::Long nHeight;
313  if ( mnOutWidth < nNewWidth )
314  nWidth = mnOutWidth;
315  else
316  nWidth = nNewWidth;
317  if ( mnOutHeight < nNewHeight )
318  nHeight = mnOutHeight;
319  else
320  nHeight = nNewHeight;
321  SalTwoRect aPosAry(0, 0, nWidth, nHeight, 0, 0, nWidth, nHeight);
322  pGraphics->CopyBits( aPosAry, *mpGraphics, *this, *this );
323  pNewVirDev->ReleaseGraphics( pGraphics );
324  ReleaseGraphics();
325  mpVirDev = std::move(pNewVirDev);
326  mnOutWidth = rNewSize.Width();
327  mnOutHeight = rNewSize.Height();
328  bRet = true;
329  }
330  else
331  {
332  bRet = false;
333  }
334  }
335  else
336  bRet = false;
337  }
338 
339  return bRet;
340 }
341 
342 // #i32109#: Fill opaque areas correctly (without relying on
343 // fill/linecolor state)
345 {
346  // Set line and fill color to black (->opaque),
347  // fill rect with that (linecolor, too, because of
348  // those pesky missing pixel problems)
352  DrawRect( rRect );
353  Pop();
354 }
355 
356 bool VirtualDevice::ImplSetOutputSizePixel( const Size& rNewSize, bool bErase,
357  sal_uInt8 *const pBuffer)
358 {
359  if( InnerImplSetOutputSizePixel(rNewSize, bErase, pBuffer) )
360  {
362  {
363  // #110958# Setup alpha bitmap
364  if(mpAlphaVDev && mpAlphaVDev->GetOutputSizePixel() != rNewSize)
365  {
367  }
368 
369  if( !mpAlphaVDev )
370  {
372  mpAlphaVDev->InnerImplSetOutputSizePixel(rNewSize, bErase, nullptr);
373  }
374 
375  // TODO: copy full outdev state to new one, here. Also needed in outdev2.cxx:DrawOutDev
376  if( GetLineColor() != COL_TRANSPARENT )
378 
379  if( GetFillColor() != COL_TRANSPARENT )
381 
383 
385 
387  }
388 
389  return true;
390  }
391 
392  return false;
393 }
394 
395 void VirtualDevice::EnableRTL( bool bEnable )
396 {
397  // virdevs default to not mirroring, they will only be set to mirroring
398  // under rare circumstances in the UI, eg the valueset control
399  // because each virdev has its own SalGraphics we can safely switch the SalGraphics here
400  // ...hopefully
401  if( AcquireGraphics() )
403 
404  OutputDevice::EnableRTL(bEnable);
405 }
406 
407 bool VirtualDevice::SetOutputSizePixel( const Size& rNewSize, bool bErase )
408 {
409  return ImplSetOutputSizePixel(rNewSize, bErase, nullptr);
410 }
411 
413  const Size& rNewSize, const Fraction& rScale, const Point& rNewOffset,
414  sal_uInt8 *const pBuffer)
415 {
416  if (pBuffer) {
417  MapMode mm = GetMapMode();
418  mm.SetOrigin( rNewOffset );
419  mm.SetScaleX( rScale );
420  mm.SetScaleY( rScale );
421  SetMapMode( mm );
422  }
423  return ImplSetOutputSizePixel(rNewSize, true, pBuffer);
424 }
425 
427 {
428  sal_Int32 nDPIX = 600, nDPIY = 600;
429  switch( i_eRefDevMode )
430  {
431  case RefDevMode::NONE:
432  default:
433  SAL_WARN( "vcl.virdev", "VDev::SetRefDev illegal argument!" );
434  break;
435  case RefDevMode::Dpi600:
436  nDPIX = nDPIY = 600;
437  break;
438  case RefDevMode::MSO1:
439  nDPIX = nDPIY = 6*1440;
440  break;
441  case RefDevMode::PDF1:
442  nDPIX = nDPIY = 720;
443  break;
444  }
445  ImplSetReferenceDevice( i_eRefDevMode, nDPIX, nDPIY );
446 }
447 
448 void VirtualDevice::SetReferenceDevice( sal_Int32 i_nDPIX, sal_Int32 i_nDPIY )
449 {
450  ImplSetReferenceDevice( RefDevMode::Custom, i_nDPIX, i_nDPIY );
451 }
452 
454 {
455  return true;
456 }
457 
458 void VirtualDevice::ImplSetReferenceDevice( RefDevMode i_eRefDevMode, sal_Int32 i_nDPIX, sal_Int32 i_nDPIY )
459 {
460  mnDPIX = i_nDPIX;
461  mnDPIY = i_nDPIY;
462  mnDPIScalePercentage = 100;
463 
464  EnableOutput( false ); // prevent output on reference device
465  mbScreenComp = false;
466 
467  // invalidate currently selected fonts
468  mbInitFont = true;
469  mbNewFont = true;
470 
471  // avoid adjusting font lists when already in refdev mode
472  RefDevMode nOldRefDevMode = meRefDevMode;
473  meRefDevMode = i_eRefDevMode;
474  if( nOldRefDevMode != RefDevMode::NONE )
475  return;
476 
477  // the reference device should have only scalable fonts
478  // => clean up the original font lists before getting new ones
479  mpFontInstance.clear();
480  mpFontFaceCollection.reset();
481 
482  // preserve global font lists
483  ImplSVData* pSVData = ImplGetSVData();
484  mxFontCollection.reset();
485  mxFontCache.reset();
486 
487  // get font list with scalable fonts only
489  mxFontCollection = pSVData->maGDIData.mxScreenFontList->Clone();
490 
491  // prepare to use new font lists
492  mxFontCache = std::make_shared<ImplFontCache>();
493 }
494 
495 sal_uInt16 VirtualDevice::GetBitCount() const
496 {
497  return mnBitCount;
498 }
499 
501 {
502  return true;
503 }
504 
506 {
507  mbForceZeroExtleadBug = true;
508 }
509 
511 {
512 #ifdef UNX
513  // backwards compatible line metrics after fixing #i60945#
514  if ( mbForceZeroExtleadBug )
515  return 0;
516 #endif
517 
518  return mpFontInstance->mxFontMetric->GetExternalLeading();
519 }
520 
521 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
void EnableOutput(bool bEnable=true)
Definition: outdev.cxx:343
sal_Int32 mnDPIScalePercentage
For HiDPI displays, we want to draw elements for a percentage larger.
Definition: outdev.hxx:220
void Compat_ZeroExtleadBug()
Definition: virdev.cxx:505
const DeviceFormat meFormat
Definition: virdev.hxx:53
VclPtr< OutputDevice > mpNextGraphics
Next output device in list.
Definition: outdev.hxx:190
virtual bool UsePolyPolygonForComplexGradient() override
Definition: virdev.cxx:500
void SetReferenceDevice(RefDevMode)
Definition: virdev.cxx:426
virtual ~VirtualDevice() override
Definition: virdev.cxx:226
void SetAntialiasing(AntialiasingFlags nMode)
Definition: outdev.cxx:351
Color maTextColor
Definition: outdev.hxx:235
VclPtr< VirtualDevice > mpNext
Definition: virdev.hxx:50
long Long
constexpr::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
void disposeAndClear()
Definition: vclptr.hxx:200
VclPtr< OutputDevice > mpLastVirGraphics
Definition: svdata.hxx:222
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
Definition: stack.cxx:33
const wchar_t *typedef int(__stdcall *DllNativeUnregProc)(int
virtual bool AcquireGraphics() const override
Acquire a graphics device that the output device uses to draw on.
Definition: virdev.cxx:46
void CopyBits(const SalTwoRect &rPosAry, const OutputDevice &rOutDev)
const MapMode & GetMapMode() const
Definition: outdev.hxx:1572
sal_Int32 mnDPIY
Definition: outdev.hxx:219
std::shared_ptr< vcl::font::PhysicalFontCollection > mxFontCollection
Definition: outdev.hxx:268
bool GetTextRenderModeForResolutionIndependentLayout() const
Definition: outdev.hxx:495
sal_Int32 mnDPIX
Definition: outdev.hxx:218
const DeviceFormat meAlphaFormat
Definition: virdev.hxx:54
void SetMapMode()
Definition: map.cxx:649
AntialiasingFlags GetAntialiasing() const
Definition: outdev.hxx:491
ImplSVGDIData maGDIData
Definition: svdata.hxx:399
NONE
virtual void dispose() override
Definition: virdev.cxx:232
static OutputDevice * GetDefaultDevice()
Get the default "device" (in this case the default window).
Definition: svapp.cxx:1164
std::unique_ptr< vcl::font::PhysicalFontFaceCollection > mpFontFaceCollection
Definition: outdev.hxx:193
constexpr tools::Long Width() const
void SetBackground()
Definition: background.cxx:27
VirtualDevice(const VirtualDevice &)=delete
AntialiasingFlags mnAntialiasing
Definition: outdev.hxx:243
void Pop()
Definition: stack.cxx:92
bool mbScreenComp
Definition: virdev.hxx:52
VclPtr< VirtualDevice > mpFirstVirDev
Definition: svdata.hxx:225
virtual void EnableRTL(bool bEnable=true)
Definition: outdev.cxx:663
virtual tools::Long GetFontExtLeading() const override
Definition: virdev.cxx:510
void DrawRect(const tools::Rectangle &rRect)
Definition: rect.cxx:51
SalGraphics * mpGraphics
Graphics context to draw on.
Definition: outdev.hxx:188
ImplSVData * ImplGetSVData()
Definition: svdata.cxx:76
void SetLineColor()
Definition: line.cxx:36
void SetScaleX(const Fraction &rScaleX)
Definition: mapmod.cxx:111
OutDevType
Definition: outdev.hxx:149
virtual void dispose() override
Definition: outdev.cxx:146
SAL_DLLPRIVATE bool ImplSetOutputSizePixel(const Size &rNewSize, bool bErase, sal_uInt8 *pBuffer)
Definition: virdev.cxx:356
SAL_DLLPRIVATE void ImplInitVirDev(const OutputDevice *pOutDev, tools::Long nDX, tools::Long nDY, const SystemGraphicsData *pData=nullptr)
Definition: virdev.cxx:125
virtual bool AcquireGraphics() const =0
Acquire a graphics device that the output device uses to draw on.
virtual void EnableRTL(bool bEnable=true) override
Definition: virdev.cxx:395
bool SetOutputSizePixel(const Size &rNewSize, bool bErase=true)
Definition: virdev.cxx:407
void SetOrigin(const Point &rOrigin)
Definition: mapmod.cxx:105
bool mbInitLineColor
Definition: outdev.hxx:255
void SetFillColor()
Definition: fill.cxx:29
tools::Long mnOutHeight
Definition: outdev.hxx:217
bool mbNewFont
Definition: outdev.hxx:261
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:175
const Color & GetLineColor() const
Definition: outdev.hxx:521
SAL_DLLPRIVATE void ImplFillOpaqueRectangle(const tools::Rectangle &rRect)
Used for alpha VDev, to set areas to opaque.
Definition: virdev.cxx:344
std::unique_ptr< SalVirtualDevice > mpVirDev
Definition: virdev.hxx:48
void SetScaleY(const Fraction &rScaleY)
Definition: mapmod.cxx:118
vcl::Font maFont
Definition: outdev.hxx:234
RasterOp meRasterOp
Definition: outdev.hxx:238
virtual sal_uInt16 GetBitCount() const override
Definition: virdev.cxx:495
Size GetOutputSizePixel() const
Definition: outdev.hxx:321
sal_uInt16 mnBitCount
Definition: virdev.hxx:51
bool mbInitTextColor
Definition: outdev.hxx:258
bool mbForceZeroExtleadBug
Definition: virdev.hxx:56
virtual sal_uInt16 GetBitCount() const
Definition: outdev.cxx:388
SAL_DLLPRIVATE bool InnerImplSetOutputSizePixel(const Size &rNewSize, bool bErase, sal_uInt8 *pBuffer)
Definition: virdev.cxx:254
virtual void ReleaseGraphics(bool bRelease=true) override
Release the graphics device, and remove it from the graphics device list.
Definition: virdev.cxx:93
RefDevMode meRefDevMode
Definition: virdev.hxx:55
virtual void SetXORMode(bool bSet, bool bInvertOnly)=0
VclPtr< OutputDevice > mpPrevGraphics
Previous output device in list.
Definition: outdev.hxx:189
DeviceFormat
Definition: salgtype.hxx:28
void setAntiAlias(bool bNew)
Definition: salgdi.hxx:85
VclPtr< VirtualDevice > mpPrev
Definition: virdev.hxx:49
VclPtr< VirtualDevice > mpAlphaVDev
Definition: outdev.hxx:202
void Erase()
Definition: wallpaper.cxx:96
virtual void ReleaseGraphics(bool bRelease=true)=0
Release the graphics device, and remove it from the graphics device list.
constexpr tools::Long Height() const
unsigned char sal_uInt8
bool mbInitClipRegion
Definition: outdev.hxx:259
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_WHITE
#define SAL_INFO(area, stream)
::OutputDevice const * GetOutDev() const
Definition: window.cxx:568
VclPtr< OutputDevice > mpFirstVirGraphics
Definition: svdata.hxx:221
static VclPtr< reference_type > Create(Arg &&...arg)
A construction helper for VclPtr.
Definition: vclptr.hxx:127
std::shared_ptr< ImplFontCache > mxScreenFontCache
Definition: svdata.hxx:230
bool IsVirtual() const override
Definition: virdev.cxx:453
void SetTextRenderModeForResolutionIndependentLayout(bool bMode)
Definition: outdev.cxx:366
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_BLACK
bool mbInitFont
Definition: outdev.hxx:257
rtl::Reference< LogicalFontInstance > mpFontInstance
Definition: outdev.hxx:192
bool mbInitFillColor
Definition: outdev.hxx:256
tools::Long mnOutWidth
Definition: outdev.hxx:216
SAL_DLLPRIVATE void ImplSetReferenceDevice(RefDevMode, sal_Int32 i_nDPIX, sal_Int32 i_nDPIY)
Definition: virdev.cxx:458
bool mbDevOutput
Definition: outdev.hxx:251
std::shared_ptr< vcl::font::PhysicalFontCollection > mxScreenFontList
Definition: svdata.hxx:229
bool SetOutputSizePixelScaleOffsetAndBuffer(const Size &rNewSize, const Fraction &rScale, const Point &rNewOffset, sal_uInt8 *pBuffer)
Definition: virdev.cxx:412
void SetLayout(SalLayoutFlags aLayout)
Definition: salgdi.hxx:223
std::shared_ptr< ImplFontCache > mxFontCache
Definition: outdev.hxx:269
#define SAL_WARN(area, stream)
vcl::ExtOutDevData * GetExtOutDevData() const
Definition: outdev.hxx:423
#define DBG_TESTSOLARMUTEX()
bool CanEnableNativeWidget() const override
Determine if native widgets can be enabled.
Definition: virdev.cxx:39
virtual std::unique_ptr< SalVirtualDevice > CreateVirtualDevice(SalGraphics &rGraphics, tools::Long &rDX, tools::Long &rDY, DeviceFormat eFormat, const SystemGraphicsData *pData=nullptr)=0
vcl::Window * ImplGetDefaultWindow()
Returns either the application window, or the default GL context window.
Definition: svdata.cxx:210
virtual void ImplReleaseFonts()
SalInstance * mpDefInst
Definition: svdata.hxx:390
virtual bool IsScreenComp() const
Definition: outdev.hxx:317
const Color & GetFillColor() const
Definition: outdev.hxx:526
typedef void(CALLTYPE *GetFuncDataPtr)(sal_uInt16 &nNo