pub unsafe extern "C" fn OH_ArkUI_Curve_CreateCustomCurve(
userData: *mut c_void,
interpolate: Option<unsafe extern "C" fn(fraction: f32, userdata: *mut c_void) -> f32>,
) -> ArkUI_CurveHandleapi-12 only.Expand description
Creates a custom curve.
§Arguments
userData - Indicates the custom data.
interpolate - Indicates the custom interpolation callback. fraction indicates the input x value for
interpolation when the animation starts; value range: [0,1].
The return value is the y value of the curve; value range: [0,1].
If fraction is 0, the return value 0 corresponds to the animation start point; any other return
value means that the animation jumps at the start point.
If fraction is 1, the return value 1 corresponds to the animation end point; any other return
value means that the end value of the animation is not the value of the state variable,
which will result in an effect of transition from that end value to the value of the state variable.
§Returns
Returns the pointer to the interpolation object of the curve. Returns NULL if a parameter error occurs.