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 * @kit ArkGraphics2D 37 * @library libnative_drawing.so 38 * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing 39 * @since 8 40 * @version 1.0 41 */ 42 43 #ifdef __cplusplus 44 extern "C" { 45 #endif 46 47 /** 48 * @brief Defines an <b>OH_Drawing_FontCollection</b>, which is used to load fonts. 49 * 50 * @since 8 51 * @version 1.0 52 */ 53 typedef struct OH_Drawing_FontCollection OH_Drawing_FontCollection; 54 55 /** 56 * @brief Defines an <b>OH_Drawing_Typography</b>, which is used to manage the typography layout and display. 57 * 58 * @since 8 59 * @version 1.0 60 */ 61 typedef struct OH_Drawing_Typography OH_Drawing_Typography; 62 63 /** 64 * @brief Defines an <b>OH_Drawing_LineTypography</b>, which is used to perform line layout. 65 * 66 * @since 14 67 * @version 1.0 68 */ 69 typedef struct OH_Drawing_LineTypography OH_Drawing_LineTypography; 70 71 /** 72 * @brief Defines an <b>OH_Drawing_TextStyle</b>, which is used to manage text colors and decorations. 73 * 74 * @since 8 75 * @version 1.0 76 */ 77 typedef struct OH_Drawing_TextStyle OH_Drawing_TextStyle; 78 79 /** 80 * @brief Defines an <b>OH_Drawing_TypographyStyle</b>, which is used to manage the typography style, 81 * such as the text direction. 82 * 83 * @since 8 84 * @version 1.0 85 */ 86 typedef struct OH_Drawing_TypographyStyle OH_Drawing_TypographyStyle; 87 88 /** 89 * @brief Defines an <b>OH_Drawing_TypographyCreate</b>, which is used to create an <b>OH_Drawing_Typography</b> object. 90 * 91 * @since 8 92 * @version 1.0 93 */ 94 typedef struct OH_Drawing_TypographyCreate OH_Drawing_TypographyCreate; 95 96 /** 97 * @brief Defines an <b>OH_Drawing_TextBox</b>, which is used to create an <b>OH_Drawing_TextBox</b> object. 98 * 99 * @since 11 100 * @version 1.0 101 */ 102 typedef struct OH_Drawing_TextBox OH_Drawing_TextBox; 103 104 /** 105 * @brief Defines an <b>OH_Drawing_PositionAndAffinity</b>, 106 * which is used to create an <b>OH_Drawing_PositionAndAffinity</b> object. 107 * @since 11 108 * @version 1.0 109 */ 110 typedef struct OH_Drawing_PositionAndAffinity OH_Drawing_PositionAndAffinity; 111 112 /** 113 * @brief Defines an <b>OH_Drawing_Range</b>, which is used to create an <b>OH_Drawing_Range</b> object. 114 * 115 * @since 11 116 * @version 1.0 117 */ 118 typedef struct OH_Drawing_Range OH_Drawing_Range; 119 120 /** 121 * @brief Defines an <b>OH_Drawing_FontParser</b>, which is used to parse system font files. 122 * 123 * @since 12 124 * @version 1.0 125 */ 126 typedef struct OH_Drawing_FontParser OH_Drawing_FontParser; 127 128 /** 129 * @brief Defines an <b>OH_Drawing_TextShadow</b>, which is used to manage text shadow. 130 * 131 * @since 12 132 * @version 1.0 133 */ 134 typedef struct OH_Drawing_TextShadow OH_Drawing_TextShadow; 135 136 /** 137 * @brief Defines an <b>OH_Drawing_TextTab</b>, which is used to to store the tab alignment type and position. 138 * 139 * @since 14 140 * @version 1.0 141 */ 142 typedef struct OH_Drawing_TextTab OH_Drawing_TextTab; 143 144 /** 145 * @brief Defines an <b>OH_Drawing_TextLine</b>, which is used to manage text line. 146 * 147 * @since 14 148 * @version 1.0 149 */ 150 typedef struct OH_Drawing_TextLine OH_Drawing_TextLine; 151 152 /** 153 * @brief Defines an <b>OH_Drawing_Run</b>, which is used to manage run. 154 * 155 * @since 14 156 * @version 1.0 157 */ 158 typedef struct OH_Drawing_Run OH_Drawing_Run; 159 160 #ifdef __cplusplus 161 } 162 #endif 163 /** @} */ 164 #endif