1 /*
2  * Copyright (c) 2021-2024 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_TYPOGRAPHY_H
17 #define C_INCLUDE_DRAWING_TEXT_TYPOGRAPHY_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_typography.h
33  *
34  * @brief Declares functions related to <b>typography</b> in the drawing module.
35  *
36  * @since 8
37  * @version 1.0
38  */
39 
40 #include "cstddef"
41 #include "drawing_canvas.h"
42 #include "drawing_color.h"
43 #include "drawing_font.h"
44 #include "drawing_text_declaration.h"
45 #include "drawing_types.h"
46 
47 #include "stdint.h"
48 
49 #ifdef __cplusplus
50 extern "C" {
51 #endif
52 
53 /**
54  * @brief Enumerates text directions.
55  */
56 enum OH_Drawing_TextDirection {
57     /** Right to left (RTL) */
58     TEXT_DIRECTION_RTL,
59     /** Left to right (LTR) */
60     TEXT_DIRECTION_LTR,
61 };
62 
63 /**
64  * @brief Enumerates text alignment modes.
65  */
66 enum OH_Drawing_TextAlign {
67     /** Left-aligned */
68     TEXT_ALIGN_LEFT,
69     /** Right-aligned */
70     TEXT_ALIGN_RIGHT,
71     /** Center-aligned */
72     TEXT_ALIGN_CENTER,
73     /**
74      * Justified, which means that each line (except the last line) is stretched so that every line has equal width,
75      * and the left and right margins are straight.
76      */
77     TEXT_ALIGN_JUSTIFY,
78     /**
79      * <b>TEXT_ALIGN_START</b> achieves the same effect as <b>TEXT_ALIGN_LEFT</b>
80      * when <b>OH_Drawing_TextDirection</b> is <b>TEXT_DIRECTION_LTR</b>;
81      * it achieves the same effect as <b>TEXT_ALIGN_RIGHT</b>
82      * when <b>OH_Drawing_TextDirection</b> is <b>TEXT_DIRECTION_RTL</b>.
83      */
84     TEXT_ALIGN_START,
85     /**
86      * <b>TEXT_ALIGN_END</b> achieves the same effect as <b>TEXT_ALIGN_RIGHT</b>
87      * when <b>OH_Drawing_TextDirection</b> is <b>TEXT_DIRECTION_LTR</b>;
88      * it achieves the same effect as <b>TEXT_ALIGN_LEFT</b>
89      * when <b>OH_Drawing_TextDirection</b> is <b>TEXT_DIRECTION_RTL</b>.
90      */
91     TEXT_ALIGN_END,
92 };
93 
94 /**
95  * @brief Enumerates font weights.
96  */
97 enum OH_Drawing_FontWeight {
98     /** Thin */
99     FONT_WEIGHT_100,
100     /** Extra-light */
101     FONT_WEIGHT_200,
102     /** Light */
103     FONT_WEIGHT_300,
104     /** Normal/Regular */
105     FONT_WEIGHT_400,
106     /** Medium*/
107     FONT_WEIGHT_500,
108     /** Semi-bold */
109     FONT_WEIGHT_600,
110     /** Bold */
111     FONT_WEIGHT_700,
112     /** Extra-bold */
113     FONT_WEIGHT_800,
114     /** Black */
115     FONT_WEIGHT_900,
116 };
117 
118 /**
119  * @brief Enumerates text baselines.
120  */
121 enum OH_Drawing_TextBaseline {
122     /** Alphabetic, where the letters in alphabets like English sit on. */
123     TEXT_BASELINE_ALPHABETIC,
124     /** Ideographic. The baseline is at the bottom of the text area. */
125     TEXT_BASELINE_IDEOGRAPHIC,
126 };
127 
128 /**
129  * @brief Enumerates text decorations.
130  */
131 enum OH_Drawing_TextDecoration {
132     /** No decoration. */
133     TEXT_DECORATION_NONE = 0x0,
134     /** A underline is used for decoration. */
135     TEXT_DECORATION_UNDERLINE = 0x1,
136     /** An overline is used for decoration. */
137     TEXT_DECORATION_OVERLINE = 0x2,
138     /** A strikethrough is used for decoration. */
139     TEXT_DECORATION_LINE_THROUGH = 0x4,
140 };
141 
142 /**
143  * @brief Enumerates font styles.
144  */
145 enum OH_Drawing_FontStyle {
146     /** Normal style */
147     FONT_STYLE_NORMAL,
148     /** Italic style */
149     FONT_STYLE_ITALIC,
150     /** Oblique style */
151     FONT_STYLE_OBLIQUE,
152 };
153 
154 /**
155  * @brief Enumerates placeholder vertical alignment.
156  *
157  * @since 11
158  * @version 1.0
159  */
160 typedef enum {
161     /** Offset At Baseline */
162     ALIGNMENT_OFFSET_AT_BASELINE,
163     /** Above Baseline */
164     ALIGNMENT_ABOVE_BASELINE,
165     /** Below Baseline */
166     ALIGNMENT_BELOW_BASELINE,
167     /** Top of Row Box */
168     ALIGNMENT_TOP_OF_ROW_BOX,
169     /** Bottom of Row Box */
170     ALIGNMENT_BOTTOM_OF_ROW_BOX,
171     /** Center of Row Box */
172     ALIGNMENT_CENTER_OF_ROW_BOX,
173 } OH_Drawing_PlaceholderVerticalAlignment;
174 
175 /**
176  * @brief Defines the placeholder span.
177  *
178  * @since 11
179  * @version 1.0
180  */
181 typedef struct {
182     /** width of placeholder */
183     double width;
184     /** height of placeholder */
185     double height;
186     /** alignment of placeholder */
187     OH_Drawing_PlaceholderVerticalAlignment alignment;
188     /** baseline of placeholder */
189     OH_Drawing_TextBaseline baseline;
190     /** baselineoffset of placeholder */
191     double baselineOffset;
192 } OH_Drawing_PlaceholderSpan;
193 
194 /**
195  * @brief Describes the font information.
196  *
197  * @since 12
198  * @version 1.0
199  */
200 typedef struct OH_Drawing_FontDescriptor {
201     /** The file path of System font */
202     char* path;
203     /** A name that uniquely identifies the font */
204     char* postScriptName;
205     /** The name of System font */
206     char* fullName;
207     /** The family of System font */
208     char* fontFamily;
209     /** The subfont family of the system font */
210     char* fontSubfamily;
211     /** The weight of System font */
212     int weight;
213     /** The width of System font */
214     int width;
215     /** Whether the system font is tilted */
216     int italic;
217     /** Whether the system font is compact */
218     bool monoSpace;
219     /** whether symbolic fonts are supported */
220     bool symbolic;
221 } OH_Drawing_FontDescriptor;
222 
223 /**
224  * @brief The metrics of line.
225  *
226  * @since 12
227  * @version 1.0
228  */
229 typedef struct OH_Drawing_LineMetrics {
230     /** Text ascender height */
231     double ascender;
232     /** Tex descender height */
233     double descender;
234     /** The height of a capital letter */
235     double capHeight;
236     /** The height of a lowercase letter */
237     double xHeight;
238     /** Text width */
239     double width;
240     /** Line height */
241     double height;
242     /**
243      * The distance from the left end of the text to the left end of the container,
244      * aligned to 0, is the width of the container minus the width of the line of text
245      */
246     double x;
247     /**
248      * The height from the top of the text to the top of the container, the first line is 0,
249      * and the second line is the height of the first line
250      */
251     double y;
252     /** Start Index */
253     size_t startIndex;
254     /** End Index */
255     size_t endIndex;
256     /** The metrics information of the first character */
257     OH_Drawing_Font_Metrics firstCharMetrics;
258 } OH_Drawing_LineMetrics;
259 
260 /**
261  * @brief Fallback font information.
262  *
263  * @since 12
264  * @version 1.0
265  */
266 typedef struct OH_Drawing_FontFallbackInfo {
267     /** The type of language supported by the font set. The language format is bcp47 */
268     char* language;
269     /** Font family name */
270     char* familyName;
271 } OH_Drawing_FontFallbackInfo;
272 
273 /**
274  * @brief Fallback font group.
275  *
276  * @since 12
277  * @version 1.0
278  */
279 typedef struct OH_Drawing_FontFallbackGroup {
280     /**
281      * The name of the font set corresponding to the fallback font set. If the value is null,
282      * all fonts can be set using the fallback font set list.
283      */
284     char* groupName;
285     /** Fallback font Info Size */
286     size_t fallbackInfoSize;
287     /** A list of font sets for fallback fonts */
288     OH_Drawing_FontFallbackInfo* fallbackInfoSet;
289 } OH_Drawing_FontFallbackGroup;
290 
291 /**
292  * @brief Font weight mapping information.
293  *
294  * @since 12
295  * @version 1.0
296  */
297 typedef struct OH_Drawing_FontAdjustInfo {
298     /** The font's original weight value */
299     int weight;
300     /** The font weight displayed in the application */
301     int to;
302 } OH_Drawing_FontAdjustInfo;
303 
304 /**
305  * @brief Alias font information.
306  *
307  * @since 12
308  * @version 1.0
309  */
310 typedef struct OH_Drawing_FontAliasInfo {
311     /** Font family name */
312     char* familyName;
313     /**
314      * Font weight value. When the weight value is greater than 0,
315      * the font set contains only fonts with the specified weight.
316      * When the weight value is equal to 0, the font set contains all fonts.
317      */
318     int weight;
319 } OH_Drawing_FontAliasInfo;
320 
321 /**
322  * @brief General font set information supported by the system.
323  *
324  * @since 12
325  * @version 1.0
326  */
327 typedef struct OH_Drawing_FontGenericInfo {
328     /** Font family name */
329     char* familyName;
330     /** The size of alias font lists */
331     size_t aliasInfoSize;
332     /** The size of font weight mapping information lists */
333     size_t adjustInfoSize;
334     /** List of alias fonts */
335     OH_Drawing_FontAliasInfo* aliasInfoSet;
336     /** Font weight mapping information lists */
337     OH_Drawing_FontAdjustInfo* adjustInfoSet;
338 } OH_Drawing_FontGenericInfo;
339 
340 /**
341  * @brief System font configuration information.
342  *
343  * @since 12
344  * @version 1.0
345  */
346 typedef struct OH_Drawing_FontConfigInfo {
347     /** Count of system font file paths */
348     size_t fontDirSize;
349     /** List size of generic font sets */
350     size_t fontGenericInfoSize;
351     /** Count of fallback font set lists */
352     size_t fallbackGroupSize;
353     /** List of system font file paths */
354     char** fontDirSet;
355     /** List of generic font sets */
356     OH_Drawing_FontGenericInfo* fontGenericInfoSet;
357     /** List of fallback font sets */
358     OH_Drawing_FontFallbackGroup* fallbackGroupSet;
359 } OH_Drawing_FontConfigInfo;
360 
361 /**
362  * @brief Enumerates text decoration style.
363  *
364  * @since 11
365  * @version 1.0
366  */
367 typedef enum {
368     /** Solid style */
369     TEXT_DECORATION_STYLE_SOLID,
370     /** Double style */
371     TEXT_DECORATION_STYLE_DOUBLE,
372     /** Dotted style */
373     TEXT_DECORATION_STYLE_DOTTED,
374     /** Dashed style */
375     TEXT_DECORATION_STYLE_DASHED,
376     /** Wavy style */
377     TEXT_DECORATION_STYLE_WAVY,
378 } OH_Drawing_TextDecorationStyle;
379 
380 /**
381  * @brief Enumerates ellipsis modal.
382  *
383  * @since 11
384  * @version 1.0
385  */
386 typedef enum {
387     /** Head modal */
388     ELLIPSIS_MODAL_HEAD = 0,
389     /** Middle modal */
390     ELLIPSIS_MODAL_MIDDLE = 1,
391     /** Tail modal */
392     ELLIPSIS_MODAL_TAIL = 2,
393 } OH_Drawing_EllipsisModal;
394 
395 /**
396  * @brief Enumerates break strategy.
397  *
398  * @since 11
399  * @version 1.0
400  */
401 typedef enum {
402     /** Greedy strategy */
403     BREAK_STRATEGY_GREEDY = 0,
404     /** Quality strategy */
405     BREAK_STRATEGY_HIGH_QUALITY = 1,
406     /** Balanced strategy */
407     BREAK_STRATEGY_BALANCED = 2,
408 } OH_Drawing_BreakStrategy;
409 
410 /**
411  * @brief Enumerates word break type.
412  *
413  * @since 11
414  * @version 1.0
415  */
416 typedef enum {
417     /** Normal type */
418     WORD_BREAK_TYPE_NORMAL = 0,
419     /** Break All type */
420     WORD_BREAK_TYPE_BREAK_ALL = 1,
421     /** Break Word type */
422     WORD_BREAK_TYPE_BREAK_WORD = 2,
423 } OH_Drawing_WordBreakType;
424 
425 /**
426  * @brief Enumerates rect height style.
427  *
428  * @since 11
429  * @version 1.0
430  */
431 typedef enum {
432     /** Tight style */
433     RECT_HEIGHT_STYLE_TIGHT,
434     /** Max style */
435     RECT_HEIGHT_STYLE_MAX,
436     /** Includelinespacemiddle style */
437     RECT_HEIGHT_STYLE_INCLUDELINESPACEMIDDLE,
438     /** Includelinespacetop style */
439     RECT_HEIGHT_STYLE_INCLUDELINESPACETOP,
440     /** Includelinespacebottom style */
441     RECT_HEIGHT_STYLE_INCLUDELINESPACEBOTTOM,
442     /** Struct style */
443     RECT_HEIGHT_STYLE_STRUCT,
444 } OH_Drawing_RectHeightStyle;
445 
446 /**
447  * @brief Enumerates rect Width style.
448  *
449  * @since 11
450  * @version 1.0
451  */
452 typedef enum {
453     /** Tight style */
454     RECT_WIDTH_STYLE_TIGHT,
455     /** Max style */
456     RECT_WIDTH_STYLE_MAX,
457 } OH_Drawing_RectWidthStyle;
458 
459 /**
460  * @brief Gets system font configuration information list result enum.
461  *
462  * @since 12
463  * @version 1.0
464  */
465 enum OH_Drawing_FontConfigInfoErrorCode {
466     /** The list of system font configuration information was successfully obtained */
467     SUCCESS_FONT_CONFIG_INFO = 0,
468     /** Unknown error */
469     ERROR_FONT_CONFIG_INFO_UNKNOWN = 1,
470     /** Parse system config file error */
471     ERROR_FONT_CONFIG_INFO_PARSE_FILE = 2,
472     /** Alloc memory error */
473     ERROR_FONT_CONFIG_INFO_ALLOC_MEMORY = 3,
474     /** Copy string data error */
475     ERROR_FONT_CONFIG_INFO_COPY_STRING_DATA = 4,
476 };
477 
478 /**
479  * @brief Defines StrutStyle info struct.
480  *
481  * @since 12
482  * @version 1.0
483  */
484 typedef struct {
485     /** The font weight to use when calculating the strut */
486     OH_Drawing_FontWeight weight;
487     /** The font style to use when calculating the strut */
488     OH_Drawing_FontStyle style;
489     /** The size of the ascent plus descent in logical pixels */
490     double size;
491     /** The minimum height of the strut, as a multiple of fontSize */
492     double heightScale;
493     /** Whether the height is override */
494     bool heightOverride;
495     /** Whether the halfleading is enable */
496     bool halfLeading;
497     /** The additional leading to apply to the strut as a multiple of Size */
498     double leading;
499     /** Whether the strut height should be forced */
500     bool forceStrutHeight;
501     /** The size of font families */
502     size_t familiesSize;
503     /** The families of the font to use when calculating the strut */
504     char** families;
505 } OH_Drawing_StrutStyle;
506 
507 /**
508  * @brief Defines the fontfeature.
509  *
510  * @since 12
511  * @version 1.0
512  */
513 typedef struct {
514     /** key of fontfeature */
515     char* tag;
516     /** value of fontfeature */
517     int value;
518 } OH_Drawing_FontFeature;
519 
520 /**
521  * @brief Enumerates of heightmode of text.
522  *
523  * @since 12
524  * @version 1.0
525  */
526 enum OH_Drawing_TextHeightBehavior {
527     /** both ascend of first row and last row style */
528     TEXT_HEIGHT_ALL = 0x0,
529     /** forbidding ascend of first row style*/
530     TEXT_HEIGHT_DISABLE_FIRST_ASCENT = 0x1,
531      /** forbidding ascend of last row style */
532     TEXT_HEIGHT_DISABLE_LAST_ASCENT = 0x2,
533       /** neither ascend of first row nor last row style */
534     TEXT_HEIGHT_DISABLE_ALL = 0x1 | 0x2,
535 };
536 
537 /**
538  * @brief Enumerates font width.
539  *
540  * @since 12
541  * @version 1.0
542  */
543 enum OH_Drawing_FontWidth {
544     /* Ultra condensed font width */
545     FONT_WIDTH_ULTRA_CONDENSED = 1,
546     /* Extra condensed font width */
547     FONT_WIDTH_EXTRA_CONDENSED = 2,
548     /* condensed font width */
549     FONT_WIDTH_CONDENSED = 3,
550     /* Semi condensed font width */
551     FONT_WIDTH_SEMI_CONDENSED = 4,
552     /* Normal font width */
553     FONT_WIDTH_NORMAL = 5,
554     /* Semi expanded font width */
555     FONT_WIDTH_SEMI_EXPANDED = 6,
556     /* Expanded font width */
557     FONT_WIDTH_EXPANDED = 7,
558     /* Extra expanded font width */
559     FONT_WIDTH_EXTRA_EXPANDED = 8,
560     /* Ultra expanded font width */
561     FONT_WIDTH_ULTRA_EXPANDED = 9,
562 };
563 
564 /**
565  * @brief Defines the font style struct.
566  *
567  * @since 12
568  * @version 1.0
569  */
570 typedef struct OH_Drawing_FontStyleStruct {
571     /** Font weight */
572     OH_Drawing_FontWeight weight;
573     /** Font width */
574     OH_Drawing_FontWidth width;
575     /** Font slant */
576     OH_Drawing_FontStyle slant;
577 } OH_Drawing_FontStyleStruct;
578 
579 /**
580  * @brief Enumerates text style type.
581  *
582  * @since 12
583  * @version 1.0
584  */
585 enum OH_Drawing_TextStyleType {
586     /** None style */
587     TEXT_STYLE_NONE,
588     /** All attributes style */
589     TEXT_STYLE_ALL_ATTRIBUTES,
590     /** Font style */
591     TEXT_STYLE_FONT,
592     /** Foreground style */
593     TEXT_STYLE_FOREGROUND,
594     /** Background style */
595     TEXT_STYLE_BACKGROUND,
596     /** Shadow style */
597     TEXT_STYLE_SHADOW,
598     /** Decorations style */
599     TEXT_STYLE_DECORATIONS,
600     /** Letter spacing style */
601     TEXT_STYLE_LETTER_SPACING,
602     /** Word spacing style */
603     TEXT_STYLE_WORD_SPACING
604 };
605 
606 /**
607  * @brief Creates an <b>OH_Drawing_TypographyStyle</b> object.
608  *
609  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
610  * @return Returns the pointer to the <b>OH_Drawing_TypographyStyle</b> object created.
611  * @since 8
612  * @version 1.0
613  */
614 OH_Drawing_TypographyStyle* OH_Drawing_CreateTypographyStyle(void);
615 
616 /**
617  * @brief Releases the memory occupied by an <b>OH_Drawing_TypographyStyle</b> object.
618  *
619  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
620  * @param OH_Drawing_TypographyStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
621  * @since 8
622  * @version 1.0
623  */
624 void OH_Drawing_DestroyTypographyStyle(OH_Drawing_TypographyStyle*);
625 
626 /**
627  * @brief Sets the text direction.
628  *
629  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
630  * @param OH_Drawing_TypographyStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
631  * @param int Indicates the text direction to set. For details, see the enum <b>OH_Drawing_TextDirection</b>.
632  * @since 8
633  * @version 1.0
634  */
635 void OH_Drawing_SetTypographyTextDirection(OH_Drawing_TypographyStyle*, int /* OH_Drawing_TextDirection */);
636 
637 /**
638  * @brief Sets the text alignment mode.
639  *
640  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
641  * @param OH_Drawing_TypographyStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
642  * @param int Indicates the text alignment mode to set. For details, see the enum <b>OH_Drawing_TextAlign</b>.
643  * @since 8
644  * @version 1.0
645  */
646 void OH_Drawing_SetTypographyTextAlign(OH_Drawing_TypographyStyle*, int /* OH_Drawing_TextAlign */);
647 
648 /**
649  * @brief Sets the maximum number of lines in a text file.
650  *
651  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
652  * @param OH_Drawing_TypographyStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
653  * @param int Indicates the maximum number of lines to set.
654  * @since 8
655  * @version 1.0
656  */
657 void OH_Drawing_SetTypographyTextMaxLines(OH_Drawing_TypographyStyle*, int /* maxLines */);
658 
659 /**
660  * @brief Creates an <b>OH_Drawing_TextStyle</b> object.
661  *
662  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
663  * @return Returns the pointer to the <b>OH_Drawing_TextStyle</b> object created.
664  * @since 8
665  * @version 1.0
666  */
667 OH_Drawing_TextStyle* OH_Drawing_CreateTextStyle(void);
668 
669 /**
670  * @brief Releases the memory occupied by an <b>OH_Drawing_TextStyle</b> object.
671  *
672  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
673  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
674  * @since 8
675  * @version 1.0
676  */
677 void OH_Drawing_DestroyTextStyle(OH_Drawing_TextStyle*);
678 
679 /**
680  * @brief Sets the text color.
681  *
682  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
683  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
684  * @param uint32_t Indicates the color to set.
685  * @since 8
686  * @version 1.0
687  */
688 void OH_Drawing_SetTextStyleColor(OH_Drawing_TextStyle*, uint32_t /* color */);
689 
690 /**
691  * @brief Sets the font size.
692  *
693  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
694  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
695  * @param double Indicates the font size to set.
696  * @since 8
697  * @version 1.0
698  */
699 void OH_Drawing_SetTextStyleFontSize(OH_Drawing_TextStyle*, double /* fontSize */);
700 
701 /**
702  * @brief Sets the font weight.
703  *
704  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
705  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
706  * @param int Indicates the font weight to set. For details, see the enum <b>OH_Drawing_FontWeight</b>.
707  * @since 8
708  * @version 1.0
709  */
710 void OH_Drawing_SetTextStyleFontWeight(OH_Drawing_TextStyle*, int /* OH_Drawing_FontWeight */);
711 
712 /**
713  * @brief Sets the text baseline.
714  *
715  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
716  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
717  * @param int Indicates the text baseline to set. For details, see the enum <b>OH_Drawing_TextBaseline</b>.
718  * @since 8
719  * @version 1.0
720  */
721 void OH_Drawing_SetTextStyleBaseLine(OH_Drawing_TextStyle*, int /* OH_Drawing_TextBaseline */);
722 
723 /**
724  * @brief Sets the text decoration.
725  *
726  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
727  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
728  * @param int Indicates the text decoration to set. For details, see the enum <b>OH_Drawing_TextDecoration</b>.
729  * @since 8
730  * @version 1.0
731  */
732 void OH_Drawing_SetTextStyleDecoration(OH_Drawing_TextStyle*, int /* OH_Drawing_TextDecoration */);
733 
734 /**
735  * @brief Sets the color for the text decoration.
736  *
737  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
738  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
739  * @param uint32_t Indicates the color to set.
740  * @since 8
741  * @version 1.0
742  */
743 void OH_Drawing_SetTextStyleDecorationColor(OH_Drawing_TextStyle*, uint32_t /* color */);
744 
745 /**
746  * @brief Sets the font height.
747  *
748  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
749  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
750  * @param double Indicates the font height to set.
751  * @since 8
752  * @version 1.0
753  */
754 void OH_Drawing_SetTextStyleFontHeight(OH_Drawing_TextStyle*, double /* fontHeight */);
755 
756 /**
757  * @brief Sets the font families.
758  *
759  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
760  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
761  * @param int Indicates the number of font families to set.
762  * @param char Indicates the pointer to the font families to set.
763  * @since 8
764  * @version 1.0
765  */
766 void OH_Drawing_SetTextStyleFontFamilies(OH_Drawing_TextStyle*,
767     int /* fontFamiliesNumber */, const char* fontFamilies[]);
768 
769 /**
770  * @brief Sets the font style.
771  *
772  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
773  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
774  * @param int Indicates the font style to set. For details, see the enum <b>OH_Drawing_FontStyle</b>.
775  * @since 8
776  * @version 1.0
777  */
778 void OH_Drawing_SetTextStyleFontStyle(OH_Drawing_TextStyle*, int /* OH_Drawing_FontStyle */);
779 
780 /**
781  * @brief Sets the locale.
782  *
783  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
784  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
785  * @param char Indicates the pointer to the locale to set.
786  * @since 8
787  * @version 1.0
788  */
789 void OH_Drawing_SetTextStyleLocale(OH_Drawing_TextStyle*, const char*);
790 
791 /**
792  * @brief Sets the foreground brush style.
793  *
794  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
795  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
796  * @param OH_Drawing_Brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.
797  * @since 12
798  * @version 1.0
799  */
800 void OH_Drawing_SetTextStyleForegroundBrush(OH_Drawing_TextStyle*, OH_Drawing_Brush*);
801 
802 /**
803  * @brief Gets the foreground brush style.
804  *
805  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
806  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
807  * @param OH_Drawing_Brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.
808  * @since 12
809  * @version 1.0
810  */
811 void OH_Drawing_TextStyleGetForegroundBrush(OH_Drawing_TextStyle*, OH_Drawing_Brush*);
812 
813 /**
814  * @brief Sets the foreground pen style.
815  *
816  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
817  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
818  * @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
819  * @since 12
820  * @version 1.0
821  */
822 void OH_Drawing_SetTextStyleForegroundPen(OH_Drawing_TextStyle*, OH_Drawing_Pen*);
823 
824 /**
825  * @brief Gets the foreground pen style.
826  *
827  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
828  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
829  * @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
830  * @since 12
831  * @version 1.0
832  */
833 void OH_Drawing_TextStyleGetForegroundPen(OH_Drawing_TextStyle*, OH_Drawing_Pen*);
834 
835 /**
836  * @brief Sets the background brush style.
837  *
838  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
839  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
840  * @param OH_Drawing_Brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.
841  * @since 12
842  * @version 1.0
843  */
844 void OH_Drawing_SetTextStyleBackgroundBrush(OH_Drawing_TextStyle*, OH_Drawing_Brush*);
845 
846 /**
847  * @brief Gets the background brush style.
848  *
849  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
850  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
851  * @param OH_Drawing_Brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.
852  * @since 12
853  * @version 1.0
854  */
855 void OH_Drawing_TextStyleGetBackgroundBrush(OH_Drawing_TextStyle*, OH_Drawing_Brush*);
856 
857 /**
858  * @brief Sets the background pen style.
859  *
860  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
861  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
862  * @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
863  * @since 12
864  * @version 1.0
865  */
866 void OH_Drawing_SetTextStyleBackgroundPen(OH_Drawing_TextStyle*, OH_Drawing_Pen*);
867 
868 /**
869  * @brief Gets the background pen style.
870  *
871  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
872  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
873  * @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
874  * @since 12
875  * @version 1.0
876  */
877 void OH_Drawing_TextStyleGetBackgroundPen(OH_Drawing_TextStyle*, OH_Drawing_Pen*);
878 
879 /**
880  * @brief Creates a pointer to an <b>OH_Drawing_TypographyCreate</b> object.
881  *
882  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
883  * @param OH_Drawing_TypographyStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
884  * @param OH_Drawing_FontCollection Indicates the pointer to an <b>OH_Drawing_FontCollection</b> object.
885  * @return Returns the pointer to the <b>OH_Drawing_TypographyCreate</b> object created.
886  * @since 8
887  * @version 1.0
888  */
889 OH_Drawing_TypographyCreate* OH_Drawing_CreateTypographyHandler(OH_Drawing_TypographyStyle*,
890     OH_Drawing_FontCollection*);
891 
892 /**
893  * @brief Releases the memory occupied by an <b>OH_Drawing_TypographyCreate</b> object.
894  *
895  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
896  * @param OH_Drawing_TypographyCreate Indicates the pointer to an <b>OH_Drawing_TypographyCreate</b> object.
897  * @since 8
898  * @version 1.0
899  */
900 void OH_Drawing_DestroyTypographyHandler(OH_Drawing_TypographyCreate*);
901 
902 /**
903  * @brief Sets the text style.
904  *
905  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
906  * @param OH_Drawing_TypographyCreate Indicates the pointer to an <b>OH_Drawing_TypographyCreate</b> object.
907  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
908  * @since 8
909  * @version 1.0
910  */
911 void OH_Drawing_TypographyHandlerPushTextStyle(OH_Drawing_TypographyCreate*, OH_Drawing_TextStyle*);
912 
913 /**
914  * @brief Sets the text content.
915  *
916  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
917  * @param OH_Drawing_TypographyCreate Indicates the pointer to an <b>OH_Drawing_TypographyCreate</b> object.
918  * @param char Indicates the pointer to the text content to set.
919  * @since 8
920  * @version 1.0
921  */
922 void OH_Drawing_TypographyHandlerAddText(OH_Drawing_TypographyCreate*, const char*);
923 
924 /**
925  * @brief Removes the topmost style in the stack, leaving the remaining styles in effect.
926  *
927  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
928  * @param OH_Drawing_TypographyCreate Indicates the pointer to an <b>OH_Drawing_TypographyCreate</b> object.
929  * @since 8
930  * @version 1.0
931  */
932 void OH_Drawing_TypographyHandlerPopTextStyle(OH_Drawing_TypographyCreate*);
933 
934 /**
935  * @brief Creates an <b>OH_Drawing_Typography</b> object.
936  *
937  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
938  * @param OH_Drawing_TypographyCreate Indicates the pointer to an <b>OH_Drawing_TypographyCreate</b> object.
939  * @return Returns the pointer to the <b>OH_Drawing_Typography</b> object created.
940  * @since 8
941  * @version 1.0
942  */
943 OH_Drawing_Typography* OH_Drawing_CreateTypography(OH_Drawing_TypographyCreate*);
944 
945 /**
946  * @brief Releases the memory occupied by an <b>OH_Drawing_Typography</b> object.
947  *
948  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
949  * @param OH_Drawing_Typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
950  * @since 8
951  * @version 1.0
952  */
953 void OH_Drawing_DestroyTypography(OH_Drawing_Typography*);
954 
955 /**
956  * @brief Lays out the typography.
957  *
958  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
959  * @param OH_Drawing_Typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
960  * @param double Indicates the maximum text width to set.
961  * @since 8
962  * @version 1.0
963  */
964 void OH_Drawing_TypographyLayout(OH_Drawing_Typography*, double /* maxWidth */);
965 
966 /**
967  * @brief Paints text on the canvas.
968  *
969  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
970  * @param OH_Drawing_Typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
971  * @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
972  * @param double Indicates the x coordinate.
973  * @param double Indicates the y coordinate.
974  * @since 8
975  * @version 1.0
976  */
977 void OH_Drawing_TypographyPaint(OH_Drawing_Typography*, OH_Drawing_Canvas*,
978     double /* potisionX */, double /* potisionY */);
979 
980 /**
981  * @brief Paints path text on the canvas.
982  *
983  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
984  * @param OH_Drawing_Typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
985  * @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
986  * @param OH_Drawing_Path Indicates path information.
987  * @param double Indicates the distance along the path to add to the text's starting position.
988  * @param double Indicates the distance above(-) or below(+) the path to position the text.
989  * @since 12
990  * @version 1.0
991  */
992 void OH_Drawing_TypographyPaintOnPath(
993     OH_Drawing_Typography*, OH_Drawing_Canvas*, OH_Drawing_Path*, double /* hOffset */, double /* vOffset */);
994 
995 /**
996  * @brief Gets the max width.
997  *
998  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
999  * @param OH_Drawing_Typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
1000  * @return Returns the max width.
1001  * @since 9
1002  * @version 1.1
1003  */
1004 double OH_Drawing_TypographyGetMaxWidth(OH_Drawing_Typography*);
1005 
1006 /**
1007  * @brief Gets the height.
1008  *
1009  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1010  * @param OH_Drawing_Typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
1011  * @return Returns the height.
1012  * @since 9
1013  * @version 1.1
1014  */
1015 double OH_Drawing_TypographyGetHeight(OH_Drawing_Typography*);
1016 
1017 /**
1018  * @brief Gets the longest line.
1019  *
1020  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1021  * @param OH_Drawing_Typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
1022  * @return Returns the length of the longest line.
1023  * @since 9
1024  * @version 1.1
1025  */
1026 double OH_Drawing_TypographyGetLongestLine(OH_Drawing_Typography*);
1027 
1028 /**
1029  * @brief Gets the width of the longest line, and this width contains the width of indent.
1030  *
1031  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1032  * @param OH_Drawing_Typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
1033  * @return Returns the length of the longest line with indent.
1034  * @since 13
1035  * @version 1.1
1036  */
1037 double OH_Drawing_TypographyGetLongestLineWithIndent(OH_Drawing_Typography*);
1038 
1039 /**
1040  * @brief Gets the min intrinsic width.
1041  *
1042  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1043  * @param OH_Drawing_Typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
1044  * @return Returns the min intrinsic width.
1045  * @since 9
1046  * @version 1.1
1047  */
1048 double OH_Drawing_TypographyGetMinIntrinsicWidth(OH_Drawing_Typography*);
1049 
1050 /**
1051  * @brief Gets the max intrinsic width.
1052  *
1053  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1054  * @param OH_Drawing_Typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
1055  * @return Returns the max intrinsic width.
1056  * @since 9
1057  * @version 1.1
1058  */
1059 double OH_Drawing_TypographyGetMaxIntrinsicWidth(OH_Drawing_Typography*);
1060 
1061 /**
1062  * @brief Gets the alphabetic baseline.
1063  *
1064  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1065  * @param OH_Drawing_Typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
1066  * @return Returns the alphabetic baseline.
1067  * @since 9
1068  * @version 1.1
1069  */
1070 double OH_Drawing_TypographyGetAlphabeticBaseline(OH_Drawing_Typography*);
1071 
1072 /**
1073  * @brief Gets the ideographic baseline.
1074  *
1075  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1076  * @param OH_Drawing_Typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
1077  * @return Returns the ideographic baseline.
1078  * @since 9
1079  * @version 1.1
1080  */
1081 double OH_Drawing_TypographyGetIdeographicBaseline(OH_Drawing_Typography*);
1082 
1083 /**
1084  * @brief Sets the placeholder.
1085  *
1086  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1087  * @param OH_Drawing_TypographyCreate Indicates the pointer to an <b>OH_Drawing_TypographyCreate</b> object.
1088  * @param OH_Drawing_PlaceholderSpan Indicates the pointer to an <b>OH_Drawing_PlaceholderSpan</b> object.
1089  * @since 11
1090  * @version 1.0
1091  */
1092 void OH_Drawing_TypographyHandlerAddPlaceholder(OH_Drawing_TypographyCreate*, OH_Drawing_PlaceholderSpan*);
1093 
1094 /**
1095  * @brief Gets the exceed maxLines.
1096  *
1097  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1098  * @param OH_Drawing_Typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
1099  * @return Returns the exceed maxLines.
1100  * @since 11
1101  * @version 1.0
1102  */
1103 bool OH_Drawing_TypographyDidExceedMaxLines(OH_Drawing_Typography*);
1104 
1105 /**
1106  * @brief Gets the rects for range.
1107  *
1108  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1109  * @param OH_Drawing_Typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
1110  * @param size_t Indicates the start of range to set.
1111  * @param size_t Indicates the end of range to set.
1112  * @param OH_Drawing_RectHeightStyle Indicates the height style to set.
1113  * For details, see the enum <b>OH_Drawing_RectHeightStyle</b>.
1114  * @param OH_Drawing_RectWidthStyle Indicates the width style to set.
1115  * For details, see the enum <b>OH_Drawing_RectWidthStyle</b>.
1116  * @return Returns the rects for range.
1117  * @since 11
1118  * @version 1.0
1119  */
1120 OH_Drawing_TextBox* OH_Drawing_TypographyGetRectsForRange(OH_Drawing_Typography*,
1121     size_t, size_t, OH_Drawing_RectHeightStyle, OH_Drawing_RectWidthStyle);
1122 
1123 /**
1124  * @brief Gets the rects for placeholders.
1125  *
1126  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1127  * @param OH_Drawing_Typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
1128  * @return Returns the rects for placeholders.
1129  * @since 11
1130  * @version 1.0
1131  */
1132 OH_Drawing_TextBox* OH_Drawing_TypographyGetRectsForPlaceholders(OH_Drawing_Typography*);
1133 
1134 /**
1135  * @brief Gets left from textbox.
1136  *
1137  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1138  * @param OH_Drawing_TextBox Indicates the pointer to an <b>OH_Drawing_TextBox</b> object.
1139  * @param int Indicates the index of textbox.
1140  * @return Returns left from textbox.
1141  * @since 11
1142  * @version 1.0
1143  */
1144 float OH_Drawing_GetLeftFromTextBox(OH_Drawing_TextBox*, int);
1145 
1146 /**
1147  * @brief Gets right from textbox.
1148  *
1149  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1150  * @param OH_Drawing_TextBox Indicates the pointer to an <b>OH_Drawing_TextBox</b> object.
1151  * @param int Indicates the index of textbox.
1152  * @return Returns right from textbox.
1153  * @since 11
1154  * @version 1.0
1155  */
1156 float OH_Drawing_GetRightFromTextBox(OH_Drawing_TextBox*, int);
1157 
1158 /**
1159  * @brief Gets top from textbox.
1160  *
1161  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1162  * @param OH_Drawing_TextBox Indicates the pointer to an <b>OH_Drawing_TextBox</b> object.
1163  * @param int Indicates the index of textbox.
1164  * @return Returns top from textbox.
1165  * @since 11
1166  * @version 1.0
1167  */
1168 float OH_Drawing_GetTopFromTextBox(OH_Drawing_TextBox*, int);
1169 
1170 /**
1171  * @brief Gets bottom from textbox.
1172  *
1173  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1174  * @param OH_Drawing_TextBox Indicates the pointer to an <b>OH_Drawing_TextBox</b> object.
1175  * @param int Indicates the index of textbox.
1176  * @return Returns bottom from textbox.
1177  * @since 11
1178  * @version 1.0
1179  */
1180 float OH_Drawing_GetBottomFromTextBox(OH_Drawing_TextBox*, int);
1181 
1182 /**
1183  * @brief Gets direction from textbox.
1184  *
1185  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1186  * @param OH_Drawing_TextBox Indicates the pointer to an <b>OH_Drawing_TextBox</b> object.
1187  * @param int Indicates the index of textbox.
1188  * @return Returns direction from textbox.
1189  * @since 11
1190  * @version 1.0
1191  */
1192 int OH_Drawing_GetTextDirectionFromTextBox(OH_Drawing_TextBox*, int);
1193 
1194 /**
1195  * @brief Gets size of textbox.
1196  *
1197  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1198  * @param OH_Drawing_TextBox Indicates the pointer to an <b>OH_Drawing_TextBox</b> object.
1199  * @return Returns size of textbox.
1200  * @since 11
1201  * @version 1.0
1202  */
1203 size_t OH_Drawing_GetSizeOfTextBox(OH_Drawing_TextBox*);
1204 
1205 /**
1206  * @brief Gets the glyphposition at coordinate.
1207  *
1208  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1209  * @param OH_Drawing_Typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
1210  * @param double Indicates the positionX of typography to set.
1211  * @param double Indicates the positionY of typography to set.
1212  * @return Returns the glyphposition at coordinate.
1213  * @since 11
1214  * @version 1.0
1215  */
1216 OH_Drawing_PositionAndAffinity* OH_Drawing_TypographyGetGlyphPositionAtCoordinate(OH_Drawing_Typography*,
1217     double, double);
1218 
1219 /**
1220  * @brief Gets the glyphposition at coordinate with cluster.
1221  *
1222  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1223  * @param OH_Drawing_Typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
1224  * @param double Indicates the positionX of typography to set.
1225  * @param double Indicates the positionY of typography to set.
1226  * @return Returns the glyphposition at coordinate with cluster.
1227  * @since 11
1228  * @version 1.0
1229  */
1230 OH_Drawing_PositionAndAffinity* OH_Drawing_TypographyGetGlyphPositionAtCoordinateWithCluster(OH_Drawing_Typography*,
1231     double, double);
1232 
1233 /**
1234  * @brief Gets position from positionandaffinity.
1235  *
1236  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1237  * @param OH_Drawing_PositionAndAffinity Indicates the pointer to an <b>OH_Drawing_PositionAndAffinity</b> object.
1238  * @return Returns position from positionandaffinity.
1239  * @since 11
1240  * @version 1.0
1241  */
1242 size_t OH_Drawing_GetPositionFromPositionAndAffinity(OH_Drawing_PositionAndAffinity*);
1243 
1244 /**
1245  * @brief Gets affinity from positionandaffinity.
1246  *
1247  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1248  * @param OH_Drawing_PositionAndAffinity Indicates the pointer to an <b>OH_Drawing_PositionAndAffinity</b> object.
1249  * @return Returns affinity from positionandaffinity.
1250  * @since 11
1251  * @version 1.0
1252  */
1253 int OH_Drawing_GetAffinityFromPositionAndAffinity(OH_Drawing_PositionAndAffinity*);
1254 
1255 /**
1256  * @brief Gets the word boundary.
1257  *
1258  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1259  * @param OH_Drawing_Typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
1260  * @param size_t Indicates the size of text to set.
1261  * @return Returns the word boundary.
1262  * @since 11
1263  * @version 1.0
1264  */
1265 OH_Drawing_Range* OH_Drawing_TypographyGetWordBoundary(OH_Drawing_Typography*, size_t);
1266 
1267 /**
1268  * @brief Gets start from range.
1269  *
1270  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1271  * @param OH_Drawing_Range Indicates the pointer to an <b>OH_Drawing_Range</b> object.
1272  * @return Returns start from range.
1273  * @since 11
1274  * @version 1.0
1275  */
1276 size_t OH_Drawing_GetStartFromRange(OH_Drawing_Range*);
1277 
1278 /**
1279  * @brief Gets end from range.
1280  *
1281  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1282  * @param OH_Drawing_Range Indicates the pointer to an <b>OH_Drawing_Range</b> object.
1283  * @return Returns end from range.
1284  * @since 11
1285  * @version 1.0
1286  */
1287 size_t OH_Drawing_GetEndFromRange(OH_Drawing_Range*);
1288 
1289 /**
1290  * @brief Gets the line count.
1291  *
1292  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1293  * @param OH_Drawing_Typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
1294  * @return Returns the line count.
1295  * @since 11
1296  * @version 1.0
1297  */
1298 size_t OH_Drawing_TypographyGetLineCount(OH_Drawing_Typography*);
1299 
1300 /**
1301  * @brief Sets the decoration style.
1302  *
1303  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1304  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
1305  * @param int Indicates the text decoration style to set.
1306  * For details, see the enum <b>OH_Drawing_TextDecorationStyle</b>.
1307  * @since 11
1308  * @version 1.0
1309  */
1310 void OH_Drawing_SetTextStyleDecorationStyle(OH_Drawing_TextStyle*, int);
1311 
1312 /**
1313  * @brief Sets the decoration thickness scale.
1314  *
1315  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1316  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
1317  * @param double Indicates the thickness scale of text decoration to set.
1318  * @since 11
1319  * @version 1.0
1320  */
1321 void OH_Drawing_SetTextStyleDecorationThicknessScale(OH_Drawing_TextStyle*, double);
1322 
1323 /**
1324  * @brief Sets the letter spacing.
1325  *
1326  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1327  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
1328  * @param double Indicates the letter space to set.
1329  * @since 11
1330  * @version 1.0
1331  */
1332 void OH_Drawing_SetTextStyleLetterSpacing(OH_Drawing_TextStyle*, double);
1333 
1334 /**
1335  * @brief Sets the word spacing.
1336  *
1337  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1338  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
1339  * @param double Indicates the word space to set.
1340  * @since 11
1341  * @version 1.0
1342  */
1343 void OH_Drawing_SetTextStyleWordSpacing(OH_Drawing_TextStyle*, double);
1344 
1345 /**
1346  * @brief Sets the half leading.
1347  *
1348  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1349  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
1350  * @param bool Indicates the half leading to set.
1351  * @since 11
1352  * @version 1.0
1353  */
1354 void OH_Drawing_SetTextStyleHalfLeading(OH_Drawing_TextStyle*, bool);
1355 
1356 /**
1357  * @brief Sets the ellipsis.
1358  *
1359  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1360  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
1361  * @param char* Indicates the pointer to ellipsis style.
1362  * @since 11
1363  * @version 1.0
1364  */
1365 void OH_Drawing_SetTextStyleEllipsis(OH_Drawing_TextStyle*, const char*);
1366 
1367 /**
1368  * @brief Sets the ellipsis modal.
1369  *
1370  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1371  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
1372  * @param int Indicates the ellipsis model to set. For details, see the enum <b>OH_Drawing_EllipsisModal</b>.
1373  * @since 11
1374  * @version 1.0
1375  */
1376 void OH_Drawing_SetTextStyleEllipsisModal(OH_Drawing_TextStyle*, int);
1377 
1378 /**
1379  * @brief Sets the break strategy.
1380  *
1381  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1382  * @param OH_Drawing_TypographyStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
1383  * @param int Indicates the break strategy to set. For details, see the enum <b>OH_Drawing_BreakStrategy</b>.
1384  * @since 11
1385  * @version 1.0
1386  */
1387 void OH_Drawing_SetTypographyTextBreakStrategy(OH_Drawing_TypographyStyle*, int);
1388 
1389 /**
1390  * @brief Sets the word break type.
1391  *
1392  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1393  * @param OH_Drawing_TypographyStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
1394  * @param int Indicates the word break type to set. For details, see the enum <b>OH_Drawing_WordBreakType</b>.
1395  * @since 11
1396  * @version 1.0
1397  */
1398 void OH_Drawing_SetTypographyTextWordBreakType(OH_Drawing_TypographyStyle*, int);
1399 
1400 /**
1401  * @brief Sets the ellipsis modal.
1402  *
1403  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1404  * @param OH_Drawing_TypographyStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
1405  * @param int Indicates the ellipsis modal to set. For details, see the enum <b>OH_Drawing_EllipsisModal</b>.
1406  * @since 11
1407  * @version 1.0
1408  */
1409 void OH_Drawing_SetTypographyTextEllipsisModal(OH_Drawing_TypographyStyle*, int);
1410 
1411 /**
1412  * @brief get line height.
1413  *
1414  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1415  * @param OH_Drawing_Typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
1416  * @param int Indicates the line number.
1417  * @return Returns line height.
1418  * @since 11
1419  * @version 1.0
1420  */
1421 double OH_Drawing_TypographyGetLineHeight(OH_Drawing_Typography*, int);
1422 
1423 /**
1424  * @brief get line width.
1425  *
1426  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1427  * @param OH_Drawing_Typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
1428  * @param int Indicates the line number.
1429  * @return Returns line width.
1430  * @since 11
1431  * @version 1.0
1432  */
1433 double OH_Drawing_TypographyGetLineWidth(OH_Drawing_Typography*, int);
1434 
1435 /**
1436  * @brief get line text range.
1437  *
1438  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1439  * @param OH_Drawing_Typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
1440  * @param int Indicates the line number.
1441  * @param bool Indicates whether spaces are contained.
1442  * @return Returns line text range.
1443  * @since 12
1444  * @version 1.0
1445  */
1446 OH_Drawing_Range* OH_Drawing_TypographyGetLineTextRange(OH_Drawing_Typography*, int, bool);
1447 
1448 /**
1449  * @brief Gets the position of the specified line or the first text of the specified line
1450  *
1451  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1452  * @param OH_Drawing_Typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
1453  * @param int Line number
1454  * @param bool True is the information for the whole line, and false is the information to get the first character
1455  * @param bool Whether the text width contains whitespace
1456  * @param OH_Drawing_LineMetrics Indicates the pointer to an <b>OH_Drawing_LineMetrics</b> object.
1457  * @return return whether the information was successfully fetched.
1458  * @since 12
1459  * @version 1.0
1460  */
1461 bool OH_Drawing_TypographyGetLineInfo(OH_Drawing_Typography*, int, bool, bool, OH_Drawing_LineMetrics*);
1462 
1463 /**
1464  * @brief Creates an <b>OH_Drawing_FontDescriptor</b> object.
1465  *
1466  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1467  * @return Returns the pointer to the font descriptor object <b>OH_Drawing_FontDescriptor</b> created.
1468  * @since 12
1469  * @version 1.0
1470  */
1471 OH_Drawing_FontDescriptor* OH_Drawing_CreateFontDescriptor(void);
1472 
1473 /**
1474  * @brief Releases the memory occupied by an <b>OH_Drawing_FontDescriptor</b> object.
1475  *
1476  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1477  * @param OH_Drawing_FontDescriptor the pointer to the font descriptor object <b>OH_Drawing_FontDescriptor</b>.
1478  * @since 12
1479  * @version 1.0
1480  */
1481 void OH_Drawing_DestroyFontDescriptor(OH_Drawing_FontDescriptor*);
1482 
1483 /**
1484  * @brief Creates an <b>OH_Drawing_FontParser</b> object.
1485  *
1486  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1487  * @return Returns the pointer to the font parser object <b>OH_Drawing_FontParser</b>.
1488  * @since 12
1489  * @version 1.0
1490  */
1491 OH_Drawing_FontParser* OH_Drawing_CreateFontParser(void);
1492 
1493 /**
1494  * @brief Releases the memory occupied by an <b>OH_Drawing_FontParser</b> object.
1495  *
1496  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1497  * @param OH_Drawing_FontParser Indicates the pointer to the font parser object <b>OH_Drawing_FontParser</b>.
1498  * @since 12
1499  * @version 1.0
1500  */
1501 void OH_Drawing_DestroyFontParser(OH_Drawing_FontParser*);
1502 
1503 /**
1504  * @brief Gets a list of system font names.
1505  *
1506  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1507  * @param OH_Drawing_FontParser Indicates the pointer to the font parser object <b>OH_Drawing_FontParser</b>.
1508  * @param size_t Returns the number of obtained system font names.
1509  * @return Returns a list of obtained system fonts.
1510  * @since 12
1511  * @version 1.0
1512  */
1513 char** OH_Drawing_FontParserGetSystemFontList(OH_Drawing_FontParser*, size_t*);
1514 
1515 /**
1516  * @brief Releases the memory occupied by a list of system font names.
1517  *
1518  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1519  * @param char** Indicates the pointer to a list of system font names.
1520  * @param size_t The number of obtained system font names.
1521  * @since 12
1522  * @version 1.0
1523  */
1524 void OH_Drawing_DestroySystemFontList(char**, size_t);
1525 
1526 /**
1527  * @brief Gets information about the system font by font name.
1528  *
1529  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1530  * @param OH_Drawing_FontParser Indicates the pointer to the font parser object <b>OH_Drawing_FontParser</b>.
1531  * @param char** font name.
1532  * @return Returns system fonts information.
1533  * @since 12
1534  * @version 1.0
1535  */
1536 OH_Drawing_FontDescriptor* OH_Drawing_FontParserGetFontByName(OH_Drawing_FontParser*, const char*);
1537 
1538 /**
1539  * @brief Get line metrics information.
1540  *
1541  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1542  * @param OH_Drawing_Typography Indicates the pointer to a typography object <b>OH_Drawing_Typography</b>.
1543  * @return Indicates the pointer to a line metrics object <b>OH_Drawing_LineMetrics</b>.
1544  * @since 12
1545  * @version 1.0
1546  */
1547 OH_Drawing_LineMetrics* OH_Drawing_TypographyGetLineMetrics(OH_Drawing_Typography*);
1548 
1549 /**
1550  * @brief Get the number of lines.
1551  *
1552  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1553  * @param OH_Drawing_LineMetrics Indicates the pointer to a line metrics object <b>OH_Drawing_LineMetrics</b>.
1554  * @return Returns the number of lines.
1555  * @since 12
1556  * @version 1.0
1557  */
1558 size_t OH_Drawing_LineMetricsGetSize(OH_Drawing_LineMetrics*);
1559 
1560 /**
1561  * @brief Releases the memory occupied by line metrics.
1562  *
1563  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1564  * @param OH_Drawing_LineMetrics Indicates the pointer to a line metrics object <b>OH_Drawing_LineMetrics</b>.
1565  * @since 12
1566  * @version 1.0
1567  */
1568 void OH_Drawing_DestroyLineMetrics(OH_Drawing_LineMetrics*);
1569 
1570 /**
1571  * @brief Gets the specified line by line number.
1572  *
1573  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1574  * @param OH_Drawing_Typography Indicates the pointer to a typography object <b>OH_Drawing_Typography</b>.
1575  * @param int Line number.
1576  * @param OH_Drawing_LineMetrics Indicates the pointer to a line metrics object <b>OH_Drawing_LineMetrics</b>.
1577  * @return Whether the line metrics was obtained.
1578  * @since 12
1579  * @version 1.0
1580  */
1581 bool OH_Drawing_TypographyGetLineMetricsAt(OH_Drawing_Typography*, int, OH_Drawing_LineMetrics*);
1582 
1583 /**
1584  * @brief Gets element with index in vector of Indents.
1585  *
1586  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1587  * @param OH_Drawing_Typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
1588  * @param int Indicates the index to set.
1589  * @return float Indicates the element with the index in vector of Indents.
1590  * @since 12
1591  * @version 1.0
1592  */
1593 float OH_Drawing_TypographyGetIndentsWithIndex(OH_Drawing_Typography*, int);
1594 
1595 /**
1596  * @brief Set indents of the typography.
1597  *
1598  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1599  * @param OH_Drawing_Typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
1600  * @param float Indicates the pointer to the indents to set.
1601  * @since 12
1602  * @version 1.0
1603  */
1604 void OH_Drawing_TypographySetIndents(OH_Drawing_Typography*, int, const float indents[]);
1605 
1606 /**
1607  * @brief Creates an <b>OH_Drawing_TextShadow</b> object.
1608  *
1609  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1610  * @return Returns the pointer to the <b>OH_Drawing_TextShadow</b> object created.
1611  * @since 12
1612  * @version 1.0
1613  */
1614 OH_Drawing_TextShadow* OH_Drawing_CreateTextShadow(void);
1615 
1616 /**
1617  * @brief Releases the memory occupied by an <b>OH_Drawing_TextShadow</b> object.
1618  *
1619  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1620  * @param OH_Drawing_TextShadow Indicates the pointer to an <b>OH_Drawing_TextShadow</b> object.
1621  * @since 12
1622  * @version 1.0
1623  */
1624 void OH_Drawing_DestroyTextShadow(OH_Drawing_TextShadow*);
1625 
1626 /**
1627  * @brief Gets the size of vector of TextShadow in TextStyle.
1628  *
1629  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1630  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
1631  * @return Returns the size of vector.
1632  * @since 12
1633  * @version 1.0
1634  */
1635 int OH_Drawing_TextStyleGetShadowCount(OH_Drawing_TextStyle*);
1636 
1637 /**
1638  * @brief Gets the vector of TextShadow in TextStyle.
1639  *
1640  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1641  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
1642  * @return Returns the pointer to vector of <b>OH_Drawing_TextShadow</b> objects.
1643  * @since 12
1644  * @version 1.0
1645  */
1646 OH_Drawing_TextShadow* OH_Drawing_TextStyleGetShadows(OH_Drawing_TextStyle*);
1647 
1648 /**
1649  * @brief Adds element in vector of TextShadow in TextStyle.
1650  *
1651  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1652  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
1653  * @param OH_Drawing_TextShadow Indicates the pointer to an <b>OH_Drawing_TextShadow</b> object.
1654  * @since 12
1655  * @version 1.0
1656  */
1657 void OH_Drawing_TextStyleAddShadow(OH_Drawing_TextStyle*, OH_Drawing_TextShadow*);
1658 
1659 /**
1660  * @brief Clears elements in vector of TextShadow in TextStyle.
1661  *
1662  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1663  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
1664  * @since 12
1665  * @version 1.0
1666  */
1667 void OH_Drawing_TextStyleClearShadows(OH_Drawing_TextStyle*);
1668 
1669 /**
1670  * @brief Gets element in vector of TextShadow with index.
1671  *
1672  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1673  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
1674  * @param int Indicates the index to set.
1675  * @return Returns the pointer to element with the index in vector of <b>OH_Drawing_TextShadow</b> objects.
1676  * @since 12
1677  * @version 1.0
1678  */
1679 OH_Drawing_TextShadow* OH_Drawing_TextStyleGetShadowWithIndex(OH_Drawing_TextStyle*, int);
1680 
1681 /**
1682  * @brief Releases the memory occupied by  vector with <b>OH_Drawing_TextShadow</b> objects.
1683  *
1684  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1685  * @param OH_Drawing_TextShadow Indicates the pointer to an <b>OH_Drawing_TextShadow</b> object.
1686  * @since 12
1687  * @version 1.0
1688  */
1689 void OH_Drawing_DestroyTextShadows(OH_Drawing_TextShadow*);
1690 
1691 /**
1692  * @brief Sets the font weight of text typography.
1693  *
1694  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1695  * @param OH_Drawing_TypographyStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
1696  * @param int Indicates the font weight of text typography to set.
1697  * For details, see the enum <b>OH_Drawing_FontWeight</b>.
1698  * @since 12
1699  * @version 1.0
1700  */
1701 void OH_Drawing_SetTypographyTextFontWeight(OH_Drawing_TypographyStyle*, int);
1702 
1703 /**
1704  * @brief Sets the font style of text typography.
1705  *
1706  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1707  * @param OH_Drawing_TypographyStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
1708  * @param int Indicates the font style of text typography to set. For details, see the enum <b>OH_Drawing_FontStyle</b>.
1709  * @since 12
1710  * @version 1.0
1711  */
1712 void OH_Drawing_SetTypographyTextFontStyle(OH_Drawing_TypographyStyle*, int);
1713 
1714 /**
1715  * @brief Sets the font family of text typography.
1716  *
1717  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1718  * @param OH_Drawing_TypographyStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
1719  * @param char Indicates the pointer to the font family of text typography to set.
1720  * @since 12
1721  * @version 1.0
1722  */
1723 void OH_Drawing_SetTypographyTextFontFamily(OH_Drawing_TypographyStyle*, const char*);
1724 
1725 /**
1726  * @brief Sets the font size of text typography.
1727  *
1728  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1729  * @param OH_Drawing_TypographyStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
1730  * @param double Indicates the font size of text typography to set.
1731  * @since 12
1732  * @version 1.0
1733  */
1734 void OH_Drawing_SetTypographyTextFontSize(OH_Drawing_TypographyStyle*, double);
1735 
1736 /**
1737  * @brief Sets the font height of text typography.
1738  *
1739  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1740  * @param OH_Drawing_TypographyStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
1741  * @param double Indicates the font height of text typography to set.
1742  * @since 12
1743  * @version 1.0
1744  */
1745 void OH_Drawing_SetTypographyTextFontHeight(OH_Drawing_TypographyStyle*, double /* fontHeight */);
1746 
1747 /**
1748  * @brief Sets the half leading of text typography.
1749  *
1750  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1751  * @param OH_Drawing_TypographyStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
1752  * @param bool Indicates the half leading of text typography to set.
1753  * @since 12
1754  * @version 1.0
1755  */
1756 void OH_Drawing_SetTypographyTextHalfLeading(OH_Drawing_TypographyStyle*, bool);
1757 
1758 /**
1759  * @brief Sets whether to enable line style for text typography.
1760  *
1761  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1762  * @param OH_Drawing_TypographyStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
1763  * @param bool Indicates whether the line style for text typography is used.
1764  * @since 12
1765  * @version 1.0
1766  */
1767 void OH_Drawing_SetTypographyTextUseLineStyle(OH_Drawing_TypographyStyle*, bool);
1768 
1769 /**
1770  * @brief Sets the font weight of line style for text typography.
1771  *
1772  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1773  * @param OH_Drawing_TypographyStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
1774  * @param int Indicates the font weight of line style for text typography to set.
1775  * For details, see the enum <b>OH_Drawing_FontWeight</b>.
1776  * @since 12
1777  * @version 1.0
1778  */
1779 void OH_Drawing_SetTypographyTextLineStyleFontWeight(OH_Drawing_TypographyStyle*, int);
1780 
1781 /**
1782  * @brief Sets the font style of line style for text typography.
1783  *
1784  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1785  * @param OH_Drawing_TypographyStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
1786  * @param int Indicates the font style of line style for text typography to set.
1787  * For details, see the enum <b>OH_Drawing_FontStyle</b>.
1788  * @since 12
1789  * @version 1.0
1790  */
1791 void OH_Drawing_SetTypographyTextLineStyleFontStyle(OH_Drawing_TypographyStyle*, int);
1792 
1793 /**
1794  * @brief Sets the font families of line style for text typography.
1795  *
1796  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1797  * @param OH_Drawing_TypographyStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
1798  * @param int Indicates the number of font families to set.
1799  * @param char Indicates the pointer to the font families of line style for text typography to set.
1800  * @since 12
1801  * @version 1.0
1802  */
1803 void OH_Drawing_SetTypographyTextLineStyleFontFamilies(OH_Drawing_TypographyStyle*,
1804     int /* fontFamiliesNumber */, const char* fontFamilies[]);
1805 
1806 /**
1807  * @brief Sets the font size of line style for text typography.
1808  *
1809  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1810  * @param OH_Drawing_TypographyStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
1811  * @param double Indicates the font size of line style for text typography to set.
1812  * @since 12
1813  * @version 1.0
1814  */
1815 void OH_Drawing_SetTypographyTextLineStyleFontSize(OH_Drawing_TypographyStyle*, double);
1816 
1817 /**
1818  * @brief Sets the font height of line style for text typography.
1819  *
1820  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1821  * @param OH_Drawing_TypographyStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
1822  * @param double Indicates the font height of line style for text typography to set.
1823  * @since 12
1824  * @version 1.0
1825  */
1826 void OH_Drawing_SetTypographyTextLineStyleFontHeight(OH_Drawing_TypographyStyle*, double /* fontHeight */);
1827 
1828 /**
1829  * @brief Sets the half leading of line style for text typography.
1830  *
1831  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1832  * @param OH_Drawing_TypographyStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
1833  * @param bool Indicates the half leading of line for text typography to set.
1834  * @since 12
1835  * @version 1.0
1836  */
1837 void OH_Drawing_SetTypographyTextLineStyleHalfLeading(OH_Drawing_TypographyStyle*, bool);
1838 
1839 /**
1840  * @brief Sets the spacing scale of line style for text typography.
1841  *
1842  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1843  * @param OH_Drawing_TypographyStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
1844  * @param double Indicates the space scale of line for text typography to set.
1845  * @since 12
1846  * @version 1.0
1847  */
1848 void OH_Drawing_SetTypographyTextLineStyleSpacingScale(OH_Drawing_TypographyStyle*, double);
1849 
1850 /**
1851  * @brief Sets whether only line style is enabled for text typography.
1852  *
1853  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1854  * @param OH_Drawing_TypographyStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
1855  * @param bool Indicates the line style for text typography to set only.
1856  * @since 12
1857  * @version 1.0
1858  */
1859 void OH_Drawing_SetTypographyTextLineStyleOnly(OH_Drawing_TypographyStyle*, bool);
1860 
1861 /**
1862  * @brief get line fontmetrics.
1863  *
1864  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1865  * @param OH_Drawing_Typography Indicates the pointer to a typography object {@link OH_Drawing_Typography}.
1866  * @param OH_Drawing_TextStyle Indicates the pointer to a text style object {@link OH_Drawing_TextStyle}.
1867  * @param OH_Drawing_Font_Metrics Indicates the pointer to a font metrics object {@link OH_Drawing_Font_Metrics}.
1868  * @return Whether the font metrics was obtained.
1869  * @since 12
1870  * @version 1.0
1871  */
1872 bool OH_Drawing_TextStyleGetFontMetrics(OH_Drawing_Typography*, OH_Drawing_TextStyle*, OH_Drawing_Font_Metrics*);
1873 
1874 /**
1875  * @brief get line fontmetrics.
1876  *
1877  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1878  * @param OH_Drawing_TypographyStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
1879  * @param OH_Drawing_TextStyle Indicates the pointer to a text style object {@link OH_Drawing_TextStyle}.
1880  * @since 12
1881  * @version 1.0
1882  */
1883 void OH_Drawing_SetTypographyTextStyle(OH_Drawing_TypographyStyle*, OH_Drawing_TextStyle*);
1884 
1885 /**
1886  * @brief set line text range.
1887  *
1888  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1889  * @param OH_Drawing_Typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.
1890  * @param char Indicates the line textellipsis.
1891  * @since 12
1892  * @version 1.0
1893  */
1894 void OH_Drawing_SetTypographyTextEllipsis(OH_Drawing_TypographyStyle*, const char*);
1895 
1896 /**
1897  * @brief Sets the locale of lines in a text file.
1898  *
1899  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1900  * @param OH_Drawing_TypographyStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
1901  * @param char Indicates the pointer to the locale to set.
1902  * @since 12
1903  * @version 1.0
1904  */
1905 void OH_Drawing_SetTypographyTextLocale(OH_Drawing_TypographyStyle*, const char*);
1906 
1907 /**
1908  * @brief Sets the textSplitRatio of lines in a text file.
1909  *
1910  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1911  * @param OH_Drawing_TypographyStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
1912  * @param float Indicates the textSplitRatio of lines to set..
1913  * @since 12
1914  * @version 1.0
1915  */
1916 void OH_Drawing_SetTypographyTextSplitRatio(OH_Drawing_TypographyStyle*,  float);
1917 
1918 /**
1919  * @brief Gets the TextStyle of lines in a text file.
1920  *
1921  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1922  * @param OH_Drawing_TypographyStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
1923  * @since 12
1924  * @version 1.0
1925  */
1926 OH_Drawing_TextStyle* OH_Drawing_TypographyGetTextStyle(OH_Drawing_TypographyStyle*);
1927 
1928 /**
1929  * @brief Gets the EffectiveAlign of lines in a text file.
1930  *
1931  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1932  * @param OH_Drawing_TypographyStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
1933  * @since 12
1934  * @version 1.0
1935  */
1936 int OH_Drawing_TypographyGetEffectiveAlignment(OH_Drawing_TypographyStyle*);
1937 
1938 /**
1939  * @brief Gets the IsUnlimitedLines of lines in a text file.
1940  *
1941  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1942  * @param OH_Drawing_TypographyStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
1943  * @since 12
1944  * @version 1.0
1945  */
1946 bool  OH_Drawing_TypographyIsLineUnlimited(OH_Drawing_TypographyStyle*);
1947 
1948 /**
1949  * @brief Gets the IsEllipsized of lines in a text file.
1950  *
1951  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1952  * @param OH_Drawing_TypographyStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
1953  * @return Returns IsEllipsized of text.
1954  * @since 12
1955  * @version 1.0
1956  */
1957 bool  OH_Drawing_TypographyIsEllipsized(OH_Drawing_TypographyStyle*);
1958 
1959 /**
1960  * @brief Set struct of background rect and styleId of text.
1961  *
1962  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1963  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
1964  * @param OH_Drawing_RectStyle_Info Indicates the pointer to an <b>OH_Drawing_RectStyle_Info</b> object.
1965  * @param styleId Indicates the styleId of text to set.
1966  * @since 12
1967  * @version 1.0
1968  */
1969 void OH_Drawing_TextStyleSetBackgroundRect(OH_Drawing_TextStyle*, const OH_Drawing_RectStyle_Info*, int styleId);
1970 
1971 /**
1972  * @brief Add symbols in creating typography.
1973  *
1974  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1975  * @param OH_Drawing_TypographyCreate Indicates the pointer to an <b>OH_Drawing_TypographyCreate</b> object.
1976  * @param symbol Indicates the symbol to add.
1977  * @since 12
1978  * @version 1.0
1979  */
1980 void OH_Drawing_TypographyHandlerAddSymbol(OH_Drawing_TypographyCreate*, uint32_t symbol);
1981 
1982 /**
1983  * @brief Add font feature.
1984  *
1985  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1986  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
1987  * @param tag Indicates the pointer to the tag to set.
1988  * @param value Indicates the value to set.
1989  * @since 12
1990  * @version 1.0
1991  */
1992 void OH_Drawing_TextStyleAddFontFeature(OH_Drawing_TextStyle*, const char* tag, int value);
1993 
1994 /**
1995  * @brief Add font variation.
1996  *
1997  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1998  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
1999  * @param char* Indicates the pointer to font variation axis.
2000  * @param float Indicates the font variation value to set.
2001  * @since 12
2002  * @version 1.0
2003  */
2004 void OH_Drawing_TextStyleAddFontVariation(OH_Drawing_TextStyle*, const char* /* axis */, const float /* value */);
2005 
2006 /**
2007  * @brief Get all font features.
2008  *
2009  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2010  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
2011  * @return OH_Drawing_FontFeature Indicates the pointer to an array of structures of OH_Drawing_FontFeature.
2012  * Get size of font feature by OH_Drawing_TextStyleGetFontFeatureSize.
2013  * @since 12
2014  * @version 1.0
2015  */
2016 OH_Drawing_FontFeature* OH_Drawing_TextStyleGetFontFeatures(OH_Drawing_TextStyle*);
2017 
2018 /**
2019  * @brief Release the memory occupied by array of structures of font features.
2020  *
2021  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2022  * @param OH_Drawing_FontFeature Indicates the pointer to an array of structures of OH_Drawing_FontFeature.
2023  * @param fontFeatureSize Indicates the size of array of structures of OH_Drawing_FontFeature.
2024  * @since 12
2025  * @version 1.0
2026  */
2027 void OH_Drawing_TextStyleDestroyFontFeatures(OH_Drawing_FontFeature*, size_t fontFeatureSize);
2028 
2029 /**
2030  * @brief Get size of font features.
2031  *
2032  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2033  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
2034  * @return Returns the size of fontfeatures map.
2035  * @since 12
2036  * @version 1.0
2037  */
2038 size_t OH_Drawing_TextStyleGetFontFeatureSize(OH_Drawing_TextStyle*);
2039 
2040 /**
2041  * @brief Clear elements of font features.
2042  *
2043  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2044  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
2045  * @since 12
2046  * @version 1.0
2047  */
2048 void OH_Drawing_TextStyleClearFontFeature(OH_Drawing_TextStyle*);
2049 
2050 /**
2051  * @brief Set baseline shift of text.
2052  *
2053  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2054  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
2055  * @param lineShift Indicates the baseline shift to set.
2056  * @since 12
2057  * @version 1.0
2058  */
2059 void OH_Drawing_TextStyleSetBaselineShift(OH_Drawing_TextStyle*, double lineShift);
2060 
2061 /**
2062  * @brief Get baseline shift of text.
2063  *
2064  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2065  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
2066  * @return Returns the baseline shift.
2067  * @since 12
2068  * @version 1.0
2069  */
2070 double OH_Drawing_TextStyleGetBaselineShift(OH_Drawing_TextStyle*);
2071 
2072 /**
2073  * @brief Gets the text color.
2074  *
2075  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2076  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
2077  * @return Returns the text color.
2078  * @since 12
2079  * @version 1.0
2080  */
2081 uint32_t OH_Drawing_TextStyleGetColor(OH_Drawing_TextStyle*);
2082 
2083 /**
2084  * @brief Gets text decoration style.
2085  *
2086  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2087  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
2088  * @return Returns text decoration style.
2089  * @since 12
2090  * @version 1.0
2091  */
2092 OH_Drawing_TextDecorationStyle OH_Drawing_TextStyleGetDecorationStyle(OH_Drawing_TextStyle*);
2093 
2094 /**
2095  * @brief Gets font weight.
2096  *
2097  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2098  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
2099  * @return Returns font Weight.
2100  * @since 12
2101  * @version 1.0
2102  */
2103 OH_Drawing_FontWeight OH_Drawing_TextStyleGetFontWeight(OH_Drawing_TextStyle*);
2104 
2105 /**
2106  * @brief Gets font style.
2107  *
2108  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2109  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
2110  * @return Returns font style.
2111  * @since 12
2112  * @version 1.0
2113  */
2114 OH_Drawing_FontStyle OH_Drawing_TextStyleGetFontStyle(OH_Drawing_TextStyle*);
2115 
2116 /**
2117  * @brief Gets the font baseline.
2118  *
2119  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2120  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
2121  * @return Returns the font baseline.
2122  * @since 12
2123  * @version 1.0
2124  */
2125 OH_Drawing_TextBaseline OH_Drawing_TextStyleGetBaseline(OH_Drawing_TextStyle*);
2126 
2127 /**
2128  * @brief Gets a list of font families.
2129  *
2130  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2131  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
2132  * @param num Indicates count of font families result.
2133  * @return Returns a list of font families.
2134  * @since 12
2135  * @version 1.0
2136  */
2137 char** OH_Drawing_TextStyleGetFontFamilies(OH_Drawing_TextStyle*, size_t* num);
2138 
2139 /**
2140  * @brief Releases the memory occupied by a list of font families.
2141  *
2142  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2143  * @param fontFamilies Indicates the pointer to a list of font families.
2144  * @param num Indicates the count of obtained font families.
2145  * @since 12
2146  * @version 1.0
2147  */
2148 void OH_Drawing_TextStyleDestroyFontFamilies(char** fontFamilies, size_t num);
2149 
2150 /**
2151  * @brief Gets font size.
2152  *
2153  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2154  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
2155  * @return Returns font size.
2156  * @since 12
2157  * @version 1.0
2158  */
2159 double OH_Drawing_TextStyleGetFontSize(OH_Drawing_TextStyle*);
2160 
2161 /**
2162  * @brief Gets the letter spacing of the text.
2163  *
2164  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2165  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
2166  * @return Returns the size of the letter spacing.
2167  * @since 12
2168  * @version 1.0
2169  */
2170 double OH_Drawing_TextStyleGetLetterSpacing(OH_Drawing_TextStyle*);
2171 
2172 /**
2173  * @brief Gets the word spacing of the text.
2174  *
2175  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2176  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
2177  * @return Returns word spacing size.
2178  * @since 12
2179  * @version 1.0
2180  */
2181 double OH_Drawing_TextStyleGetWordSpacing(OH_Drawing_TextStyle*);
2182 
2183 /**
2184  * @brief Gets font height.
2185  *
2186  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2187  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
2188  * @return Returns font height.
2189  * @since 12
2190  * @version 1.0
2191  */
2192 double OH_Drawing_TextStyleGetFontHeight(OH_Drawing_TextStyle*);
2193 
2194 /**
2195  * @brief Gets whether to set the text to half line spacing.
2196  *
2197  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2198  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
2199  * @return Returns true indicates that the spacing takes effect, false indicates that the spacing does not take effect.
2200  * @since 12
2201  * @version 1.0
2202  */
2203 bool OH_Drawing_TextStyleGetHalfLeading(OH_Drawing_TextStyle*);
2204 
2205 /**
2206  * @brief Gets the locale.
2207  *
2208  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2209  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
2210  * @return Returns a locale of data type as a pointer to a char. As with the TextStyle lifecycle.
2211  * No release is required and the return value is invalidated after the set method is called.
2212  * @since 12
2213  * @version 1.0
2214  */
2215 const char* OH_Drawing_TextStyleGetLocale(OH_Drawing_TextStyle*);
2216 
2217 /**
2218  * @brief Set mode of applying the leading over and under text.
2219  *
2220  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2221  * @param OH_Drawing_TypographyStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
2222  * @param heightMode Indicates the mode to set.
2223  * @since 12
2224  * @version 1.0
2225  */
2226 void OH_Drawing_TypographyTextSetHeightBehavior(OH_Drawing_TypographyStyle*, OH_Drawing_TextHeightBehavior heightMode);
2227 
2228 /**
2229  * @brief Get mode of applying the leading over and under text.
2230  *
2231  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2232  * @param OH_Drawing_TypographyStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
2233  * @return Returns the mode.
2234  * @since 12
2235  * @version 1.0
2236  */
2237 OH_Drawing_TextHeightBehavior OH_Drawing_TypographyTextGetHeightBehavior(OH_Drawing_TypographyStyle*);
2238 
2239 /**
2240  * @brief Mark the Typography as dirty, and initially state the Typography.
2241  *
2242  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2243  * @param OH_Drawing_Typography Indicates the pointer to the text <b>OH_Drawing_Typography</b> object.
2244  * @since 12
2245  * @version 1.0
2246  */
2247 void OH_Drawing_TypographyMarkDirty(OH_Drawing_Typography*);
2248 
2249 /**
2250  * @brief Get the unresolved Glyphs count of lines in a text.
2251  *
2252  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2253  * @param OH_Drawing_Typography Indicates the pointer to the text <b>OH_Drawing_Typography</b> object.
2254  * @return Returns unresolved Glyphs count.
2255  * @since 12
2256  * @version 1.0
2257  */
2258 int32_t OH_Drawing_TypographyGetUnresolvedGlyphsCount(OH_Drawing_Typography*);
2259 
2260 /**
2261  * @brief Update the font size of lines in a text.
2262  *
2263  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2264  * @param OH_Drawing_Typography Indicates the pointer to the text <b>OH_Drawing_Typography</b> object.
2265  * @param from Indicates the source of the original font size.
2266  * @param to Indicates the destination of the updated font size.
2267  * @param fontSize Indicates the size of the font.
2268  * @since 12
2269  * @version 1.0
2270  */
2271 void OH_Drawing_TypographyUpdateFontSize(OH_Drawing_Typography*, size_t from, size_t to, float fontSize);
2272 
2273 /**
2274  * @brief Get whether the text layout enables line styles.
2275  *
2276  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2277  * @param OH_Drawing_TypographyStyle Indicates the pointer to the text <b>OH_Drawing_TypographyStyle</b> object.
2278  * @return Whether or not to enable line styles in text layout only, true means enable, false means disable.
2279  * @since 12
2280  * @version 1.0
2281  */
2282 bool OH_Drawing_TypographyTextGetLineStyle(OH_Drawing_TypographyStyle*);
2283 
2284 /**
2285  * @brief Get the font weight of line style for text typography.
2286  *
2287  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2288  * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object <b>OH_Drawing_TypographyStyle</b>.
2289  * @return Return the font weight of line style for text typography. For details,
2290  * see the enum <b>OH_Drawing_FontWeight</b>.
2291  * @since 12
2292  * @version 1.0
2293  */
2294 OH_Drawing_FontWeight OH_Drawing_TypographyTextlineStyleGetFontWeight(OH_Drawing_TypographyStyle*);
2295 
2296 /**
2297  * @brief Get the font style of line style for text typography.
2298  *
2299  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2300  * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object <b>OH_Drawing_TypographyStyle</b>.
2301  * @return Return the font style of line style for text typography. For details,
2302  * see the enum <b>OH_Drawing_FontStyle</b>.
2303  * @since 12
2304  * @version 1.0
2305  */
2306 OH_Drawing_FontStyle OH_Drawing_TypographyTextlineStyleGetFontStyle(OH_Drawing_TypographyStyle*);
2307 
2308 /**
2309  * @brief Get the font families of line style for text typography.
2310  *
2311  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2312  * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object <b>OH_Drawing_TypographyStyle</b>.
2313  * @param num The number of obtained font names.
2314  * @return Return the font families of line style for text typography.
2315  * @since 12
2316  * @version 1.0
2317  */
2318 char** OH_Drawing_TypographyTextlineStyleGetFontFamilies(OH_Drawing_TypographyStyle*, size_t* num);
2319 
2320 /**
2321  * @brief Releases the memory occupied by a list of font families names.
2322  *
2323  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2324  * @param fontFamilies Indicates the pointer to a list of font families names.
2325  * @param fontFamiliesNum Indicates the number of obtained font names.
2326  * @since 12
2327  * @version 1.0
2328  */
2329 void OH_Drawing_TypographyTextlineStyleDestroyFontFamilies(char** fontFamilies, size_t fontFamiliesNum);
2330 
2331 /**
2332  * @brief Get the font size of font size for text typography.
2333  *
2334  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2335  * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object <b>OH_Drawing_TypographyStyle</b>.
2336  * @return Return the font size of font size for text typography.
2337  * @since 12
2338  * @version 1.0
2339  */
2340 double OH_Drawing_TypographyTextlineStyleGetFontSize(OH_Drawing_TypographyStyle*);
2341 
2342 /**
2343  * @brief Get the font height scale in text layout.
2344  *
2345  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2346  * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object <b>OH_Drawing_TypographyStyle</b>.
2347  * @return Retrun the font height scale in text layout.
2348  * @since 12
2349  * @version 1.0
2350  */
2351 double OH_Drawing_TypographyTextlineStyleGetHeightScale(OH_Drawing_TypographyStyle*);
2352 
2353 /**
2354  * @brief Get whether to enable font height for line styles in text layout only.
2355  *
2356  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2357  * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object <b>OH_Drawing_TypographyStyle</b>.
2358  * @return Whether or not to enable the font height for line styles in text layout only,
2359  * true means enable, false means disable.
2360  * @since 12
2361  * @version 1.0
2362  */
2363 bool OH_Drawing_TypographyTextlineStyleGetHeightOnly(OH_Drawing_TypographyStyle*);
2364 
2365 /**
2366  * @brief Get the half leading of line style for text typography.
2367  *
2368  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2369  * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object <b>OH_Drawing_TypographyStyle</b>.
2370  * @return Whether to enable the text line half leading style, true means enable, false means disable.
2371  * @since 12
2372  * @version 1.0
2373  */
2374 bool OH_Drawing_TypographyTextlineStyleGetHalfLeading(OH_Drawing_TypographyStyle*);
2375 
2376 /**
2377  * @brief Get the spacing scale of line style for text typography.
2378  *
2379  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2380  * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object <b>OH_Drawing_TypographyStyle</b>.
2381  * @return Return the spacing scale of line style for text typography.
2382  * @since 12
2383  * @version 1.0
2384  */
2385 double OH_Drawing_TypographyTextlineStyleGetSpacingScale(OH_Drawing_TypographyStyle*);
2386 
2387 /**
2388  * @brief Get whether only line style is enabled for text typography.
2389  *
2390  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2391  * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object <b>OH_Drawing_TypographyStyle</b>.
2392  * @return Returns whether only line style is enabled for text layout, true means it is enabled, false means it is not.
2393  * @since 12
2394  * @version 1.0
2395  */
2396 bool OH_Drawing_TypographyTextlineGetStyleOnly(OH_Drawing_TypographyStyle*);
2397 
2398 /**
2399  * @brief Get the text alignment mode.
2400  *
2401  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2402  * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object <b>OH_Drawing_TypographyStyle</b>.
2403  * @return Return the text alignment mode. For details, see the enum <b>OH_Drawing_TextAlign</b>.
2404  * @since 12
2405  * @version 1.0
2406  */
2407 OH_Drawing_TextAlign OH_Drawing_TypographyGetTextAlign(OH_Drawing_TypographyStyle*);
2408 
2409 /**
2410  * @brief Get the text direction.
2411  *
2412  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2413  * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object <b>OH_Drawing_TypographyStyle</b>.
2414  * @return Return the text direction. For details, see the enum <b>OH_Drawing_TextDirection</b>.
2415  * @since 12
2416  * @version 1.0
2417  */
2418 OH_Drawing_TextDirection OH_Drawing_TypographyGetTextDirection(OH_Drawing_TypographyStyle*);
2419 
2420 /**
2421  * @brief Sets the maximum number of lines in a text.
2422  *
2423  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2424  * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object <b>OH_Drawing_TypographyStyle</b>.
2425  * @return Return the maximum number of lines in a text.
2426  * @since 12
2427  * @version 1.0
2428  */
2429 size_t OH_Drawing_TypographyGetTextMaxLines(OH_Drawing_TypographyStyle*);
2430 
2431 /**
2432  * @brief Get the ellipsis of lines in a text.
2433  *
2434  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2435  * @param OH_Drawing_TypographyStyle Indicates the pointer to a typography style object <b>OH_Drawing_TypographyStyle</b>.
2436  * @return Return the ellipsis of lines in a text.
2437  * @since 12
2438  * @version 1.0
2439  */
2440 char* OH_Drawing_TypographyGetTextEllipsis(OH_Drawing_TypographyStyle*);
2441 
2442 /**
2443  * @brief Releases the memory occupied by a list of Ellipsis names.
2444  *
2445  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2446  * @param ellipsis Indicates the pointer to a list of Ellipsis names.
2447  * @since 12
2448  * @version 1.0
2449  */
2450 void OH_Drawing_TypographyDestroyEllipsis(char* ellipsis);
2451 
2452 /**
2453  * @brief Overriding the class ParagraphStyle equals operator.
2454  *
2455  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2456  * @param from Indicates source of comparison object.
2457  * @param to Indicates comparison object.
2458  * @return Compare result.
2459  * @since 12
2460  * @version 1.0
2461  */
2462 bool OH_Drawing_TypographyStyleEquals(OH_Drawing_TypographyStyle* from, OH_Drawing_TypographyStyle* to);
2463 
2464 /**
2465  * @brief Gets system font configuration information.
2466  *
2467  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2468  * @param OH_Drawing_FontConfigInfoErrorCode Indicates error code returned, based on the error code to
2469  * release the memory of system font configuration information.
2470  * For details, see the enum <b>OH_Drawing_FontConfigInfoErrorCode</b>.
2471  * @return Returns a pointer to system font configuration information.
2472  * Indicates the pointer to an <b>OH_Drawing_FontConfigInfo</b> object.
2473  * @since 12
2474  * @version 1.0
2475  */
2476 OH_Drawing_FontConfigInfo* OH_Drawing_GetSystemFontConfigInfo(OH_Drawing_FontConfigInfoErrorCode*);
2477 
2478 /**
2479  * @brief Releases the memory occupied by system font configuration information.
2480  *
2481  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2482  * @param OH_Drawing_FontConfigInfo Indicates the pointer to an <b>OH_Drawing_FontConfigInfo</b> object.
2483  * @since 12
2484  * @version 1.0
2485  */
2486 void OH_Drawing_DestroySystemFontConfigInfo(OH_Drawing_FontConfigInfo*);
2487 
2488 /**
2489  * @brief Sets the strut style for text typography.
2490  *
2491  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2492  * @param OH_Drawing_TypographyStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
2493  * @param OH_Drawing_StrutStyle Indicates the pointer of <b>OH_Drawing_StrutStyle</b> object.
2494  * @since 12
2495  * @version 1.0
2496  */
2497 void OH_Drawing_SetTypographyStyleTextStrutStyle(OH_Drawing_TypographyStyle*, OH_Drawing_StrutStyle*);
2498 
2499 /**
2500  * @brief Releases the memory occupied by an <b>OH_Drawing_StrutStyle</b> object.
2501  *
2502  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2503  * @param OH_Drawing_StrutStyle Indicates the pointer of <b>OH_Drawing_StrutStyle</b> object.
2504  * @since 12
2505  * @version 1.0
2506  */
2507 void OH_Drawing_TypographyStyleDestroyStrutStyle(OH_Drawing_StrutStyle*);
2508 
2509 /**
2510  * @brief Gets the strut style for text typography.
2511  *
2512  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2513  * @param OH_Drawing_TypographyStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
2514  * @return Returns the pointer of <b>OH_Drawing_StrutStyle</b> object.
2515  * @since 12
2516  * @version 1.0
2517  */
2518 OH_Drawing_StrutStyle* OH_Drawing_TypographyStyleGetStrutStyle(OH_Drawing_TypographyStyle*);
2519 
2520 /**
2521  * @brief Overriding the struct StrutStyle equals operator.
2522  *
2523  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2524  * @param from Indicates source of comparison object.
2525  * @param to Indicates comparison object.
2526  * @since 12
2527  * @version 1.0
2528  */
2529 bool OH_Drawing_TypographyStyleStrutStyleEquals(OH_Drawing_StrutStyle* from, OH_Drawing_StrutStyle* to);
2530 
2531 /**
2532  * @brief Sets the hinting of text typography.
2533  *
2534  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2535  * @param OH_Drawing_TypographyStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
2536  * @param hintsEnabled Indicates the hinting of text typography.
2537  * @since 12
2538  * @version 1.0
2539  */
2540 void OH_Drawing_TypographyStyleSetHintsEnabled(OH_Drawing_TypographyStyle* style, bool hintsEnabled);
2541 
2542 /**
2543  * @brief Getting all font metrics from target row.
2544  *
2545  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2546  * @param OH_Drawing_Typography Indicates a pointer to a typesetting object.
2547  * @param lineNumber Indicates specifies the number of rows.
2548  * @param fontMetricsSize Indicates the return size of font metrics struct from current line.
2549  * @return Returns all character measures for the current row.
2550  * @since 12
2551  * @version 1.0
2552  */
2553 OH_Drawing_Font_Metrics* OH_Drawing_TypographyGetLineFontMetrics(OH_Drawing_Typography*,
2554     size_t lineNumber, size_t* fontMetricsSize);
2555 
2556 /**
2557  * @brief Free up all the space taken up by the lineFontMetric.
2558  *
2559  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2560  * @param OH_Drawing_Font_Metrics Indicates the first address of the lineFontMetric gather to be destroyed.
2561  * @since 12
2562  * @version 1.0
2563  */
2564 void OH_Drawing_TypographyDestroyLineFontMetrics(OH_Drawing_Font_Metrics*);
2565 
2566 /**
2567  * @brief Sets the text style, including font weight, font width and font slant.
2568  *
2569  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2570  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
2571  * @param OH_Drawing_FontStyleStruct Indicates an <b>OH_Drawing_FontStyleStruct</b> object.
2572  * @since 12
2573  * @version 1.0
2574  */
2575 void OH_Drawing_SetTextStyleFontStyleStruct(OH_Drawing_TextStyle* drawingTextStyle,
2576     OH_Drawing_FontStyleStruct fontStyle);
2577 
2578 /**
2579  * @brief Gets the text style, including font weight, font width and font slant.
2580  *
2581  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2582  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
2583  * @return Returns the <b>OH_Drawing_FontStyleStruct</b> object getted.
2584  * @since 12
2585  * @version 1.0
2586  */
2587 OH_Drawing_FontStyleStruct OH_Drawing_TextStyleGetFontStyleStruct(OH_Drawing_TextStyle* drawingTextStyle);
2588 
2589 /**
2590  * @brief Sets the typography style, including font weight, font width and font slant.
2591  *
2592  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2593  * @param OH_Drawing_TypographyStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
2594  * @param OH_Drawing_FontStyleStruct Indicates an <b>OH_Drawing_FontStyleStruct</b> object.
2595  * @since 12
2596  * @version 1.0
2597  */
2598 void OH_Drawing_SetTypographyStyleFontStyleStruct(OH_Drawing_TypographyStyle* drawingStyle,
2599     OH_Drawing_FontStyleStruct fontStyle);
2600 
2601 /**
2602  * @brief Gets the typography style, including font weight, font width and font slant.
2603  *
2604  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2605  * @param OH_Drawing_TypographyStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
2606  * @return Returns the <b>OH_Drawing_FontStyleStruct</b> object getted.
2607  * @since 12
2608  * @version 1.0
2609  */
2610 OH_Drawing_FontStyleStruct OH_Drawing_TypographyStyleGetFontStyleStruct(OH_Drawing_TypographyStyle* drawingStyle);
2611 
2612 /**
2613  * @brief Gets whether the two TextStyle objects are equal.
2614  *
2615  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2616  * @param style Indicates source of comparison <b>OH_Drawing_TextStyle</b> object.
2617  * @param comparedStyle Indicates comparison <b>OH_Drawing_TextStyle</b> object.
2618  * @return Compare result.
2619  * @since 12
2620  * @version 1.0
2621  */
2622 bool OH_Drawing_TextStyleIsEqual(const OH_Drawing_TextStyle* style, const OH_Drawing_TextStyle* comparedStyle);
2623 
2624 /**
2625  * @brief Gets whether the font properties of two TextStyle objects are equal.
2626  *
2627  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2628  * @param style Indicates source of <b>comparison OH_Drawing_TextStyle</b> object.
2629  * @param comparedStyle Indicates comparison <b>OH_Drawing_TextStyle</b> object.
2630  * @return Compare result.
2631  * @since 12
2632  * @version 1.0
2633  */
2634 bool OH_Drawing_TextStyleIsEqualByFont(const OH_Drawing_TextStyle* style, const OH_Drawing_TextStyle* comparedStyle);
2635 
2636 /**
2637  * @brief Gets whether two TextStyle objects match attributes
2638  *
2639  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2640  * @param textStyleType Indicates enumerates of text style type.
2641  * @param style Indicates source of comparison <b>OH_Drawing_TextStyle</b> object.
2642  * @param comparedStyle Indicates comparison <b>OH_Drawing_TextStyle</b> object.
2643  * @return Match attributes result.
2644  * @since 12
2645  * @version 1.0
2646  */
2647 bool OH_Drawing_TextStyleIsAttributeMatched(const OH_Drawing_TextStyle* style,
2648     const OH_Drawing_TextStyle* comparedStyle, OH_Drawing_TextStyleType textStyleType);
2649 
2650 /**
2651  * @brief Set placeholder of TextStyle.
2652  *
2653  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2654  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
2655  * @since 12
2656  * @version 1.0
2657  */
2658 void OH_Drawing_TextStyleSetPlaceholder(OH_Drawing_TextStyle* style);
2659 
2660 /**
2661  * @brief Gets whether placeholder is enable.
2662  *
2663  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2664  * @param OH_Drawing_TextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.
2665  * @return Whether placeholder is enable.
2666  * @since 12
2667  * @version 1.0
2668  */
2669 bool OH_Drawing_TextStyleIsPlaceholder(OH_Drawing_TextStyle* style);
2670 
2671 /**
2672  * @brief Gets text alignment mode.
2673  *
2674  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2675  * @param OH_Drawing_TypographyStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
2676  * @return Returns text alignment mode.
2677  * @since 12
2678  * @version 1.0
2679  */
2680 OH_Drawing_TextAlign OH_Drawing_TypographyStyleGetEffectiveAlignment(OH_Drawing_TypographyStyle* style);
2681 
2682 /**
2683  * @brief Gets whether the hinting is enabled.
2684  *
2685  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2686  * @param OH_Drawing_TypographyStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.
2687  * @return True, if the hinting takes effect; False, if the hinting does not take effect.
2688  * @since 12
2689  * @version 1.0
2690  */
2691 bool OH_Drawing_TypographyStyleIsHintEnabled(OH_Drawing_TypographyStyle* style);
2692 
2693 /**
2694  * @brief Releases the memory occupied by text box.
2695  *
2696  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2697  * @param OH_Drawing_TextBox Indicates the pointer to a text box object <b>OH_Drawing_TextBox</b>.
2698  * @since 12
2699  * @version 1.0
2700  */
2701 void OH_Drawing_TypographyDestroyTextBox(OH_Drawing_TextBox*);
2702 
2703 /** @brief Sets the parameter of text-shadow.
2704  *
2705  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2706  * @param OH_Drawing_TextShadow Indicates the pointer to an <b>OH_Drawing_TextShadow</b> object.
2707  * @param color Indicates the color setting of text-shadow.
2708  * @param OH_Drawing_Point Indicates the pointer to an <b>OH_Drawing_Point</b> object.
2709  * @param blurRadius Indicates the radius of blur for text-shadow.
2710  * @since 12
2711  * @version 1.0
2712  */
2713 void OH_Drawing_SetTextShadow(OH_Drawing_TextShadow* shadow, uint32_t color, OH_Drawing_Point* offset,
2714     double blurRadius);
2715 
2716 /**
2717  * @brief Get DrawingArray size.
2718  *
2719  * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2720  * @param drawingArray Indicates the pointer to the array object <b>OH_Drawing_Array</b>.
2721  * @return Size of array.
2722  * @since 14
2723  * @version 1.0
2724  */
2725 size_t OH_Drawing_GetDrawingArraySize(OH_Drawing_Array* drawingArray);
2726 
2727 #ifdef __cplusplus
2728 }
2729 #endif
2730 /** @} */
2731 #endif