Update following the changes of blending&culling options
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / controls / bubble-effect / bubble-emitter.cpp
1 /*
2  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  *
16  */
17
18 // CLASS HEADER
19 #include <dali-toolkit/devel-api/controls/bubble-effect/bubble-emitter.h>
20
21 // INTERNAL INCLUDES
22 #include <dali-toolkit/internal/controls/bubble-effect/bubble-emitter-impl.h>
23
24
25 namespace Dali
26 {
27
28 namespace Toolkit
29 {
30
31 BubbleEmitter::BubbleEmitter()
32 {
33 }
34
35 BubbleEmitter::~BubbleEmitter()
36 {
37 }
38
39 BubbleEmitter::BubbleEmitter( Internal::BubbleEmitter& implementation )
40 : Control( implementation )
41 {
42 }
43
44 BubbleEmitter::BubbleEmitter(Dali::Internal::CustomActor* internal)
45 : Control( internal )
46 {
47   VerifyCustomActorPointer<Internal::BubbleEmitter>( internal );
48 }
49
50 BubbleEmitter BubbleEmitter::New( const Vector2& winSize,
51                                   Image shapeImage,
52                                   unsigned int maximumNumberOfBubble,
53                                   const Vector2& bubbleSizeRange )
54 {
55   return Internal::BubbleEmitter::New( winSize, shapeImage, maximumNumberOfBubble, bubbleSizeRange );
56 }
57
58 BubbleEmitter::BubbleEmitter( const BubbleEmitter& handle )
59 : Control( handle )
60 {
61 }
62
63 BubbleEmitter& BubbleEmitter::operator=( const BubbleEmitter& rhs )
64 {
65   if( &rhs != this )
66   {
67     Control::operator=(rhs);
68   }
69   return *this;
70 }
71
72 BubbleEmitter BubbleEmitter::DownCast( BaseHandle handle )
73 {
74   return Control::DownCast<BubbleEmitter, Internal::BubbleEmitter>( handle );
75 }
76
77 Actor BubbleEmitter::GetRootActor()
78 {
79   return GetImpl(*this).GetRootActor();
80 }
81
82 void BubbleEmitter::SetBackground( Image bgImage, const Vector3& hsvDelta )
83 {
84   GetImpl(*this).SetBackground( bgImage, hsvDelta );
85 }
86
87 void BubbleEmitter::SetShapeImage( Image shapeImage )
88 {
89   GetImpl(*this).SetShapeImage( shapeImage );
90 }
91
92 void BubbleEmitter::SetBubbleScale( float scale )
93 {
94   GetImpl(*this).SetBubbleScale( scale );
95 }
96
97 void BubbleEmitter::SetBubbleDensity( unsigned int density )
98 {
99   GetImpl(*this).SetBubbleDensity( density );
100 }
101
102 void BubbleEmitter::EmitBubble( Animation& animation, const Vector2& emitPosition, const Vector2& direction, const Vector2& displacement )
103 {
104   GetImpl(*this).EmitBubble( animation, emitPosition, direction, displacement );
105 }
106
107 void BubbleEmitter::Restore()
108 {
109   GetImpl(*this).Restore();
110 }
111
112 } // namespace Toolkit
113
114 } // namespace Dali