53 const bool bScrolled(rOriginOld != rOriginNew);
67 const Point aDestinationOffsetPixel(aOriginNewPixel - aOriginOldPixel);
69 aDestinationOffsetPixel, aOutputSizePixel,
70 Point(), aOutputSizePixel);
78 const basegfx::B2IPoint aIPointDestinationOffsetPixel(aDestinationOffsetPixel.X(), aDestinationOffsetPixel.Y());
101 const vcl::Region aRegionPixel(aRegionRectanglePixel);
109 const bool bMapModeWasEnabledDest(
getOutputDevice().IsMapModeEnabled());
110 const bool bMapModeWasEnabledSource(
mpBufferDevice->IsMapModeEnabled());
118 for(
const auto& rRect : aRectangles)
121 const Point aTopLeft(rRect.TopLeft());
122 const Size aSize(rRect.GetSize());
152 aRegion.Intersect(aPaintRegionPixel);
161 aRegion.Intersect(aBufferDeviceRectanglePixel);
165 const bool bMapModeWasEnabledSource(
mpBufferDevice->IsMapModeEnabled());
171 aRegion.GetRegionRectangles(aRectangles);
173 for(
const auto& rRect : aRectangles)
176 const Point aTopLeft(rRect.TopLeft());
177 const Size aSize(rRect.GetSize());
198 if(maBufferRememberedRangePixel.isEmpty())
203 maBufferRememberedRangePixel.getMinX(), maBufferRememberedRangePixel.getMinY(),
204 maBufferRememberedRangePixel.getMaxX(), maBufferRememberedRangePixel.getMaxY());
205 aBufferRememberedRangeLogic.
transform(getOutputDevice().GetInverseViewTransformation());
208 const bool bTargetIsWindow(
OUTDEV_WINDOW == mrOutputDevice.GetOutDevType());
209 bool bCursorWasEnabled(
false);
214 vcl::Window& rWindow = *mrOutputDevice.GetOwnerWindow();
220 bCursorWasEnabled =
true;
227 const Size aDestinationSizePixel(mpBufferDevice->GetOutputSizePixel());
228 const Size aOutputBufferSizePixel(mpOutputBufferDevice->GetOutputSizePixel());
230 if(aDestinationSizePixel != aOutputBufferSizePixel)
232 mpOutputBufferDevice->SetOutputSizePixel(aDestinationSizePixel);
235 mpOutputBufferDevice->SetMapMode(getOutputDevice().GetMapMode());
236 mpOutputBufferDevice->EnableMapMode(
false);
237 mpOutputBufferDevice->SetDrawMode(mpBufferDevice->GetDrawMode());
238 mpOutputBufferDevice->SetSettings(mpBufferDevice->GetSettings());
239 mpOutputBufferDevice->SetAntialiasing(mpBufferDevice->GetAntialiasing());
243 maBufferRememberedRangePixel.getMinX(), maBufferRememberedRangePixel.getMinY(),
244 maBufferRememberedRangePixel.getMaxX(), maBufferRememberedRangePixel.getMaxY());
249 if(aRegionRectanglePixel.Left() < 0)
251 aRegionRectanglePixel.
SetLeft( 0 );
254 if(aRegionRectanglePixel.Top() < 0)
256 aRegionRectanglePixel.SetTop( 0 );
259 if(aRegionRectanglePixel.Right() > aDestinationSizePixel.getWidth())
261 aRegionRectanglePixel.SetRight( aDestinationSizePixel.getWidth() );
264 if(aRegionRectanglePixel.Bottom() > aDestinationSizePixel.getHeight())
266 aRegionRectanglePixel.SetBottom( aDestinationSizePixel.getHeight() );
270 const Point aTopLeft(aRegionRectanglePixel.TopLeft());
271 const Size aSize(aRegionRectanglePixel.GetSize());
274 const bool bMapModeWasEnabledDest(mpBufferDevice->IsMapModeEnabled());
275 mpBufferDevice->EnableMapMode(
false);
277 mpOutputBufferDevice->DrawOutDev(
283 mpBufferDevice->EnableMapMode(bMapModeWasEnabledDest);
288 mpOutputBufferDevice->EnableMapMode();
290 mpOutputBufferDevice->EnableMapMode(
false);
294 const bool bMapModeWasEnabledDest(getOutputDevice().IsMapModeEnabled());
295 getOutputDevice().EnableMapMode(
false);
297 getOutputDevice().DrawOutDev(
300 *mpOutputBufferDevice);
308 getOutputDevice().EnableMapMode(bMapModeWasEnabledDest);
322 vcl::Window& rWindow = *mrOutputDevice.GetOwnerWindow();
325 maBufferRememberedRangePixel.getMinX(),
326 maBufferRememberedRangePixel.getMinY(),
327 maBufferRememberedRangePixel.getMaxX(),
328 maBufferRememberedRangePixel.getMaxY());
333 if(bCursorWasEnabled)
335 vcl::Window& rWindow = *mrOutputDevice.GetOwnerWindow();
346 maBufferRememberedRangePixel.reset();
354 maBufferIdle(
"sdr::overlay::OverlayManagerBuffered maBufferIdle" )
394 ImpBufferTimerHandler(
nullptr);
420 static_cast<sal_Int32>(floor(aDiscreteRange.
getMinX() - fDiscreteOne)),
421 static_cast<sal_Int32
>(floor(aDiscreteRange.
getMinY() - fDiscreteOne)));
423 static_cast<sal_Int32>(ceil(aDiscreteRange.
getMaxX() + fDiscreteOne)),
424 static_cast<sal_Int32
>(ceil(aDiscreteRange.
getMaxY() + fDiscreteOne)));
#define LINK(Instance, Class, Member)
const Fraction & GetScaleX() const
OutDevType GetOutDevType() const
sal_Int32 getMinY() const
ScopedVclPtr< VirtualDevice > mpBufferDevice
virtual ~OverlayManagerBuffered() override
sal_Int32 getMaxX() const
bool IsMapModeEnabled() const
virtual void flush() override
void ImpRestoreBackground() const
const MapMode & GetMapMode() const
vcl::Region GetPaintRegion() const
void EnableMapMode(bool bEnable=true)
void PaintTransparentChildren(vcl::Window const &rWindow, tools::Rectangle const &rPixelRect)
paint the transparent children of rWin that overlap rPixelRect (for example, transparent form control...
std::vector< tools::Rectangle > RectangleVector
const Fraction & GetScaleY() const
BASEGFX_DLLPUBLIC void transform(const B2DHomMatrix &rMatrix)
Point LogicToPixel(const Point &rLogicPt) const
double getDiscreteOne() const
virtual void completeRedraw(const vcl::Region &rRegion, OutputDevice *pPreRenderDevice=nullptr) const override
B2IPoint getMinimum() const
void ImpSaveBackground(const vcl::Region &rRegion, OutputDevice *pPreRenderDevice)
static rtl::Reference< OverlayManager > create(OutputDevice &rOutputDevice)
vcl::Cursor * GetCursor() const
Size GetOutputSizePixel() const
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
virtual void invalidateRange(const basegfx::B2DRange &rRange) override
OutputDevice & getOutputDevice() const
virtual void completeRedraw(const vcl::Region &rRegion, OutputDevice *pPreRenderDevice=nullptr) const
OverlayManagerBuffered(OutputDevice &rOutputDevice)
void ImpDrawMembers(const basegfx::B2DRange &rRange, OutputDevice &rDestinationDevice) const
::OutputDevice const * GetOutDev() const
void GetRegionRectangles(RectangleVector &rTarget) const
void SetInvokeHandler(const Link< Timer *, void > &rLink)
const Point & GetOrigin() const
virtual void Start(bool bStartTimer=true) override
basegfx::B2IRange maBufferRememberedRangePixel
void SetPriority(TaskPriority ePriority)
sal_Int32 getMaxY() const
void ImpPrepareBufferDevice()
virtual vcl::Window * GetOwnerWindow() const
void expand(const Tuple2D< sal_Int32 > &rTuple)
SAL_DLLPRIVATE void DrawOutDev(const Point &, const Size &, const Point &, const Size &, const Printer &)=delete
IMPL_LINK_NOARG(OverlayManagerBuffered, ImpBufferTimerHandler, Timer *, void)
B2IPoint getMaximum() const
sal_Int32 getMinX() const