pub unsafe extern "C" fn OH_Drawing_ShaderEffectCreateLinearGradientWithLocalMatrix(
startPt: *const OH_Drawing_Point2D,
endPt: *const OH_Drawing_Point2D,
colors: *const u32,
pos: *const f32,
size: u32,
tileMode: OH_Drawing_TileMode,
matrix: *const OH_Drawing_Matrix,
) -> *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} . @param matrix Matrix applied on the shader effect. If matrix is NULL, an identity matrix is applied by default. @return Returns the pointer to the {@link OH_Drawing_ShaderEffect} object created. If NULL is returned, the creation fails. The possible failure cause is that no memory is available or at least one of the parameters startPt, ** endPt, and colors is NULL. @since 12 @version 1.0