cbe26d24544e608eba5149f0e868c7f0e3892032
[platform/core/uifw/dali-core.git] / dali / internal / event / text / generator / text-vertex-generator.h
1 #ifndef __DALI_INTERNAL_TEXT_VERTEX_GENERATOR_H__
2 #define __DALI_INTERNAL_TEXT_VERTEX_GENERATOR_H__
3
4 /*
5  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
6  *
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
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22
23 // INTERNAL INCLUDES
24 #include <dali/internal/common/text-array.h>
25 #include <dali/internal/event/text/text-format.h>
26 #include <dali/internal/common/text-vertex-buffer.h>
27 #include <dali/internal/event/text/font-metrics-interface.h>
28 #include <dali/internal/event/text/atlas/atlas-uv-interface.h>
29 #include <dali/internal/event/text/resource/font-id.h>
30
31 namespace Dali
32 {
33
34 namespace Internal
35 {
36
37 /**
38  * Creates the vertex data for a string of text.
39  *
40  */
41 namespace TextVertexGenerator
42 {
43
44 /**
45  * Get the vertex buffer to draw the text.
46  * The caller takes ownership of the buffer and is responsible for
47  * deleting it.
48  * @param[in] text text array
49  * @param[in] format text format
50  * @param[in] metrics interface to get metric information
51  * @param[in] uvInterface interface to get uv co-ordinates of each characters
52  * @param[in] fontId the font id
53  * @return text vertex buffer
54  */
55  TextVertexBuffer* Generate(const TextArray& text,
56                             const TextFormat& format,
57                             const FontMetricsInterface& metrics,
58                             const AtlasUvInterface& uvInterface,
59                             FontId fontId);
60
61
62
63 };
64
65
66
67 } // namespace Internal
68
69 } // namespace Dali
70
71 #endif // __DALI_INTERNAL_TEXT_VERTEX_GENERATOR_H__