1 #ifndef __DALI_TOOLKIT_TEXT_LAYOUT_PARAMETERS_H__
2 #define __DALI_TOOLKIT_TEXT_LAYOUT_PARAMETERS_H__
5 * Copyright (c) 2015 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/math/vector2.h>
25 #include <dali-toolkit/internal/text/text-definitions.h>
37 * @brief Struct used to pass parameters.
39 struct LayoutParameters
42 * Constructor with the needed parameters to layout the text.
44 * @param[in] boundingBox The size of the box containing the text.
45 * @param[in] lineBreakInfoBuffer The line break info.
46 * @param[in] wordBreakInfoBuffer The word break info.
47 * @param[in] totalNumberOfGlyphs The number of glyphs.
48 * @param[in] glyphsBuffer A vector with glyphs.
49 * @param[in] glyphsToCharactersBuffer Vector with indices pointing the first character of each glyph.
50 * @param[in] charactersPerGlyphBuffer Vector with the number of characters that forms each glyph.
52 LayoutParameters( const Vector2& boundingBox,
53 const LineBreakInfo* const lineBreakInfoBuffer,
54 const WordBreakInfo* const wordBreakInfoBuffer,
55 Length totalNumberOfGlyphs,
56 const GlyphInfo* const glyphsBuffer,
57 const CharacterIndex* const glyphsToCharactersBuffer,
58 const Length* const charactersPerGlyphBuffer )
59 : boundingBox( boundingBox ),
60 lineBreakInfoBuffer( lineBreakInfoBuffer ),
61 wordBreakInfoBuffer( wordBreakInfoBuffer ),
62 totalNumberOfGlyphs( totalNumberOfGlyphs ),
63 glyphsBuffer( glyphsBuffer ),
64 glyphsToCharactersBuffer( glyphsToCharactersBuffer ),
65 charactersPerGlyphBuffer( charactersPerGlyphBuffer )
69 const LineBreakInfo* const lineBreakInfoBuffer;
70 const WordBreakInfo* const wordBreakInfoBuffer;
71 Length totalNumberOfGlyphs;
72 const GlyphInfo* const glyphsBuffer;
73 const CharacterIndex* const glyphsToCharactersBuffer;
74 const Length* const charactersPerGlyphBuffer;
79 } // namespace Toolkit
83 #endif // __DALI_TOOLKIT_TEXT_LAYOUT_PARAMETERS_H__