Skip to main content

OH_Drawing_ShaderEffectCreateLinearGradient

Function OH_Drawing_ShaderEffectCreateLinearGradient 

Source
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_ShaderEffect
Expand description

@brief Creates an OH_Drawing_ShaderEffect that generates a linear gradient between the two specified points.

@syscap SystemCapability.Graphic.Graphic2D.NativeDrawing @param startPt Indicates the start point for the gradient. @param endPt Indicates the end point for the 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. @return Returns the pointer to the OH_Drawing_ShaderEffect object created. @since 11 @version 1.0