2 * Copyright (c) 2020 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef DALI_DEMO_COLOR_TRANSITION_UTILS_H_
18 #define DALI_DEMO_COLOR_TRANSITION_UTILS_H_
20 #include "dali/public-api/actors/actor.h"
21 #include "dali/public-api/rendering/geometry.h"
22 #include "dali/public-api/rendering/renderer.h"
23 #include "dali/public-api/rendering/texture.h"
25 #define ACTOR_DECL(x) auto x = Dali::Actor::New(); x.SetProperty(Actor::Property::NAME, #x);
28 * @brief Creates a unit quad centered on the origin (i.e. vertex positions
29 * between -.5 and .5).
31 Dali::Geometry CreateQuadGeometry();
33 struct RendererOptions
46 ///@brief Creates a renderer with the given @a textures set, @a geometry, @a shader
47 /// and @a options from above.
48 ///@note Back face culling is on.
49 ///@note If textures is not a valid handle, an empty texture set will be created.
50 Dali::Renderer CreateRenderer(
51 Dali::TextureSet textures,
52 Dali::Geometry geometry,
54 uint32_t options = RendererOptions::NONE);
56 ///@brief Sets @a actor's anchor point and parent origin to center.
57 void CenterActor(Dali::Actor actor);
59 #endif //DALI_DEMO_COLOR_TRANSITION_UTILS_H_