1 #ifndef DALI_INTERNAL_TEXT_ABSTRACTION_TEXT_RENDERER_IMPL_H
2 #define DALI_INTERNAL_TEXT_ABSTRACTION_TEXT_RENDERER_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/text-abstraction/text-renderer.h>
29 namespace TextAbstraction
34 * Implementation of the TextRenderer
36 class TextRenderer : public BaseObject
50 * @copydoc Dali::TextRenderer::Get()
52 static TextAbstraction::TextRenderer Get();
55 * @copydoc Dali::TextRenderer::Render()
57 Devel::PixelBuffer Render(const TextAbstraction::TextRenderer::Parameters& parameters);
60 // Undefined copy constructor.
61 TextRenderer(const TextRenderer&);
63 // Undefined assignment constructor.
64 TextRenderer& operator=(const TextRenderer&);
66 }; // class TextRenderer
68 } // namespace Internal
70 } // namespace TextAbstraction
72 inline static TextAbstraction::Internal::TextRenderer& GetImplementation(TextAbstraction::TextRenderer& textRenderer)
74 DALI_ASSERT_ALWAYS(textRenderer && "textRenderer handle is empty");
75 BaseObject& handle = textRenderer.GetBaseObject();
76 return static_cast<TextAbstraction::Internal::TextRenderer&>(handle);
79 inline static const TextAbstraction::Internal::TextRenderer& GetImplementation(const TextAbstraction::TextRenderer& textRenderer)
81 DALI_ASSERT_ALWAYS(textRenderer && "textRenderer handle is empty");
82 const BaseObject& handle = textRenderer.GetBaseObject();
83 return static_cast<const TextAbstraction::Internal::TextRenderer&>(handle);
88 #endif // DALI_INTERNAL_TEXT_ABSTRACTION_TEXT_RENDERER_IMPL_H