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 Dali::CanvasRenderer::Drawable::SetMask()
94 bool SetMask(Dali::CanvasRenderer::Drawable& mask, Dali::CanvasRenderer::Drawable::MaskType type) override;
97 * @copydoc Internal::Adaptor::Drawable::GetCompositionDrawable()
99 Dali::CanvasRenderer::Drawable GetCompositionDrawable() const override;
102 * @copydoc Internal::Adaptor::Drawable::GetCompositionType()
104 CompositionType GetCompositionType() const override;
107 * @copydoc Internal::Adaptor::Drawable::SetAdded()
109 void SetAdded(bool added) override;
112 * @copydoc Internal::Adaptor::Drawable::IsAdded()
114 bool IsAdded() const override;
117 * @copydoc Internal::Adaptor::Drawable::SetObject()
119 void* GetObject() const override;
122 * @copydoc Internal::Adaptor::Drawable::GetObject()
124 void SetObject(const void* object) override;
127 * @copydoc Internal::Adaptor::Drawable::SetChanged()
129 void SetChanged(bool changed) override;
132 * @copydoc Internal::Adaptor::Drawable::GetChanged()
134 bool GetChanged() const override;
137 * @copydoc Internal::Adaptor::Drawable::SetType()
139 void SetType(Types type);
142 * @copydoc Internal::Adaptor::Drawable::GetType()
144 Types GetType() const;
146 DrawableUbuntu(const Drawable&) = delete;
147 DrawableUbuntu& operator=(Drawable&) = delete;
148 DrawableUbuntu(Drawable&&) = delete;
149 DrawableUbuntu& operator=(Drawable&&) = delete;
160 virtual ~DrawableUbuntu() override;
165 Drawable::Types mType;
166 Drawable::CompositionType mCompositionType;
167 Dali::CanvasRenderer::Drawable mCompositionDrawable;
169 #ifdef THORVG_SUPPORT
170 tvg::Paint* mTvgPaint;
174 } // namespace Adaptor
176 } // namespace Internal
180 #endif // DALI_INTERNAL_UBUNTU_DRAWABLE_IMPL_UBUNTU_H