53 const bool bScrolled(rOriginOld != rOriginNew);
59 const Point aLogicOriginDiff(rOriginNew - rOriginOld);
61 const Point aDestinationOffsetPixel(aPixelOriginDiff.
Width(), aPixelOriginDiff.
Height());
70 aDestinationOffsetPixel, aOutputSizePixel,
71 Point(), aOutputSizePixel);
79 const basegfx::B2IPoint aIPointDestinationOffsetPixel(aDestinationOffsetPixel.
X(), aDestinationOffsetPixel.
Y());
102 const vcl::Region aRegionPixel(aRegionRectanglePixel);
110 const bool bMapModeWasEnabledDest(
getOutputDevice().IsMapModeEnabled());
111 const bool bMapModeWasEnabledSource(
mpBufferDevice->IsMapModeEnabled());
119 for(
const auto& rRect : aRectangles)
122 const Point aTopLeft(rRect.TopLeft());
123 const Size aSize(rRect.GetSize());
162 aRegion.
Intersect(aBufferDeviceRectanglePixel);
166 const bool bMapModeWasEnabledSource(
mpBufferDevice->IsMapModeEnabled());
174 for(
const auto& rRect : aRectangles)
177 const Point aTopLeft(rRect.TopLeft());
178 const Size aSize(rRect.GetSize());
199 if(maBufferRememberedRangePixel.isEmpty())
204 maBufferRememberedRangePixel.getMinX(), maBufferRememberedRangePixel.getMinY(),
205 maBufferRememberedRangePixel.getMaxX(), maBufferRememberedRangePixel.getMaxY());
206 aBufferRememberedRangeLogic.
transform(getOutputDevice().GetInverseViewTransformation());
209 const bool bTargetIsWindow(
OUTDEV_WINDOW == mrOutputDevice.GetOutDevType());
210 bool bCursorWasEnabled(
false);
215 vcl::Window& rWindow = *mrOutputDevice.GetOwnerWindow();
221 bCursorWasEnabled =
true;
228 const Size aDestinationSizePixel(mpBufferDevice->GetOutputSizePixel());
229 const Size aOutputBufferSizePixel(mpOutputBufferDevice->GetOutputSizePixel());
231 if(aDestinationSizePixel != aOutputBufferSizePixel)
233 mpOutputBufferDevice->SetOutputSizePixel(aDestinationSizePixel);
236 mpOutputBufferDevice->SetMapMode(getOutputDevice().GetMapMode());
237 mpOutputBufferDevice->EnableMapMode(
false);
238 mpOutputBufferDevice->SetDrawMode(mpBufferDevice->GetDrawMode());
239 mpOutputBufferDevice->SetSettings(mpBufferDevice->GetSettings());
240 mpOutputBufferDevice->SetAntialiasing(mpBufferDevice->GetAntialiasing());
244 maBufferRememberedRangePixel.getMinX(), maBufferRememberedRangePixel.getMinY(),
245 maBufferRememberedRangePixel.getMaxX(), maBufferRememberedRangePixel.getMaxY());
250 if(aRegionRectanglePixel.
Left() < 0)
252 aRegionRectanglePixel.
SetLeft( 0 );
255 if(aRegionRectanglePixel.
Top() < 0)
257 aRegionRectanglePixel.
SetTop( 0 );
260 if(aRegionRectanglePixel.
Right() > aDestinationSizePixel.
getWidth())
275 const bool bMapModeWasEnabledDest(mpBufferDevice->IsMapModeEnabled());
276 mpBufferDevice->EnableMapMode(
false);
278 mpOutputBufferDevice->DrawOutDev(
284 mpBufferDevice->EnableMapMode(bMapModeWasEnabledDest);
289 mpOutputBufferDevice->EnableMapMode();
291 mpOutputBufferDevice->EnableMapMode(
false);
295 const bool bMapModeWasEnabledDest(getOutputDevice().IsMapModeEnabled());
296 getOutputDevice().EnableMapMode(
false);
298 getOutputDevice().DrawOutDev(
301 *mpOutputBufferDevice);
309 getOutputDevice().EnableMapMode(bMapModeWasEnabledDest);
323 vcl::Window& rWindow = *mrOutputDevice.GetOwnerWindow();
326 maBufferRememberedRangePixel.getMinX(),
327 maBufferRememberedRangePixel.getMinY(),
328 maBufferRememberedRangePixel.getMaxX(),
329 maBufferRememberedRangePixel.getMaxY());
334 if(bCursorWasEnabled)
336 vcl::Window& rWindow = *mrOutputDevice.GetOwnerWindow();
347 maBufferRememberedRangePixel.reset();
355 maBufferIdle(
"sdr::overlay::OverlayManagerBuffered maBufferIdle" )
395 ImpBufferTimerHandler(
nullptr);
421 static_cast<sal_Int32
>(floor(aDiscreteRange.
getMinX() - fDiscreteOne)),
422 static_cast<sal_Int32
>(floor(aDiscreteRange.
getMinY() - fDiscreteOne)));
424 static_cast<sal_Int32
>(ceil(aDiscreteRange.
getMaxX() + fDiscreteOne)),
425 static_cast<sal_Int32
>(ceil(aDiscreteRange.
getMaxY() + fDiscreteOne)));
virtual void Start(bool bStartTimer=true) override
const Point & GetOrigin() const
void EnableMapMode(bool bEnable=true)
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
SAL_DLLPRIVATE void DrawOutDev(const Point &, const Size &, const Point &, const Size &, const Printer &)=delete
const MapMode & GetMapMode() const
OutDevType GetOutDevType() const
virtual vcl::Window * GetOwnerWindow() const
bool IsMapModeEnabled() const
constexpr tools::Long Y() const
constexpr tools::Long X() const
constexpr tools::Long getHeight() const
constexpr tools::Long Height() const
constexpr tools::Long getWidth() const
constexpr tools::Long Width() const
void SetPriority(TaskPriority ePriority)
void SetInvokeHandler(const Link< Timer *, void > &rLink)
BASEGFX_DLLPUBLIC void transform(const B2DHomMatrix &rMatrix)
B2IPoint getMinimum() const
B2IPoint getMaximum() const
void expand(const Tuple2D< TYPE > &rTuple)
virtual void flush() override
void ImpPrepareBufferDevice()
virtual void completeRedraw(const vcl::Region &rRegion, OutputDevice *pPreRenderDevice=nullptr) const override
virtual void invalidateRange(const basegfx::B2DRange &rRange) override
virtual ~OverlayManagerBuffered() override
OverlayManagerBuffered(OutputDevice &rOutputDevice)
basegfx::B2IRange maBufferRememberedRangePixel
ScopedVclPtr< VirtualDevice > mpBufferDevice
void ImpSaveBackground(const vcl::Region &rRegion, OutputDevice *pPreRenderDevice)
void ImpRestoreBackground() const
static rtl::Reference< OverlayManager > create(OutputDevice &rOutputDevice)
double getDiscreteOne() const
drawinglayer::geometry::ViewInformation2D const & getCurrentViewInformation2D() const
void ImpDrawMembers(const basegfx::B2DRange &rRange, OutputDevice &rDestinationDevice) const
OutputDevice & getOutputDevice() const
virtual void completeRedraw(const vcl::Region &rRegion, OutputDevice *pPreRenderDevice=nullptr) const
void Intersect(const tools::Rectangle &rRegion)
void GetRegionRectangles(RectangleVector &rTarget) const
Point LogicToPixel(const Point &rLogicPt) const
vcl::Cursor * GetCursor() const
::OutputDevice const * GetOutDev() const
vcl::Region GetPaintRegion() const
#define LINK(Instance, Class, Member)
IMPL_LINK_NOARG(OverlayManagerBuffered, ImpBufferTimerHandler, Timer *, void)
std::vector< tools::Rectangle > RectangleVector
void PaintTransparentChildren(vcl::Window const &rWindow, tools::Rectangle const &rPixelRect)
paint the transparent children of rWin that overlap rPixelRect (for example, transparent form control...