1 #ifndef DALI_INTERNAL_GENERIC_DRAWABLE_IMPL_GENERIC_H
2 #define DALI_INTERNAL_GENERIC_DRAWABLE_IMPL_GENERIC_H
5 * Copyright (c) 2022 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.
22 #include <dali/public-api/object/base-object.h>
25 #include <dali/devel-api/adaptor-framework/canvas-renderer/canvas-renderer-drawable.h>
26 #include <dali/devel-api/adaptor-framework/canvas-renderer/canvas-renderer.h>
27 #include <dali/internal/canvas-renderer/common/drawable-impl.h>
36 * Dali internal Drawable.
38 class DrawableGeneric : public Dali::Internal::Adaptor::Drawable
42 * @brief Creates a Drawable object.
43 * @return A pointer to a newly allocated Drawable
45 static DrawableGeneric* New();
48 * @copydoc Dali::CanvasRenderer::Drawable::SetOpacity()
50 bool SetOpacity(float opacity) override;
53 * @copydoc Dali::CanvasRenderer::Drawable::GetOpacity()
55 float GetOpacity() const override;
58 * @copydoc Dali::CanvasRenderer::Drawable::Rotate()
60 bool Rotate(Degree degree) override;
63 * @copydoc Dali::CanvasRenderer::Drawable::Scale()
65 bool Scale(float factor) override;
68 * @copydoc Dali::CanvasRenderer::Drawable::Translate()
70 bool Translate(Vector2 translate) override;
73 * @copydoc Dali::CanvasRenderer::Drawable::Transform()
75 bool Transform(const Dali::Matrix3& matrix) override;
78 * @copydoc Dali::CanvasRenderer::Drawable::GetBoundingBox()
80 Rect<float> GetBoundingBox() const override;
83 * @copydoc Dali::CanvasRenderer::Drawable::SetClipPath()
85 bool SetClipPath(Dali::CanvasRenderer::Drawable& clip) override;
88 * @copydoc Dali::CanvasRenderer::Drawable::SetMask()
90 bool SetMask(Dali::CanvasRenderer::Drawable& mask, Dali::CanvasRenderer::Drawable::MaskType type) override;
93 * @copydoc Internal::Adaptor::Drawable::GetCompositionDrawable()
95 Dali::CanvasRenderer::Drawable GetCompositionDrawable() const override;
98 * @copydoc Internal::Adaptor::Drawable::GetCompositionType()
100 CompositionType GetCompositionType() const override;
103 * @copydoc Internal::Adaptor::Drawable::SetAdded()
105 void SetAdded(bool added) override;
108 * @copydoc Internal::Adaptor::Drawable::IsAdded()
110 bool IsAdded() const override;
113 * @copydoc Internal::Adaptor::Drawable::SetObject()
115 void SetObject(const void* object) override;
118 * @copydoc Internal::Adaptor::Drawable::GetObject()
120 void* GetObject() const override;
123 * @copydoc Internal::Adaptor::Drawable::SetChanged()
125 void SetChanged(bool changed);
128 * @copydoc Internal::Adaptor::Drawable::GetChanged()
130 bool GetChanged() const;
132 DrawableGeneric(const DrawableGeneric&) = delete;
133 DrawableGeneric& operator=(DrawableGeneric&) = delete;
134 DrawableGeneric(DrawableGeneric&&) = delete;
135 DrawableGeneric& operator=(DrawableGeneric&&) = delete;
146 virtual ~DrawableGeneric() override;
149 } // namespace Adaptor
151 } // namespace Internal
155 #endif // DALI_INTERNAL_GENERIC_DRAWABLE_IMPL_GENERIC_H