1 #ifndef DALI_INTERNAL_TEXT_ABSTRACTION_TEXT_RENDERER_IMPL_H
2 #define DALI_INTERNAL_TEXT_ABSTRACTION_TEXT_RENDERER_IMPL_H
5 * Copyright (c) 2019 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>
30 namespace TextAbstraction
37 * Implementation of the TextRenderer
39 class TextRenderer : public BaseObject
54 * @copydoc Dali::TextRenderer::Get()
56 static TextAbstraction::TextRenderer Get();
59 * @copydoc Dali::TextRenderer::Render()
61 Devel::PixelBuffer Render(const TextAbstraction::TextRenderer::Parameters& parameters);
65 // Undefined copy constructor.
66 TextRenderer(const TextRenderer&);
68 // Undefined assignment constructor.
69 TextRenderer& operator=(const TextRenderer&);
71 }; // class TextRenderer
73 } // namespace Internal
75 } // namespace TextAbstraction
77 inline static TextAbstraction::Internal::TextRenderer& GetImplementation(TextAbstraction::TextRenderer& textRenderer)
79 DALI_ASSERT_ALWAYS(textRenderer && "textRenderer handle is empty");
80 BaseObject& handle = textRenderer.GetBaseObject();
81 return static_cast<TextAbstraction::Internal::TextRenderer&>(handle);
84 inline static const TextAbstraction::Internal::TextRenderer& GetImplementation(const TextAbstraction::TextRenderer& textRenderer)
86 DALI_ASSERT_ALWAYS(textRenderer && "textRenderer handle is empty");
87 const BaseObject& handle = textRenderer.GetBaseObject();
88 return static_cast<const TextAbstraction::Internal::TextRenderer&>(handle);
93 #endif // DALI_INTERNAL_TEXT_ABSTRACTION_TEXT_RENDERER_IMPL_H