pub unsafe extern "C" fn OH_Drawing_ShaderEffectCreateLinearGradient(
startPt: *const OH_Drawing_Point,
endPt: *const OH_Drawing_Point,
colors: *const u32,
pos: *const f32,
size: u32,
tileMode: OH_Drawing_TileMode,
) -> *mut OH_Drawing_ShaderEffectExpand description
@brief Creates a ShaderEffect object that generates a linear gradient between two points. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If any of startPt, endPt, and colors is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If tileMode is not set to one of the enumerated values, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.
@param startPt Start point. @param endPt End point. @param colors Colors to distribute between the two points. @param pos Relative position of each color in the color array. The array length must be the same as that of *colors *. If pos is NULL, colors are evenly distributed between the start point and end point. @param size Number of colors and positions (if pos is not NULL). @param tileMode Tile mode of the shader effect. For details about the available options, see {@link OH_Drawing_TileMode} . @return Returns the pointer to the OH_Drawing_ShaderEffect object created. @since 11 @version 1.0