OH_ArkUI_AnimatorOption_SetKeyframe

Function OH_ArkUI_AnimatorOption_SetKeyframe 

Source
pub unsafe extern "C" fn OH_ArkUI_AnimatorOption_SetKeyframe(
    option: *mut ArkUI_AnimatorOption,
    time: f32,
    value: f32,
    index: i32,
) -> i32
Available on crate feature api-12 only.
Expand description

Sets the keyframe parameters for the animation of an animator.

§Arguments

  • option - Indicates an animator parameter object.

  • time - Indicates the keyframe time. Value range: [0,1].

  • value - Indicates the keyframe value.

  • index - Indicates the keyframe index.

§Returns

  • Returns the error code. Returns [ARKUI_ERROR_CODE_NO_ERROR] if the operation is successful. Returns [ARKUI_ERROR_CODE_PARAM_INVALID] if a parameter error occurs.

Available since API-level: 12