#i105939# Adds clip state handling class to basegfx; makes use of that also from slideshow
This commit is contained in:
parent
4a30b933fa
commit
f2100460c1
2 changed files with 9 additions and 8 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue