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.
19 #include <dali-toolkit/devel-api/controls/bubble-effect/bubble-emitter.h>
22 #include <dali-toolkit/internal/controls/bubble-effect/bubble-emitter-impl.h>
28 BubbleEmitter::BubbleEmitter()
32 BubbleEmitter::~BubbleEmitter()
36 BubbleEmitter::BubbleEmitter(Internal::BubbleEmitter& implementation)
37 : Control(implementation)
41 BubbleEmitter::BubbleEmitter(Dali::Internal::CustomActor* internal)
44 VerifyCustomActorPointer<Internal::BubbleEmitter>(internal);
47 BubbleEmitter BubbleEmitter::New(const Vector2& winSize,
48 Dali::Texture shapeTexture,
49 unsigned int maximumNumberOfBubble,
50 const Vector2& bubbleSizeRange)
52 return Internal::BubbleEmitter::New(winSize, shapeTexture, maximumNumberOfBubble, bubbleSizeRange);
55 BubbleEmitter::BubbleEmitter(const BubbleEmitter& handle)
60 BubbleEmitter& BubbleEmitter::operator=(const BubbleEmitter& rhs)
64 Control::operator=(rhs);
69 BubbleEmitter BubbleEmitter::DownCast(BaseHandle handle)
71 return Control::DownCast<BubbleEmitter, Internal::BubbleEmitter>(handle);
74 Actor BubbleEmitter::GetRootActor()
76 return GetImpl(*this).GetRootActor();
79 void BubbleEmitter::SetBackground(Dali::Texture bgTexture, const Vector3& hsvDelta)
81 GetImpl(*this).SetBackground(bgTexture, hsvDelta);
84 void BubbleEmitter::SetBubbleShape(Dali::Texture shapeTexture)
86 GetImpl(*this).SetBubbleShape(shapeTexture);
89 void BubbleEmitter::SetBubbleScale(float scale)
91 GetImpl(*this).SetBubbleScale(scale);
94 void BubbleEmitter::SetBubbleDensity(unsigned int density)
96 GetImpl(*this).SetBubbleDensity(density);
99 void BubbleEmitter::EmitBubble(Animation& animation, const Vector2& emitPosition, const Vector2& direction, const Vector2& displacement)
101 GetImpl(*this).EmitBubble(animation, emitPosition, direction, displacement);
104 void BubbleEmitter::Restore()
106 GetImpl(*this).Restore();
109 } // namespace Toolkit