From 1f05612c081e0cf2b88e822ffc9de15c156dfb0c Mon Sep 17 00:00:00 2001 From: David Steele Date: Tue, 6 Dec 2022 16:55:54 +0000 Subject: [PATCH] Updated update area of motion blur actors Change-Id: I00569640bd616053b8473036e276d3d19e1c92be --- examples/motion-blur/motion-blur-example.cpp | 4 +++- examples/motion-stretch/motion-stretch-example.cpp | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/motion-blur/motion-blur-example.cpp b/examples/motion-blur/motion-blur-example.cpp index 6926f42..c171329 100644 --- a/examples/motion-blur/motion-blur-example.cpp +++ b/examples/motion-blur/motion-blur-example.cpp @@ -201,11 +201,13 @@ public: mMotionBlurActorUpdateSize = Size(std::max(mMotionBlurActorSize.x, mMotionBlurActorSize.y), std::max(mMotionBlurActorSize.x, mMotionBlurActorSize.y)); mMotionBlurActorSize = Size(std::min(mMotionBlurActorSize.x, mMotionBlurActorSize.y), std::min(mMotionBlurActorSize.x, mMotionBlurActorSize.y)); + mMotionBlurActorUpdateSize = mMotionBlurActorSize * 1.25f; + mMotionBlurEffect = CreateMotionBlurEffect(); mMotionBlurImageView = ImageView::New(); SetImageFittedInBox(mMotionBlurImageView, mMotionBlurEffect, MOTION_BLUR_ACTOR_IMAGE1, mMotionBlurActorSize.x, mMotionBlurActorSize.y); mMotionBlurImageView.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER); - mMotionBlurImageView.SetProperty(Actor::Property::SIZE, mMotionBlurActorUpdateSize); + mMotionBlurImageView.SetProperty(Actor::Property::SIZE, mMotionBlurActorSize); mMotionBlurImageView.SetProperty(Actor::Property::UPDATE_AREA_HINT, Vector4(0, 0, mMotionBlurActorUpdateSize.width, mMotionBlurActorUpdateSize.height)); mContentLayer.Add(mMotionBlurImageView); diff --git a/examples/motion-stretch/motion-stretch-example.cpp b/examples/motion-stretch/motion-stretch-example.cpp index 9b7e1b5..615fdea 100644 --- a/examples/motion-stretch/motion-stretch-example.cpp +++ b/examples/motion-stretch/motion-stretch-example.cpp @@ -182,7 +182,8 @@ public: mMotionStretchImageView.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER); mMotionStretchImageView.SetProperty(Actor::Property::SIZE, Vector2(MOTION_STRETCH_ACTOR_WIDTH, MOTION_STRETCH_ACTOR_HEIGHT)); // Add stretch padding - mMotionStretchImageView.SetProperty(Actor::Property::UPDATE_AREA_HINT, Vector4(0, 0, MOTION_STRETCH_ACTOR_WIDTH + 32, MOTION_STRETCH_ACTOR_HEIGHT + 32)); + + mMotionStretchImageView.SetProperty(Actor::Property::UPDATE_AREA_HINT, Vector4(0, 0, MOTION_STRETCH_ACTOR_WIDTH, MOTION_STRETCH_ACTOR_HEIGHT)*1.25f); mContentLayer.Add(mMotionStretchImageView); -- 2.7.4