Skip to main content

OH_Drawing_TypographyGetLineWidth

Function OH_Drawing_TypographyGetLineWidth 

Source
pub unsafe extern "C" fn OH_Drawing_TypographyGetLineWidth(
    typography: *mut OH_Drawing_Typography,
    lineNumber: c_int,
) -> f64
Expand description

@brief Obtains the line width of a specified line. This function must be called after {@link OH_Drawing_TypographyLayout} is called.

@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing @param typography Pointer to the OH_Drawing_Typography object, which is obtained from {@link OH_Drawing_CreateTypography}. @param lineNumber Index of the line to obtain, starting from 0. The maximum value is {@link OH_Drawing_TypographyGetLineCount} - 1. Returns 0.0 when the index is out of range. @return Width of the specified line, in physical pixels (px). @since 11 @version 1.0