diff --git a/graphic/graphic_2d/native_drawing/drawing_text_typography.h b/graphic/graphic_2d/native_drawing/drawing_text_typography.h index 3d49d19341445f3125c0a3196aadbad7ad63a121..e506f04be7454267ee19856ad6762dc3c3f31c17 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_typography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_typography.h @@ -2907,6 +2907,18 @@ void OH_Drawing_SetTypographyTextTab(OH_Drawing_TypographyStyle* style, OH_Drawi */ size_t OH_Drawing_GetDrawingArraySize(OH_Drawing_Array* drawingArray); +/** + * @brief Sets whether to trim excess whitespace at the end of each line for text typography. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param style Indicates the pointer to an OH_Drawing_TypographyStyle object. + * @param trimLineEndSpace Boolean value indicating whether to trim excess whitespace at the end of each line for text + * typography to set. + * @since 20 + * @version 1.0 + */ +void OH_Drawing_SetTypographyTextTrimLineEndSpace(OH_Drawing_TypographyStyle* style, bool trimLineEndSpace); + #ifdef __cplusplus } #endif diff --git a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json index e13687d429e5ac4b5fe5f166a49471ba61797534..634b179338e3bc0994f2028c14a01177b0abc1b7 100644 --- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json +++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json @@ -1793,5 +1793,9 @@ { "first_introduced": "18", "name": "OH_Drawing_CanvasDrawPixelMapNine" + }, + { + "first_introduced": "20", + "name": "OH_Drawing_SetTypographyTextTrimLineEndSpace" } ] \ No newline at end of file