diff --git a/slideshow/source/engine/slide/layer.cxx b/slideshow/source/engine/slide/layer.cxx index ae64b7a38773..86864959902b 100644 --- a/slideshow/source/engine/slide/layer.cxx +++ b/slideshow/source/engine/slide/layer.cxx @@ -36,7 +36,7 @@ #include #include -#include +#include #include #include @@ -202,7 +202,8 @@ namespace slideshow { // TODO(Q1): move this to B2DMultiRange if( !rUpdateRange.isEmpty() ) - maUpdateAreas.addRange( rUpdateRange ); + maUpdateAreas.appendElement( rUpdateRange, + basegfx::ORIENTATION_POSITIVE ); } void Layer::updateBounds( ShapeSharedPtr const& rShape ) @@ -248,7 +249,7 @@ namespace slideshow void Layer::clearUpdateRanges() { - maUpdateAreas.reset(); + maUpdateAreas.clear(); } void Layer::clearContent() @@ -284,12 +285,12 @@ namespace slideshow Layer::EndUpdater Layer::beginUpdate() { - if( !maUpdateAreas.isEmpty() ) + if( maUpdateAreas.count() ) { // perform proper layer update. That means, setup proper // clipping, and render each shape that intersects with // the calculated update area - ::basegfx::B2DPolyPolygon aClip( maUpdateAreas.getPolyPolygon() ); + ::basegfx::B2DPolyPolygon aClip( maUpdateAreas.solveCrossovers() ); // actually, if there happen to be shapes with zero // update area in the maUpdateAreas vector, the diff --git a/slideshow/source/engine/slide/layer.hxx b/slideshow/source/engine/slide/layer.hxx index 531d685a1396..e23be76639e8 100644 --- a/slideshow/source/engine/slide/layer.hxx +++ b/slideshow/source/engine/slide/layer.hxx @@ -31,7 +31,7 @@ #ifndef INCLUDED_SLIDESHOW_LAYER_HXX #define INCLUDED_SLIDESHOW_LAYER_HXX -#include +#include #include #include "view.hxx" @@ -187,7 +187,7 @@ namespace slideshow @return true, if any non-empty addUpdateRange() calls have been made since the last render()/update() call. */ - bool isUpdatePending() const { return !maUpdateAreas.isEmpty(); } + bool isUpdatePending() const { return maUpdateAreas.count()!=0; } /** Update layer bound rect from shape bounds */ @@ -297,7 +297,7 @@ namespace slideshow typedef ::std::vector< ViewEntry > ViewEntryVector; ViewEntryVector maViewEntries; - basegfx::B2DMultiRange maUpdateAreas; + basegfx::B2DPolyRange maUpdateAreas; basegfx::B2DRange maBounds; basegfx::B2DRange maNewBounds; const basegfx::B2DRange maMaxBounds; // maBounds is clipped against this