diff options
author | Thorsten Behrens <tbehrens@suse.com> | 2012-03-16 10:06:08 +0100 |
---|---|---|
committer | Tor Lillqvist <tlillqvist@suse.com> | 2012-03-19 08:41:50 +0200 |
commit | e3f835eee16ac7d9dfa76eed8c043e7874995058 (patch) | |
tree | ada8523fdd40f9128d99a73a53afee243c5438d9 | |
parent | 6f7a003ef738e3b11ff8d577c2b350b50d416235 (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).
(cherry picked from commit d32cf8d820be839c7303e3c5962c17f64cac2812)
Signed-off-by: Tor Lillqvist <tlillqvist@suse.com>
-rw-r--r-- | slideshow/source/engine/slideview.cxx | 15 |
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 |