1 #ifndef DALI_INTERNAL_UBUNTU_DRAWABLE_IMPL_UBUNTU_H
2 #define DALI_INTERNAL_UBUNTU_DRAWABLE_IMPL_UBUNTU_H
5 * Copyright (c) 2021 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
25 #include <dali/public-api/object/base-object.h>
28 #include <dali/devel-api/adaptor-framework/canvas-renderer-drawable.h>
29 #include <dali/devel-api/adaptor-framework/canvas-renderer.h>
30 #include <dali/internal/canvas-renderer/common/drawable-impl.h>
31 #include <dali/internal/canvas-renderer/ubuntu/canvas-renderer-impl-ubuntu.h>
40 * Dali internal Drawable.
42 class DrawableUbuntu : public Dali::Internal::Adaptor::Drawable
46 * @brief Creates a Drawable object.
47 * @return A pointer to a newly allocated Drawable
49 static DrawableUbuntu* New();
52 * @copydoc Dali::CanvasRenderer::Drawable::SetOpacity()
54 bool SetOpacity(float opacity) override;
57 * @copydoc Dali::CanvasRenderer::Drawable::GetOpacity()
59 float GetOpacity() const override;
62 * @copydoc Dali::CanvasRenderer::Drawable::Rotate()
64 bool Rotate(Degree degree) override;
67 * @copydoc Dali::CanvasRenderer::Drawable::Scale()
69 bool Scale(float factor) override;
72 * @copydoc Dali::CanvasRenderer::Drawable::Translate()
74 bool Translate(Vector2 translate) override;
77 * @copydoc Dali::CanvasRenderer::Drawable::Transform()
79 bool Transform(const Dali::Matrix3& matrix) override;
82 * @copydoc Dali::CanvasRenderer::Drawable::GetBoundingBox()
84 Rect<float> GetBoundingBox() const override;
87 * @copydoc Dali::CanvasRenderer::Drawable::SetClipPath()
89 bool SetClipPath(Dali::CanvasRenderer::Drawable& clip) override;
92 * @copydoc Internal::Adaptor::Drawable::GetCompositionDrawable()
94 Dali::CanvasRenderer::Drawable GetCompositionDrawable() const override;
97 * @copydoc Internal::Adaptor::Drawable::GetCompositionType()
99 CompositionType GetCompositionType() const override;
102 * @copydoc Internal::Adaptor::Drawable::SetAdded()
104 void SetAdded(bool added) override;
107 * @copydoc Internal::Adaptor::Drawable::IsAdded()
109 bool IsAdded() const override;
112 * @copydoc Internal::Adaptor::Drawable::SetObject()
114 void* GetObject() const override;
117 * @copydoc Internal::Adaptor::Drawable::GetObject()
119 void SetObject(const void* object) override;
122 * @copydoc Internal::Adaptor::Drawable::SetChanged()
124 void SetChanged(bool changed) override;
127 * @copydoc Internal::Adaptor::Drawable::GetChanged()
129 bool GetChanged() const override;
132 * @copydoc Internal::Adaptor::Drawable::SetType()
134 void SetType(Types type);
137 * @copydoc Internal::Adaptor::Drawable::GetType()
139 Types GetType() const;
141 DrawableUbuntu(const Drawable&) = delete;
142 DrawableUbuntu& operator=(Drawable&) = delete;
143 DrawableUbuntu(Drawable&&) = delete;
144 DrawableUbuntu& operator=(Drawable&&) = delete;
155 virtual ~DrawableUbuntu() override;
160 Drawable::Types mType;
161 Drawable::CompositionType mCompositionType;
162 Dali::CanvasRenderer::Drawable mCompositionDrawable;
164 #ifdef THORVG_SUPPORT
165 tvg::Paint* mTvgPaint;
169 } // namespace Adaptor
171 } // namespace Internal
175 #endif // DALI_INTERNAL_UBUNTU_DRAWABLE_IMPL_UBUNTU_H