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 void Drawable::SetDrawableAdded(bool added)
106 pImpl->SetDrawableAdded(added);
109 void* Drawable::GetObject() const
115 return pImpl->GetObject();
118 void Drawable::SetObject(const void* object)
124 pImpl->SetObject(object);
127 void Drawable::SetChanged(bool changed)
133 pImpl->SetChanged(changed);
136 bool Drawable::GetChanged() const
142 return pImpl->GetChanged();
145 Dali::Internal::Adaptor::Drawable* Drawable::GetImplementation()
150 } // namespace Adaptor
152 } // namespace Internal