OH_ArkUI_GetNodeSnapshot

Function OH_ArkUI_GetNodeSnapshot 

Source
pub unsafe extern "C" fn OH_ArkUI_GetNodeSnapshot(
    node: ArkUI_NodeHandle,
    snapshotOptions: *mut ArkUI_SnapshotOptions,
    pixelmap: *mut *mut OH_PixelmapNative,
) -> i32
Available on crate features api-12 and api-15 only.
Expand description

Get the snapshot pixelmap for the given node synchronously, will get error if the node is not on the tree or is not rendered yet. Note: the pixelmap should be released through OH_PixelmapNative_Release when it’s not used any more.

§Arguments

  • node - Indicates the target node.

  • snapshotOptions - the given configuration for taking snapshot, can be null for using default.

  • pixelmap - Pixelmap pointer created by system, it’s the out result.

§Returns

  • Returns the result code. Returns [ARKUI_ERROR_CODE_NO_ERROR] if the operation is successful. Returns [ARKUI_ERROR_CODE_PARAM_INVALID] if a parameter error occurs. Returns [ARKUI_ERROR_CODE_INTERNAL_ERROR] if the snapshot taking failed will null pixelmap returned. Returns [ARKUI_ERROR_CODE_COMPONENT_SNAPSHOT_TIMEOUT] if the snapshot taking is timeout.

Available since API-level: 15