1 #ifndef DALI_TOOLKIT_TEXT_LINE_HELPER_FUNCTIONS_H
2 #define DALI_TOOLKIT_TEXT_LINE_HELPER_FUNCTIONS_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.
23 #include <dali-toolkit/devel-api/text/text-enumerations-devel.h>
24 #include <dali-toolkit/internal/text/line-run.h>
33 * @brief Retrieves the vertical offset to shift text inside line to up by negative value and to down by positive value.
34 * The shifting depends on the vertical line alignment @p verLineAlign and lineSpacing when the lineSpacing is poistive.
35 * When the lineSpacing is negative then ignore @p verLineAlign
36 * @param[in] line the line.
37 * @param[in] line the line.
39 * @return The vertical offset before text.
41 float GetPreOffsetVerticalLineAlignment(const LineRun& line, const Dali::Toolkit::DevelText::VerticalLineAlignment::Type& verLineAlign);
44 * @brief Retrieves the vertical offset to shift the next line to up by negative value and to down by positive value.
45 * The shifting depends on the vertical line alignment @p verLineAlign and lineSpacing when the lineSpacing is poistive.
46 * When the lineSpacing is negative then ignore @p verLineAlign
47 * @param[in] line the line.
48 * @param[in] line the line.
50 * @return The vertical offset after text.
52 float GetPostOffsetVerticalLineAlignment(const LineRun& line, const Dali::Toolkit::DevelText::VerticalLineAlignment::Type& verLineAlign);
55 } // namespace Toolkit
59 #endif // DALI_TOOLKIT_TEXT_LINE_HELPER_FUNCTIONS_H