Skip to main content

OH_Drawing_TypographyGetLineTextRange

Function OH_Drawing_TypographyGetLineTextRange 

Source
pub unsafe extern "C" fn OH_Drawing_TypographyGetLineTextRange(
    typography: *mut OH_Drawing_Typography,
    lineNumber: c_int,
    includeSpaces: bool,
) -> *mut OH_Drawing_Range
Expand description

@brief Obtains the line bounds in a typography object. This function must be called after {@link OH_Drawing_TypographyLayout} is called. This function can only be used to obtain the bounds of existing lines. That is, the line index must start from 0, and the maximum index is {@link OH_Drawing_TypographyGetLineCount} – 1.

@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing @param typography Pointer to the {@link OH_Drawing_Typography} object, which is obtained from {@link OH_Drawing_CreateTypography}. @param lineNumber Row index. @param includeSpaces Whether the returned bounds contain spaces. The value true means that the bounds contain spaces, and false means the opposite. @return Pointer to the {@link OH_Drawing_Range} object. If the line index is invalid, start and end in the result value are both 0. @since 12 @version 1.0