Commit ab15b8e1727ef7d2c472987f4872a7bf14419882
[dali_1.1.25] Merge branch 'devel/master'
Change-Id: I2249d61b7cba27d69643444eb8e2e9dbef4a11a6
Showing
6 changed files
with
21 additions
and
21 deletions
demo/dali-table-view.cpp
| @@ -116,11 +116,10 @@ public: | @@ -116,11 +116,10 @@ public: | ||
| 116 | const Vector3& parentSize = inputs[1]->GetVector3(); | 116 | const Vector3& parentSize = inputs[1]->GetVector3(); |
| 117 | const Vector3& childSize = inputs[2]->GetVector3(); | 117 | const Vector3& childSize = inputs[2]->GetVector3(); |
| 118 | 118 | ||
| 119 | - // Wrap bubbles verically. | ||
| 120 | - if( position.y + childSize.y * 0.5f < -parentSize.y * 0.5f ) | ||
| 121 | - { | ||
| 122 | - position.y = parentSize.y * 0.5f + childSize.y * 0.5f; | ||
| 123 | - } | 119 | + // Wrap bubbles vertically. |
| 120 | + float range = parentSize.y + childSize.y; | ||
| 121 | + // This performs a float mod (we don't use fmod as we want the arithmetic modulus as opposed to the remainder). | ||
| 122 | + position.y -= range * ( floor( position.y / range ) + 0.5f ); | ||
| 124 | 123 | ||
| 125 | // Bubbles X position moves parallax to horizontal | 124 | // Bubbles X position moves parallax to horizontal |
| 126 | // panning by a scale factor unique to each bubble. | 125 | // panning by a scale factor unique to each bubble. |
| @@ -698,11 +697,12 @@ void DaliTableView::InitialiseBackgroundActors( Actor actor ) | @@ -698,11 +697,12 @@ void DaliTableView::InitialiseBackgroundActors( Actor actor ) | ||
| 698 | animConstraint.AddSource( Source( mScrollView, ScrollView::Property::SCROLL_POSITION ) ); | 697 | animConstraint.AddSource( Source( mScrollView, ScrollView::Property::SCROLL_POSITION ) ); |
| 699 | animConstraint.AddSource( Dali::ParentSource( Dali::Actor::Property::SIZE ) ); | 698 | animConstraint.AddSource( Dali::ParentSource( Dali::Actor::Property::SIZE ) ); |
| 700 | animConstraint.AddSource( Dali::LocalSource( Dali::Actor::Property::SIZE ) ); | 699 | animConstraint.AddSource( Dali::LocalSource( Dali::Actor::Property::SIZE ) ); |
| 700 | + animConstraint.SetRemoveAction( Constraint::Discard ); | ||
| 701 | animConstraint.Apply(); | 701 | animConstraint.Apply(); |
| 702 | 702 | ||
| 703 | // Kickoff animation | 703 | // Kickoff animation |
| 704 | - Animation animation = Animation::New( Random::Range( 40.0f, 80.0f ) ); | ||
| 705 | - animation.AnimateBy( Property( child, Actor::Property::POSITION ), Vector3( 0.0f, -1.0f, 0.0f ), AlphaFunction::LINEAR ); | 704 | + Animation animation = Animation::New( Random::Range( 30.0f, 160.0f ) ); |
| 705 | + animation.AnimateBy( Property( child, Actor::Property::POSITION ), Vector3( 0.0f, -2000.0f, 0.0f ), AlphaFunction::LINEAR ); | ||
| 706 | animation.SetLooping( true ); | 706 | animation.SetLooping( true ); |
| 707 | animation.Play(); | 707 | animation.Play(); |
| 708 | mBackgroundAnimations.push_back( animation ); | 708 | mBackgroundAnimations.push_back( animation ); |
examples/cube-transition-effect/cube-transition-effect-example.cpp
| @@ -260,7 +260,7 @@ void CubeTransitionApp::OnInit( Application& application ) | @@ -260,7 +260,7 @@ void CubeTransitionApp::OnInit( Application& application ) | ||
| 260 | mCubeWaveEffect.TransitionCompletedSignal().Connect(this, &CubeTransitionApp::OnTransitionCompleted); | 260 | mCubeWaveEffect.TransitionCompletedSignal().Connect(this, &CubeTransitionApp::OnTransitionCompleted); |
| 261 | 261 | ||
| 262 | mCubeWaveEffect.SetSize( mViewSize ); | 262 | mCubeWaveEffect.SetSize( mViewSize ); |
| 263 | - mCubeWaveEffect.SetPositionInheritanceMode( USE_PARENT_POSITION ); | 263 | + mCubeWaveEffect.SetParentOrigin( ParentOrigin::CENTER ); |
| 264 | mCubeWaveEffect.SetCurrentImage( mCurrentImage ); | 264 | mCubeWaveEffect.SetCurrentImage( mCurrentImage ); |
| 265 | 265 | ||
| 266 | // use big cubes | 266 | // use big cubes |
| @@ -270,7 +270,7 @@ void CubeTransitionApp::OnInit( Application& application ) | @@ -270,7 +270,7 @@ void CubeTransitionApp::OnInit( Application& application ) | ||
| 270 | mCubeCrossEffect.TransitionCompletedSignal().Connect(this, &CubeTransitionApp::OnTransitionCompleted); | 270 | mCubeCrossEffect.TransitionCompletedSignal().Connect(this, &CubeTransitionApp::OnTransitionCompleted); |
| 271 | 271 | ||
| 272 | mCubeCrossEffect.SetSize( mViewSize ); | 272 | mCubeCrossEffect.SetSize( mViewSize ); |
| 273 | - mCubeCrossEffect.SetPositionInheritanceMode( USE_PARENT_POSITION ); | 273 | + mCubeCrossEffect.SetParentOrigin( ParentOrigin::CENTER ); |
| 274 | mCubeCrossEffect.SetCurrentImage( mCurrentImage ); | 274 | mCubeCrossEffect.SetCurrentImage( mCurrentImage ); |
| 275 | 275 | ||
| 276 | mCubeFoldEffect = Toolkit::CubeTransitionFoldEffect::New( NUM_ROWS_FOLD, NUM_COLUMNS_FOLD ); | 276 | mCubeFoldEffect = Toolkit::CubeTransitionFoldEffect::New( NUM_ROWS_FOLD, NUM_COLUMNS_FOLD ); |
| @@ -278,7 +278,7 @@ void CubeTransitionApp::OnInit( Application& application ) | @@ -278,7 +278,7 @@ void CubeTransitionApp::OnInit( Application& application ) | ||
| 278 | mCubeFoldEffect.TransitionCompletedSignal().Connect(this, &CubeTransitionApp::OnTransitionCompleted); | 278 | mCubeFoldEffect.TransitionCompletedSignal().Connect(this, &CubeTransitionApp::OnTransitionCompleted); |
| 279 | 279 | ||
| 280 | mCubeFoldEffect.SetSize( mViewSize ); | 280 | mCubeFoldEffect.SetSize( mViewSize ); |
| 281 | - mCubeFoldEffect.SetPositionInheritanceMode( USE_PARENT_POSITION ); | 281 | + mCubeFoldEffect.SetParentOrigin( ParentOrigin::CENTER ); |
| 282 | mCubeFoldEffect.SetCurrentImage( mCurrentImage ); | 282 | mCubeFoldEffect.SetCurrentImage( mCurrentImage ); |
| 283 | 283 | ||
| 284 | mViewTimer = Timer::New( VIEWINGTIME ); | 284 | mViewTimer = Timer::New( VIEWINGTIME ); |
examples/dissolve-effect/dissolve-effect-example.cpp
| @@ -255,12 +255,12 @@ void DissolveEffectApp::OnInit( Application& application ) | @@ -255,12 +255,12 @@ void DissolveEffectApp::OnInit( Application& application ) | ||
| 255 | // Set size to stage size to avoid seeing a black border on transition | 255 | // Set size to stage size to avoid seeing a black border on transition |
| 256 | mParent = Actor::New(); | 256 | mParent = Actor::New(); |
| 257 | mParent.SetSize( Stage::GetCurrent().GetSize() ); | 257 | mParent.SetSize( Stage::GetCurrent().GetSize() ); |
| 258 | - mParent.SetPositionInheritanceMode( USE_PARENT_POSITION ); | 258 | + mParent.SetParentOrigin( ParentOrigin::CENTER ); |
| 259 | mContent.Add( mParent ); | 259 | mContent.Add( mParent ); |
| 260 | 260 | ||
| 261 | // show the first image | 261 | // show the first image |
| 262 | mCurrentImage = Toolkit::ImageView::New( LoadStageFillingImage( IMAGES[mIndex] ) ); | 262 | mCurrentImage = Toolkit::ImageView::New( LoadStageFillingImage( IMAGES[mIndex] ) ); |
| 263 | - mCurrentImage.SetPositionInheritanceMode(USE_PARENT_POSITION_PLUS_LOCAL_POSITION); | 263 | + mCurrentImage.SetParentOrigin( ParentOrigin::CENTER ); |
| 264 | mCurrentImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); | 264 | mCurrentImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); |
| 265 | mCurrentImage.SetSizeScalePolicy( SizeScalePolicy::FIT_WITH_ASPECT_RATIO ); | 265 | mCurrentImage.SetSizeScalePolicy( SizeScalePolicy::FIT_WITH_ASPECT_RATIO ); |
| 266 | mParent.Add( mCurrentImage ); | 266 | mParent.Add( mCurrentImage ); |
| @@ -293,7 +293,7 @@ void DissolveEffectApp::OnPanGesture( Actor actor, const PanGesture& gesture ) | @@ -293,7 +293,7 @@ void DissolveEffectApp::OnPanGesture( Actor actor, const PanGesture& gesture ) | ||
| 293 | 293 | ||
| 294 | Image image = LoadStageFillingImage( IMAGES[ mIndex ] ); | 294 | Image image = LoadStageFillingImage( IMAGES[ mIndex ] ); |
| 295 | mNextImage = Toolkit::ImageView::New( image ); | 295 | mNextImage = Toolkit::ImageView::New( image ); |
| 296 | - mNextImage.SetPositionInheritanceMode(USE_PARENT_POSITION_PLUS_LOCAL_POSITION); | 296 | + mNextImage.SetParentOrigin( ParentOrigin::CENTER ); |
| 297 | mNextImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); | 297 | mNextImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); |
| 298 | mNextImage.SetSizeScalePolicy( SizeScalePolicy::FIT_WITH_ASPECT_RATIO ); | 298 | mNextImage.SetSizeScalePolicy( SizeScalePolicy::FIT_WITH_ASPECT_RATIO ); |
| 299 | mNextImage.SetZ(INITIAL_DEPTH); | 299 | mNextImage.SetZ(INITIAL_DEPTH); |
| @@ -406,7 +406,7 @@ bool DissolveEffectApp::OnTimerTick() | @@ -406,7 +406,7 @@ bool DissolveEffectApp::OnTimerTick() | ||
| 406 | mIndex = (mIndex + 1)%NUM_IMAGES; | 406 | mIndex = (mIndex + 1)%NUM_IMAGES; |
| 407 | Image image = LoadStageFillingImage( IMAGES[ mIndex ] ); | 407 | Image image = LoadStageFillingImage( IMAGES[ mIndex ] ); |
| 408 | mNextImage = Toolkit::ImageView::New( image ); | 408 | mNextImage = Toolkit::ImageView::New( image ); |
| 409 | - mNextImage.SetPositionInheritanceMode(USE_PARENT_POSITION_PLUS_LOCAL_POSITION); | 409 | + mNextImage.SetParentOrigin( ParentOrigin::CENTER ); |
| 410 | mNextImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); | 410 | mNextImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); |
| 411 | mNextImage.SetSizeScalePolicy( SizeScalePolicy::FIT_WITH_ASPECT_RATIO ); | 411 | mNextImage.SetSizeScalePolicy( SizeScalePolicy::FIT_WITH_ASPECT_RATIO ); |
| 412 | mNextImage.SetZ(INITIAL_DEPTH); | 412 | mNextImage.SetZ(INITIAL_DEPTH); |
examples/radial-menu/radial-menu-example.cpp
| @@ -175,12 +175,12 @@ void RadialMenuExample::OnInit(Application& app) | @@ -175,12 +175,12 @@ void RadialMenuExample::OnInit(Application& app) | ||
| 175 | Image dial = ResourceImage::New( TEST_DIAL_FILENAME ); | 175 | Image dial = ResourceImage::New( TEST_DIAL_FILENAME ); |
| 176 | mDialView = ImageView::New( dial ); | 176 | mDialView = ImageView::New( dial ); |
| 177 | mDialView.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS ); | 177 | mDialView.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS ); |
| 178 | - mDialView.SetPositionInheritanceMode(USE_PARENT_POSITION); | 178 | + mDialView.SetParentOrigin( ParentOrigin::CENTER ); |
| 179 | mDialView.SetScale(scale); | 179 | mDialView.SetScale(scale); |
| 180 | Layer dialLayer = Layer::New(); | 180 | Layer dialLayer = Layer::New(); |
| 181 | 181 | ||
| 182 | dialLayer.Add( mDialView ); | 182 | dialLayer.Add( mDialView ); |
| 183 | - dialLayer.SetPositionInheritanceMode(USE_PARENT_POSITION); | 183 | + dialLayer.SetParentOrigin( ParentOrigin::CENTER ); |
| 184 | dialLayer.SetSize(stage.GetSize()); | 184 | dialLayer.SetSize(stage.GetSize()); |
| 185 | mContents.Add(dialLayer); | 185 | mContents.Add(dialLayer); |
| 186 | 186 | ||
| @@ -271,10 +271,10 @@ RadialSweepView RadialMenuExample::CreateSweepView( std::string imageName, | @@ -271,10 +271,10 @@ RadialSweepView RadialMenuExample::CreateSweepView( std::string imageName, | ||
| 271 | radialSweepView.SetFinalSector( Degree(359.999f) ); | 271 | radialSweepView.SetFinalSector( Degree(359.999f) ); |
| 272 | radialSweepView.SetSize( Stage::GetCurrent().GetSize()); | 272 | radialSweepView.SetSize( Stage::GetCurrent().GetSize()); |
| 273 | radialSweepView.SetEasingFunction( Dali::AlphaFunction::EASE_IN_OUT ); | 273 | radialSweepView.SetEasingFunction( Dali::AlphaFunction::EASE_IN_OUT ); |
| 274 | - radialSweepView.SetPositionInheritanceMode(USE_PARENT_POSITION); | 274 | + radialSweepView.SetParentOrigin( ParentOrigin::CENTER ); |
| 275 | mContents.Add(radialSweepView); | 275 | mContents.Add(radialSweepView); |
| 276 | radialSweepView.Add( mImageView ); | 276 | radialSweepView.Add( mImageView ); |
| 277 | - mImageView.SetPositionInheritanceMode(USE_PARENT_POSITION); | 277 | + mImageView.SetParentOrigin( ParentOrigin::CENTER ); |
| 278 | 278 | ||
| 279 | return radialSweepView; | 279 | return radialSweepView; |
| 280 | } | 280 | } |
examples/radial-menu/radial-sweep-view-impl.cpp
| @@ -223,7 +223,7 @@ void RadialSweepViewImpl::Add(Actor actor) | @@ -223,7 +223,7 @@ void RadialSweepViewImpl::Add(Actor actor) | ||
| 223 | mLayer = Layer::New(); | 223 | mLayer = Layer::New(); |
| 224 | Self().Add(mLayer); | 224 | Self().Add(mLayer); |
| 225 | mLayer.SetSize( Stage::GetCurrent().GetSize() ); | 225 | mLayer.SetSize( Stage::GetCurrent().GetSize() ); |
| 226 | - mLayer.SetPositionInheritanceMode(USE_PARENT_POSITION); | 226 | + mLayer.SetParentOrigin( ParentOrigin::CENTER ); |
| 227 | } | 227 | } |
| 228 | 228 | ||
| 229 | mLayer.Add(actor); | 229 | mLayer.Add(actor); |
| @@ -362,5 +362,5 @@ void RadialSweepViewImpl::CreateStencil( Radian initialSector ) | @@ -362,5 +362,5 @@ void RadialSweepViewImpl::CreateStencil( Radian initialSector ) | ||
| 362 | mRotationAngleIndex = mStencilActor.RegisterProperty("uRotationAngle", initialSector.radian); | 362 | mRotationAngleIndex = mStencilActor.RegisterProperty("uRotationAngle", initialSector.radian); |
| 363 | 363 | ||
| 364 | mStencilActor.SetDrawMode( DrawMode::STENCIL ); | 364 | mStencilActor.SetDrawMode( DrawMode::STENCIL ); |
| 365 | - mStencilActor.SetPositionInheritanceMode(USE_PARENT_POSITION); | 365 | + mStencilActor.SetParentOrigin( ParentOrigin::CENTER ); |
| 366 | } | 366 | } |
packaging/com.samsung.dali-demo.spec
| @@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
| 2 | 2 | ||
| 3 | Name: com.samsung.dali-demo | 3 | Name: com.samsung.dali-demo |
| 4 | Summary: The OpenGLES Canvas Core Demo | 4 | Summary: The OpenGLES Canvas Core Demo |
| 5 | -Version: 1.1.24 | 5 | +Version: 1.1.25 |
| 6 | Release: 1 | 6 | Release: 1 |
| 7 | Group: System/Libraries | 7 | Group: System/Libraries |
| 8 | License: Apache-2.0 | 8 | License: Apache-2.0 |