pub unsafe extern "C" fn OH_Drawing_ShaderEffectCreateImageShader(
image: *mut OH_Drawing_Image,
tileX: OH_Drawing_TileMode,
tileY: OH_Drawing_TileMode,
samplingOptions: *const OH_Drawing_SamplingOptions,
matrix: *const OH_Drawing_Matrix,
) -> *mut OH_Drawing_ShaderEffectExpand description
@brief Creates an OH_Drawing_ShaderEffect object for an image shader. You are advised not to use the function for the canvas of the capture type because it affects the performance. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either image or samplingOptions is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If either tileX or tileY is not set to one of the enumerated values, ** OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is returned.
@param image Pointer to the {@link OH_Drawing_Image} object. @param tileX Tile mode of the shader effect in the horizontal direction. For details about the available options, see {@link OH_Drawing_TileMode}. @param tileY Tile mode of the shader effect in the vertical direction. For details about the available options, see {@link OH_Drawing_TileMode} . @param samplingOptions Pointer to the {@link OH_Drawing_SamplingOptions} object. @param matrix Pointer to the {@link OH_Drawing_Matrix} object. If the pointer array is empty, the identity matrix is passed in. @return Returns the pointer to the {@link OH_Drawing_ShaderEffect} object created. A null pointer is returned if any of the following conditions is met:
- The available memory is empty.
- image or samplingOptions is NULL.
- The value of tileX or tileY is out of the enumerated value range. @since 12 @version 1.0