1 /*
2  * Copyright (c) 2024 Huawei Device Co., Ltd.. All rights reserved.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef ROSEN_MODULES_SPTEXT_PLACEHOLDER_RUN_H
17 #define ROSEN_MODULES_SPTEXT_PLACEHOLDER_RUN_H
18 
19 #include "text_style.h"
20 
21 namespace OHOS {
22 namespace Rosen {
23 namespace SPText {
24 enum class PlaceholderAlignment {
25     BASELINE,
26     ABOVE_BASELINE,
27     BELOW_BASELINE,
28     TOP,
29     BOTTOM,
30     MIDDLE,
31 };
32 
33 class PlaceholderRun {
34 public:
35     PlaceholderRun();
36 
37     PlaceholderRun(double width, double height, PlaceholderAlignment alignment, TextBaseline baseline,
38         double baselineOffset);
39 
40     double width = 0;
41     double height = 0;
42     PlaceholderAlignment alignment = PlaceholderAlignment::BASELINE;
43     TextBaseline baseline = TextBaseline::ALPHABETIC;
44     double baselineOffset = 0;
45 };
46 } // namespace SPText
47 } // namespace Rosen
48 } // namespace OHOS
49 
50 #endif // ROSEN_MODULES_SPTEXT_PLACEHOLDER_RUN_H
51