Kaydet (Commit) d32cf8d8 authored tarafından Thorsten Behrens's avatar Thorsten Behrens

Clear whole layer in slideshow sprites fdo#45219

The clear() previously offsetted the topleft rect corner for sprites
by _the sprite topleft_ position, which is rather unhelpful but for
sprites located at (0,0).
üst b9266113
...@@ -557,20 +557,27 @@ private: ...@@ -557,20 +557,27 @@ private:
virtual void clear() const virtual void clear() const
{ {
// keep layer clip // grab canvas - that also lazy-initializes maLayerBoundsPixel
clearRect(getCanvas()->clone(), cppcanvas::CanvasSharedPtr pCanvas=getCanvas()->clone();
maLayerBoundsPixel);
// clear whole canvas
const basegfx::B2I64Tuple& rSpriteSize(maLayerBoundsPixel.getRange());
clearRect(pCanvas,
basegfx::B2IRange(0,0,rSpriteSize.getX(),rSpriteSize.getY()));
} }
virtual void clearAll() const virtual void clearAll() const
{ {
// grab canvas - that also lazy-initializes maLayerBoundsPixel
::cppcanvas::CanvasSharedPtr pCanvas( getCanvas()->clone() ); ::cppcanvas::CanvasSharedPtr pCanvas( getCanvas()->clone() );
// clear layer clip, to clear whole area // clear layer clip, to clear whole area
pCanvas->setClip(); pCanvas->setClip();
// clear whole canvas
const basegfx::B2I64Tuple& rSpriteSize(maLayerBoundsPixel.getRange());
clearRect(pCanvas, clearRect(pCanvas,
maLayerBoundsPixel); basegfx::B2IRange(0,0,rSpriteSize.getX(),rSpriteSize.getY()));
} }
virtual bool isOnView(boost::shared_ptr<View> const& rView) const virtual bool isOnView(boost::shared_ptr<View> const& rView) const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment