1 #ifndef DALI_INTERNAL_PICTURE_IMPL_H
2 #define DALI_INTERNAL_PICTURE_IMPL_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.
22 #include <dali/public-api/object/base-object.h>
25 #include <dali/devel-api/adaptor-framework/canvas-renderer-picture.h>
26 #include <dali/internal/canvas-renderer/common/drawable-impl.h>
35 * Dali internal Picture.
37 class Picture : public Internal::Adaptor::Drawable
51 * @copydoc Dali::CanvasRenderer::Picture::Load()
53 virtual bool Load(const std::string& url);
56 * @copydoc Dali::CanvasRenderer::Picture::SetSize()
58 virtual bool SetSize(Vector2 size);
61 * @copydoc Dali::CanvasRenderer::Picture::GetSize()
63 virtual Vector2 GetSize() const;
65 Picture(const Picture&) = delete;
66 Picture& operator=(Picture&) = delete;
67 Picture(Picture&&) = delete;
68 Picture& operator=(Picture&&) = delete;
71 } // namespace Adaptor
73 } // namespace Internal
75 inline static Internal::Adaptor::Picture& GetImplementation(Dali::CanvasRenderer::Picture& picture)
77 DALI_ASSERT_ALWAYS(picture && "Picture handle is empty.");
79 BaseObject& handle = picture.GetBaseObject();
81 return static_cast<Internal::Adaptor::Picture&>(handle);
84 inline static const Internal::Adaptor::Picture& GetImplementation(const Dali::CanvasRenderer::Picture& picture)
86 DALI_ASSERT_ALWAYS(picture && "Picture handle is empty.");
88 const BaseObject& handle = picture.GetBaseObject();
90 return static_cast<const Internal::Adaptor::Picture&>(handle);
95 #endif // DALI_INTERNAL_PICTURE_IMPL_H