summaryrefslogtreecommitdiff
path: root/slideshow
diff options
context:
space:
mode:
authorthb <thb@openoffice.org>2009-10-16 00:57:35 +0200
committerthb <thb@openoffice.org>2009-10-16 00:57:35 +0200
commitf2100460c15e58521c20d6cc75fbf3713631d408 (patch)
tree86206d0be9f28bf0854a10a8ba71481acb18c3b4 /slideshow
parent4a30b933fae5b515bcefda592f5de682ba2526de (diff)
#i105939# Adds clip state handling class to basegfx; makes use of that also from slideshow
Diffstat (limited to 'slideshow')
-rw-r--r--slideshow/source/engine/slide/layer.cxx11
-rw-r--r--slideshow/source/engine/slide/layer.hxx6
2 files changed, 9 insertions, 8 deletions
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 <basegfx/range/b2drange.hxx>
#include <basegfx/range/b1drange.hxx>
-#include <basegfx/range/b2dmultirange.hxx>
+#include <basegfx/range/b2dpolyrange.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
@@ -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 <basegfx/range/b2dmultirange.hxx>
+#include <basegfx/range/b2dpolyrange.hxx>
#include <cppcanvas/spritecanvas.hxx>
#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