2 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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 #include <dali-toolkit/public-api/controls/bubble-effect/bubble-emitter.h>
20 #include <dali-toolkit/internal/controls/bubble-effect/bubble-emitter-impl.h>
29 BubbleEmitter::BubbleEmitter()
33 BubbleEmitter::~BubbleEmitter()
37 BubbleEmitter::BubbleEmitter( Internal::BubbleEmitter& implementation )
38 : Control( implementation )
42 BubbleEmitter::BubbleEmitter(Dali::Internal::CustomActor* internal)
45 VerifyCustomActorPointer<Internal::BubbleEmitter>( internal );
48 BubbleEmitter BubbleEmitter::New( const Vector2& winSize,
50 unsigned int maximumNumberOfBubble,
51 const Vector2& bubbleSizeRange )
53 return Internal::BubbleEmitter::New( winSize, shapeImage, maximumNumberOfBubble, bubbleSizeRange );
56 BubbleEmitter::BubbleEmitter( const BubbleEmitter& handle )
61 BubbleEmitter& BubbleEmitter::operator=( const BubbleEmitter& rhs )
65 Control::operator=(rhs);
70 BubbleEmitter BubbleEmitter::DownCast( BaseHandle handle )
72 return Control::DownCast<BubbleEmitter, Internal::BubbleEmitter>( handle );
75 Actor BubbleEmitter::GetRootActor()
77 return GetImpl(*this).GetRootActor();
80 void BubbleEmitter::SetBackground( Image bgImage, const Vector3& hsvDelta )
82 GetImpl(*this).SetBackground( bgImage, hsvDelta );
85 void BubbleEmitter::SetShapeImage( Image shapeImage )
87 GetImpl(*this).SetShapeImage( shapeImage );
90 void BubbleEmitter::SetBubbleScale( float scale )
92 GetImpl(*this).SetBubbleScale( scale );
95 void BubbleEmitter::SetBubbleDensity( unsigned int density )
97 GetImpl(*this).SetBubbleDensity( density );
100 void BubbleEmitter::SetBlendMode( bool enable )
102 GetImpl(*this).SetBlendMode( enable );
105 void BubbleEmitter::EmitBubble( Animation& animation, const Vector2& emitPosition, const Vector2& direction, const Vector2& displacement )
107 GetImpl(*this).EmitBubble( animation, emitPosition, direction, displacement );
110 void BubbleEmitter::StartExplosion( float duration, float multiple )
112 GetImpl(*this).StartExplosion( duration, multiple );
115 void BubbleEmitter::Restore()
117 GetImpl(*this).Restore();
120 } // namespace Toolkit