Skip to main content

OH_Drawing_ShaderEffectCreateRadialGradientWithLocalMatrix

Function OH_Drawing_ShaderEffectCreateRadialGradientWithLocalMatrix 

Source
pub unsafe extern "C" fn OH_Drawing_ShaderEffectCreateRadialGradientWithLocalMatrix(
    centerPt: *const OH_Drawing_Point2D,
    radius: f32,
    colors: *const u32,
    pos: *const f32,
    size: u32,
    tileMode: OH_Drawing_TileMode,
    matrix: *const OH_Drawing_Matrix,
) -> *mut OH_Drawing_ShaderEffect
Expand description

@brief Creates an OH_Drawing_ShaderEffect that generates a radial gradient given the center and radius.

@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing @param centerPt Indicates the center of the circle for the gradient. @param radius Indicates the radius of the circle for this gradient. @param colors Indicates the colors to be distributed between the two points. @param pos Indicates the relative position of each corresponding color in the colors array. @param size Indicates the number of colors and pos. @param tileMode Indicates the tile mode. @param matrix Indicates the pointer to an OH_Drawing_Matrix object, which represents the local matrix of the created OH_Drawing_ShaderEffect object. If matrix is nullptr, defaults to the identity matrix. @return Returns the pointer to the OH_Drawing_ShaderEffect object created. If nullptr is returned, the creation fails. The possible cause of the failure is any of centerPt, colors and pos is nullptr. @since 12 @version 1.0