1 #ifndef DALI_INTERNAL_TIZEN_DRAWABLE_IMPL_TIZEN_H
2 #define DALI_INTERNAL_TIZEN_DRAWABLE_IMPL_TIZEN_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/tizen/canvas-renderer-impl-tizen.h>
40 * Dali internal Drawable.
42 class DrawableTizen : public Dali::Internal::Adaptor::Drawable
46 * @brief Creates a Drawable object.
47 * @return A pointer to a newly allocated Drawable
49 static DrawableTizen* 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;
86 * @copydoc Dali::CanvasRenderer::Drawable::SetClipPath()
88 bool SetClipPath(Dali::CanvasRenderer::Drawable& clip) override;
91 * @copydoc Dali::CanvasRenderer::Drawable::SetMask()
93 bool SetMask(Dali::CanvasRenderer::Drawable& mask, Dali::CanvasRenderer::Drawable::MaskType type) override;
96 * @copydoc Internal::Adaptor::Drawable::GetCompositionDrawable()
98 Dali::CanvasRenderer::Drawable GetCompositionDrawable() const override;
101 * @copydoc Internal::Adaptor::Drawable::GetCompositionType()
103 CompositionType GetCompositionType() const override;
106 * @copydoc Internal::Adaptor::Drawable::SetAdded()
108 void SetAdded(bool added) override;
111 * @copydoc Internal::Adaptor::Drawable::IsAdded()
113 bool IsAdded() const override;
116 * @copydoc Internal::Adaptor::Drawable::SetObject()
118 void* GetObject() const override;
121 * @copydoc Internal::Adaptor::Drawable::GetObject()
123 void SetObject(const void* object) override;
126 * @copydoc Internal::Adaptor::Drawable::SetChanged()
128 void SetChanged(bool changed) override;
131 * @copydoc Internal::Adaptor::Drawable::GetChanged()
133 bool GetChanged() const override;
136 * @copydoc Internal::Adaptor::Drawable::SetType()
138 void SetType(Types type);
141 * @copydoc Internal::Adaptor::Drawable::GetType()
143 Types GetType() const;
145 DrawableTizen(const Drawable&) = delete;
146 DrawableTizen& operator=(Drawable&) = delete;
147 DrawableTizen(Drawable&&) = delete;
148 DrawableTizen& operator=(Drawable&&) = delete;
159 virtual ~DrawableTizen() override;
164 Drawable::Types mType;
165 Drawable::CompositionType mCompositionType;
166 Dali::CanvasRenderer::Drawable mCompositionDrawable;
168 #ifdef THORVG_SUPPORT
169 tvg::Paint* mTvgPaint;
173 } // namespace Adaptor
175 } // namespace Internal
179 #endif // DALI_INTERNAL_TIZEN_DRAWABLE_IMPL_TIZEN_H