1 /* 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 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 C_INCLUDE_DRAWING_TEXT_DECLARATION_H 17 #define C_INCLUDE_DRAWING_TEXT_DECLARATION_H 18 19 /** 20 * @addtogroup Drawing 21 * @{ 22 * 23 * @brief Provides the 2D drawing capability. 24 * 25 * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing 26 * 27 * @since 8 28 * @version 1.0 29 */ 30 31 /** 32 * @file drawing_text_declaration.h 33 * 34 * @brief Declares the data structure related to text in 2D drawing. 35 * 36 * @since 8 37 * @version 1.0 38 */ 39 40 #ifdef __cplusplus 41 extern "C" { 42 #endif 43 44 /** 45 * @brief Defines an <b>OH_Drawing_FontCollection</b>, which is used to load fonts. 46 * 47 * @since 8 48 * @version 1.0 49 */ 50 typedef struct OH_Drawing_FontCollection OH_Drawing_FontCollection; 51 52 /** 53 * @brief Defines an <b>OH_Drawing_Typography</b>, which is used to manage the typography layout and display. 54 * 55 * @since 8 56 * @version 1.0 57 */ 58 typedef struct OH_Drawing_Typography OH_Drawing_Typography; 59 60 /** 61 * @brief Defines an <b>OH_Drawing_LineTypography</b>, which is used to perform line layout. 62 * 63 * @since 14 64 * @version 1.0 65 */ 66 typedef struct OH_Drawing_LineTypography OH_Drawing_LineTypography; 67 68 /** 69 * @brief Defines an <b>OH_Drawing_TextStyle</b>, which is used to manage text colors and decorations. 70 * 71 * @since 8 72 * @version 1.0 73 */ 74 typedef struct OH_Drawing_TextStyle OH_Drawing_TextStyle; 75 76 /** 77 * @brief Defines an <b>OH_Drawing_TypographyStyle</b>, which is used to manage the typography style, 78 * such as the text direction. 79 * 80 * @since 8 81 * @version 1.0 82 */ 83 typedef struct OH_Drawing_TypographyStyle OH_Drawing_TypographyStyle; 84 85 /** 86 * @brief Defines an <b>OH_Drawing_TypographyCreate</b>, which is used to create an <b>OH_Drawing_Typography</b> object. 87 * 88 * @since 8 89 * @version 1.0 90 */ 91 typedef struct OH_Drawing_TypographyCreate OH_Drawing_TypographyCreate; 92 93 /** 94 * @brief Defines an <b>OH_Drawing_TextBox</b>, which is used to create an <b>OH_Drawing_TextBox</b> object. 95 * 96 * @since 11 97 * @version 1.0 98 */ 99 typedef struct OH_Drawing_TextBox OH_Drawing_TextBox; 100 101 /** 102 * @brief Defines an <b>OH_Drawing_PositionAndAffinity</b>, 103 * which is used to create an <b>OH_Drawing_PositionAndAffinity</b> object. 104 * @since 11 105 * @version 1.0 106 */ 107 typedef struct OH_Drawing_PositionAndAffinity OH_Drawing_PositionAndAffinity; 108 109 /** 110 * @brief Defines an <b>OH_Drawing_Range</b>, which is used to create an <b>OH_Drawing_Range</b> object. 111 * 112 * @since 11 113 * @version 1.0 114 */ 115 typedef struct OH_Drawing_Range OH_Drawing_Range; 116 117 /** 118 * @brief Defines an <b>OH_Drawing_FontParser</b>, which is used to parse system font files. 119 * 120 * @since 12 121 * @version 1.0 122 */ 123 typedef struct OH_Drawing_FontParser OH_Drawing_FontParser; 124 125 /** 126 * @brief Defines an <b>OH_Drawing_TextShadow</b>, which is used to create an <b>OH_Drawing_TextShadow</b> object. 127 * 128 * @since 12 129 * @version 1.0 130 */ 131 typedef struct OH_Drawing_TextShadow OH_Drawing_TextShadow; 132 133 /** 134 * @brief Defines an <b>OH_Drawing_TextTab</b>, which is used to create an <b>OH_Drawing_TextTab</b> object. 135 * 136 * @since 14 137 * @version 1.0 138 */ 139 typedef struct OH_Drawing_TextTab OH_Drawing_TextTab; 140 141 /** 142 * @brief Defines an <b>OH_Drawing_TextLine</b>, which is used to manage text line. 143 * 144 * @since 14 145 * @version 1.0 146 */ 147 typedef struct OH_Drawing_TextLine OH_Drawing_TextLine; 148 149 /** 150 * @brief Defines an <b>OH_Drawing_Run</b>, which is used to manage run. 151 * 152 * @since 14 153 * @version 1.0 154 */ 155 typedef struct OH_Drawing_Run OH_Drawing_Run; 156 157 #ifdef __cplusplus 158 } 159 #endif 160 /** @} */ 161 #endif