X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Fline-run.h;h=52c47a13e835b61dbdea5ad2aba25c60636f3f51;hp=ad25d594e64a234348ddab1fdc400b55206cfd52;hb=7c13cc0c065ae22e7ad0deaea4f56730ff050c5c;hpb=830f03638ec6ecd3b12ba3d9eb6419fdb3a3db09 diff --git a/dali-toolkit/internal/text/line-run.h b/dali-toolkit/internal/text/line-run.h index ad25d59..52c47a1 100644 --- a/dali-toolkit/internal/text/line-run.h +++ b/dali-toolkit/internal/text/line-run.h @@ -1,8 +1,8 @@ -#ifndef __DALI_TOOLKIT_TEXT_LINE_RUN_H__ -#define __DALI_TOOLKIT_TEXT_LINE_RUN_H__ +#ifndef DALI_TOOLKIT_TEXT_LINE_RUN_H +#define DALI_TOOLKIT_TEXT_LINE_RUN_H /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2021 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,31 +19,46 @@ */ // INTERNAL INCLUDES -#include +#include +#include namespace Dali { - namespace Toolkit { - namespace Text { - /** * @brief LineRun */ struct LineRun { - GlyphIndex glyphIndex; ///< The initial glyph index. - Length numberOfGlyphs; ///< The number of characters of the run. - // VCC More info to be added. i.e the size, ... + GlyphRun glyphRun; ///< The initial glyph index and the number of glyphs of the run. + CharacterRun characterRun; ///< The initial character index and the number of characters of the run. + float width; ///< The line's width. + float ascender; ///< The line's ascender. + float descender; ///< The line's descender. + float extraLength; ///< The length of the white spaces at the end of the line. + float alignmentOffset; ///< The horizontal alignment offset. + float lineSpacing; ///< The line's spacing + CharacterDirection direction : 1; ///< Direction of the first character of the paragraph. + bool ellipsis : 1; ///< Wheter ellipsis is added to the line. + bool isSplitToTwoHalves; ///< Whether the second half is defined. When split line to two halves to set Ellipsis in the MIDDLE of line. The second half is the second part of line after Ellipsis. + GlyphRun glyphRunSecondHalf; ///< The initial glyph index and the number of glyphs of the run for the second half of line. + CharacterRun characterRunForSecondHalfLine; ///< The initial character index and the number of characters of the run for the second half of line. }; +/** + * @brief Get the line height for the specified line run. + * + * @param[in] lineRun The line runs to get the height for. + */ +float GetLineHeight(const LineRun lineRun); + } // namespace Text } // namespace Toolkit } // namespace Dali -#endif // __DALI_TOOLKIT_TEXT_LINE_RUN_H__ +#endif // DALI_TOOLKIT_TEXT_LINE_RUN_H