summaryrefslogtreecommitdiff
path: root/slideshow
diff options
context:
space:
mode:
authorSiqi LIU <me@siqi.fr>2013-08-04 14:17:55 +0200
committerSiqi LIU <me@siqi.fr>2013-08-04 14:18:10 +0200
commit731f3d986eb13468681ae9a7ef491897a078f675 (patch)
tree5f3fd39a1efa054e5ece94e51b1ec8bbbb94da8b /slideshow
parentdffc87dd13daf9a2f2f629cd50558995aadc4d19 (diff)
request immdiateupdate for pointerSymbol, but bad performance
Change-Id: I943019f6f6c6aaddeb40bf7f56bd0ffefff8a6b3
Diffstat (limited to 'slideshow')
-rw-r--r--slideshow/source/engine/pointersymbol.cxx16
-rw-r--r--slideshow/source/engine/slideshowimpl.cxx2
2 files changed, 12 insertions, 6 deletions
diff --git a/slideshow/source/engine/pointersymbol.cxx b/slideshow/source/engine/pointersymbol.cxx
index 8629ea74f413..d0e7fce6e2eb 100644
--- a/slideshow/source/engine/pointersymbol.cxx
+++ b/slideshow/source/engine/pointersymbol.cxx
@@ -119,11 +119,15 @@ basegfx::B2DPoint PointerSymbol::calcSpritePos(
const uno::Reference<rendering::XBitmap> xBitmap( rView->getCanvas()->getUNOCanvas(),
uno::UNO_QUERY_THROW );
const geometry::IntegerSize2D realSize( xBitmap->getSize() );
- return basegfx::B2DPoint(
+
+ basegfx::B2DPoint newPos(
// pos.X pos.Y are given in 0..1, beginning from the upper left corner of the currentSlide.
- std::min<sal_Int32>( realSize.Width * pos.X, LEFT_BORDER_SPACE ),
- std::max<sal_Int32>( 0, realSize.Height * (1-pos.Y) - mxBitmap->getSize().Height
- - LOWER_BORDER_SPACE ) );
+ realSize.Width * pos.X,
+ realSize.Height * pos.Y);
+
+ // std::cerr << "calcSpritePos : (" << newPos.getX() << ","<<newPos.getY() << ")" << std::endl;
+
+ return newPos;
}
void PointerSymbol::viewAdded( const UnoViewSharedPtr& rView )
@@ -215,9 +219,11 @@ void PointerSymbol::viewsChanged(const ::com::sun::star::geometry::RealPoint2D p
ViewsVecT::const_iterator const aEnd ( maViews.end() );
while( aIter != aEnd )
{
- if( aIter->second )
+ if( aIter->second ) {
aIter->second->movePixel(
calcSpritePos( aIter->first, pos ));
+ mrScreenUpdater.requestImmediateUpdate();
+ }
++aIter;
}
}
diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx
index db207a892adb..ded62b4ca970 100644
--- a/slideshow/source/engine/slideshowimpl.cxx
+++ b/slideshow/source/engine/slideshowimpl.cxx
@@ -1809,7 +1809,7 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
if (! (rProperty.Value >>= pos))
return false;
- std::cerr<<"Received pos at :(" << pos.X << ","<<pos.Y << ")" << std::endl;
+ // std::cerr<<"Received pos at :(" << pos.X << ","<<pos.Y << ")" << std::endl;
mpPointerSymbol->viewsChanged(pos);
}