Skip to main content

OH_Drawing_SetTypographyTextSplitRatio

Function OH_Drawing_SetTypographyTextSplitRatio 

Source
pub unsafe extern "C" fn OH_Drawing_SetTypographyTextSplitRatio(
    style: *mut OH_Drawing_TypographyStyle,
    textSplitRatio: f32,
)
Expand description

@brief Sets the text division ratio, which is used to determine the cursor position within a glyph when tapping to locate a character.

@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing @param style Pointer to the {@link OH_Drawing_TypographyStyle} object, which is obtained from {@link OH_Drawing_CreateTypographyStyle}. @param textSplitRatio Text split ratio. The value range is [0, 1], and the default value is 0.5. When mapping click coordinates to character positions, this is the threshold within a glyph for determining whether the position belongs to the current character or the next character. A larger value favors the current character, and a smaller value favors the next character. @since 12 @version 1.0