Skip to main content

OH_Drawing_TextBlobCreateFromString

Function OH_Drawing_TextBlobCreateFromString 

Source
pub unsafe extern "C" fn OH_Drawing_TextBlobCreateFromString(
    str_: *const c_char,
    font: *const OH_Drawing_Font,
    textEncoding: OH_Drawing_TextEncoding,
) -> *mut OH_Drawing_TextBlob
Expand description

@brief Creates an OH_Drawing_TextBlob object from a string. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either str or font is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If textEncoding is not set to one of the enumerated values, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.

@param str Pointer to a string. @param font Pointer to the {@link OH_Drawing_Font} object. @param textEncoding Text encoding type {@link OH_Drawing_TextEncoding}. @return Returns a pointer to the created {@link OH_Drawing_TextBlob} object. @since 12 @version 1.0