From 490cab0539660aa8e1b51f0555b890f69940c04d Mon Sep 17 00:00:00 2001 From: Sarper Akdemir Date: Wed, 26 Aug 2020 21:18:19 +0300 Subject: tdf#136152: make physics animation effects handle animations with jumpy starts fixes the bug where an animation effect doesn't start on it's original location and collides with everything as if it was moving from the original location to wherever the animation effect starts in a single step. Change-Id: Icd2919bcad665f8a1839a57642694d98ff73afca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101425 Tested-by: Jenkins Reviewed-by: Thorsten Behrens --- slideshow/source/inc/box2dtools.hxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'slideshow/source/inc') diff --git a/slideshow/source/inc/box2dtools.hxx b/slideshow/source/inc/box2dtools.hxx index 6bfc9dfd1b7c..ae9daa5fee35 100644 --- a/slideshow/source/inc/box2dtools.hxx +++ b/slideshow/source/inc/box2dtools.hxx @@ -41,6 +41,7 @@ enum box2DBodyType enum box2DNonsimulatedShapeUpdateType { + BOX2D_UPDATE_POSITION_CHANGE, BOX2D_UPDATE_POSITION, BOX2D_UPDATE_ANGLE, BOX2D_UPDATE_SIZE, @@ -181,6 +182,9 @@ private: void queueShapeVisibilityUpdate(const css::uno::Reference& xShape, const bool bVisibility); + void queueShapePositionUpdate(const css::uno::Reference& xShape, + const ::basegfx::B2DPoint& rOutPos); + public: box2DWorld(const ::basegfx::B2DVector& rSlideSize); ~box2DWorld(); @@ -250,11 +254,13 @@ public: void queueShapeAnimationUpdate(const css::uno::Reference& xShape, const slideshow::internal::ShapeAttributeLayerSharedPtr& pAttrLayer, - const slideshow::internal::AttributeType eAttrType); + const slideshow::internal::AttributeType eAttrType, + const bool bIsFirstUpdate); void queueShapePathAnimationUpdate( const css::uno::Reference& xShape, - const slideshow::internal::ShapeAttributeLayerSharedPtr& pAttrLayer); + const slideshow::internal::ShapeAttributeLayerSharedPtr& pAttrLayer, + const bool bIsFirstUpdate); void queueShapeAnimationEndUpdate(const css::uno::Reference& xShape, const slideshow::internal::AttributeType eAttrType); -- cgit