DALi Version 2.2.30
[platform/core/uifw/dali-demo.git] / shared / bubble-animator.cpp
index 5ce8e7c..5344f02 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.\r
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.\r
  *\r
  * Licensed under the Apache License, Version 2.0 (the "License");\r
  * you may not use this file except in compliance with the License.\r
 // CLASS HEADER\r
 #include "bubble-animator.h"\r
 \r
-#include <dali/public-api/animation/constraint.h>\r
-#include <dali/public-api/math/random.h>\r
-#include <dali/public-api/rendering/shader.h>\r
+#include <dali-toolkit/devel-api/shader-effects/distance-field-effect.h>\r
 #include <dali-toolkit/public-api/controls/image-view/image-view.h>\r
 #include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.h>\r
 #include <dali-toolkit/public-api/visuals/image-visual-properties.h>\r
-#include <dali-toolkit/devel-api/shader-effects/distance-field-effect.h>\r
+#include <dali/public-api/animation/constraint.h>\r
+#include <dali/public-api/math/random.h>\r
+#include <dali/public-api/rendering/shader.h>\r
 \r
 using namespace Dali;\r
 using namespace Dali::Toolkit;\r
@@ -32,19 +32,17 @@ using namespace Dali::Toolkit;
 namespace\r
 {\r
 const char* const BUBBLE_COLOR_STYLE_NAME[] =\r
-{\r
-  "BubbleColor1",\r
-  "BubbleColor2",\r
-  "BubbleColor3",\r
-  "BubbleColor4"\r
-};\r
+  {\r
+    "BubbleColor1",\r
+    "BubbleColor2",\r
+    "BubbleColor3",\r
+    "BubbleColor4"};\r
 constexpr int NUMBER_OF_BUBBLE_COLORS(sizeof(BUBBLE_COLOR_STYLE_NAME) / sizeof(BUBBLE_COLOR_STYLE_NAME[0]));\r
 \r
 const char* const SHAPE_IMAGE_TABLE[] =\r
-{\r
-  DEMO_IMAGE_DIR "shape-circle.png",\r
-  DEMO_IMAGE_DIR "shape-bubble.png"\r
-};\r
+  {\r
+    DEMO_IMAGE_DIR "shape-circle.png",\r
+    DEMO_IMAGE_DIR "shape-bubble.png"};\r
 constexpr int NUMBER_OF_SHAPE_IMAGES(sizeof(SHAPE_IMAGE_TABLE) / sizeof(SHAPE_IMAGE_TABLE[0]));\r
 \r
 constexpr int   NUM_BACKGROUND_IMAGES   = 18;\r
@@ -157,7 +155,7 @@ void BubbleAnimator::InitializeBackgroundActors(Dali::Actor actor)
 \r
     // Define bubble horizontal parallax and vertical wrapping\r
     Actor scrollView = mScrollView.GetHandle();\r
-    if( scrollView )\r
+    if(scrollView)\r
     {\r
       Constraint animConstraint = Constraint::New<Vector3>(child, Actor::Property::POSITION, AnimateBubbleConstraint(childPos, Random::Range(-0.85f, 0.25f)));\r
       animConstraint.AddSource(Source(scrollView, ScrollView::Property::SCROLL_POSITION));\r
@@ -174,7 +172,6 @@ void BubbleAnimator::InitializeBackgroundActors(Dali::Actor actor)
     animation.Play();\r
     mBackgroundAnimations.push_back(animation);\r
   }\r
-\r
 }\r
 \r
 void BubbleAnimator::AddBackgroundActors(Actor layer, int count)\r