summaryrefslogtreecommitdiff
path: root/slideshow
diff options
context:
space:
mode:
authorThorsten Behrens <tbehrens@suse.com>2012-03-16 10:06:08 +0100
committerThorsten Behrens <tbehrens@suse.com>2012-03-16 17:02:23 +0100
commitd32cf8d820be839c7303e3c5962c17f64cac2812 (patch)
tree1e36622c3b2b8ab16777dc7d772a352a911384ce /slideshow
parentb9266113514657be1cf9352e1457a5c62876784c (diff)
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).
Diffstat (limited to 'slideshow')
-rw-r--r--slideshow/source/engine/slideview.cxx15
1 files changed, 11 insertions, 4 deletions
diff --git a/slideshow/source/engine/slideview.cxx b/slideshow/source/engine/slideview.cxx
index 0d55528aacb7..2309c4cf7b91 100644
--- a/slideshow/source/engine/slideview.cxx
+++ b/slideshow/source/engine/slideview.cxx
@@ -557,20 +557,27 @@ private:
virtual void clear() const
{
- // keep layer clip
- clearRect(getCanvas()->clone(),
- maLayerBoundsPixel);
+ // grab canvas - that also lazy-initializes maLayerBoundsPixel
+ cppcanvas::CanvasSharedPtr pCanvas=getCanvas()->clone();
+
+ // clear whole canvas
+ const basegfx::B2I64Tuple& rSpriteSize(maLayerBoundsPixel.getRange());
+ clearRect(pCanvas,
+ basegfx::B2IRange(0,0,rSpriteSize.getX(),rSpriteSize.getY()));
}
virtual void clearAll() const
{
+ // grab canvas - that also lazy-initializes maLayerBoundsPixel
::cppcanvas::CanvasSharedPtr pCanvas( getCanvas()->clone() );
// clear layer clip, to clear whole area
pCanvas->setClip();
+ // clear whole canvas
+ const basegfx::B2I64Tuple& rSpriteSize(maLayerBoundsPixel.getRange());
clearRect(pCanvas,
- maLayerBoundsPixel);
+ basegfx::B2IRange(0,0,rSpriteSize.getX(),rSpriteSize.getY()));
}
virtual bool isOnView(boost::shared_ptr<View> const& rView) const