2 * Copyright (c) 2021 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/internal/canvas-renderer/common/drawable-factory.h>
20 #include <dali/internal/canvas-renderer/common/drawable-impl.h>
28 Drawable::Drawable() = default;
38 void Drawable::Create()
42 pImpl = Internal::Adaptor::DrawableFactory::New();
46 bool Drawable::SetOpacity(float opacity)
52 return pImpl->SetOpacity(opacity);
55 float Drawable::GetOpacity() const
61 return pImpl->GetOpacity();
64 bool Drawable::Rotate(Degree degree)
70 return pImpl->Rotate(degree);
73 bool Drawable::Scale(float factor)
79 return pImpl->Scale(factor);
82 bool Drawable::Translate(Vector2 translate)
88 return pImpl->Translate(translate);
91 bool Drawable::Transform(const Dali::Matrix3& matrix)
97 return pImpl->Transform(matrix);
100 Rect<float> Drawable::GetBoundingBox() const
104 return Rect<float>(0, 0, 0, 0);
106 return pImpl->GetBoundingBox();
109 void Drawable::SetDrawableAdded(bool added)
115 pImpl->SetDrawableAdded(added);
118 void* Drawable::GetObject() const
124 return pImpl->GetObject();
127 void Drawable::SetObject(const void* object)
133 pImpl->SetObject(object);
136 void Drawable::SetChanged(bool changed)
142 pImpl->SetChanged(changed);
145 bool Drawable::GetChanged() const
151 return pImpl->GetChanged();
154 Dali::Internal::Adaptor::Drawable* Drawable::GetImplementation()
159 } // namespace Adaptor
161 } // namespace Internal