Updated all files to new format
[platform/core/uifw/dali-demo.git] / examples / color-transition / utils.cpp
index c226bfe..7feb9f5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -16,8 +16,8 @@
  */
 #include "utils.h"
 
-#include <cstdio>
 #include <cstdarg>
+#include <cstdio>
 
 #include <cmath>
 
@@ -32,14 +32,14 @@ Geometry CreateQuadGeometry()
   };
 
   Vertex vertexData[] = {
-    { Vector3(-.5f, .5f, .0f) },
-    { Vector3(.5f, .5f, .0f) },
-    { Vector3(-.5f, -.5f, .0f) },
-    { Vector3(.5f, -.5f, .0f) },
+    {Vector3(-.5f, .5f, .0f)},
+    {Vector3(.5f, .5f, .0f)},
+    {Vector3(-.5f, -.5f, .0f)},
+    {Vector3(.5f, -.5f, .0f)},
   };
 
   VertexBuffer vertexBuffer = VertexBuffer::New(Property::Map()
-    .Add("aPosition", Property::VECTOR3));
+                                                  .Add("aPosition", Property::VECTOR3));
   vertexBuffer.SetData(vertexData, std::extent<decltype(vertexData)>::value);
 
   Geometry geometry = Geometry::New();
@@ -52,17 +52,17 @@ Renderer CreateRenderer(TextureSet textures, Geometry geometry, Shader shader, u
 {
   Renderer renderer = Renderer::New(geometry, shader);
   renderer.SetProperty(Renderer::Property::BLEND_MODE,
-    (options & RendererOptions::BLEND) ? BlendMode::ON : BlendMode::OFF);
+                       (options & RendererOptions::BLEND) ? BlendMode::ON : BlendMode::OFF);
   renderer.SetProperty(Renderer::Property::DEPTH_TEST_MODE,
-    (options & RendererOptions::DEPTH_TEST) ? DepthTestMode::ON : DepthTestMode::OFF);
+                       (options & RendererOptions::DEPTH_TEST) ? DepthTestMode::ON : DepthTestMode::OFF);
   renderer.SetProperty(Renderer::Property::DEPTH_WRITE_MODE,
-    (options & RendererOptions::DEPTH_WRITE) ? DepthWriteMode::ON : DepthWriteMode::OFF);
+                       (options & RendererOptions::DEPTH_WRITE) ? DepthWriteMode::ON : DepthWriteMode::OFF);
 
   int faceCulling = (((options & RendererOptions::CULL_BACK) != 0) << 1) |
-    ((options & RendererOptions::CULL_FRONT) != 0);
+                    ((options & RendererOptions::CULL_FRONT) != 0);
   renderer.SetProperty(Renderer::Property::FACE_CULLING_MODE, faceCulling);
 
-  if (!textures)
+  if(!textures)
   {
     textures = TextureSet::New();
   }
@@ -76,4 +76,3 @@ void CenterActor(Actor actor)
   actor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER);
   actor.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER);
 }
-