Skip to main content

OH_Drawing_PathGetPositionTangent

Function OH_Drawing_PathGetPositionTangent 

Source
pub unsafe extern "C" fn OH_Drawing_PathGetPositionTangent(
    path: *mut OH_Drawing_Path,
    forceClosed: bool,
    distance: f32,
    position: *mut OH_Drawing_Point2D,
    tangent: *mut OH_Drawing_Point2D,
) -> bool
Expand description

@brief Obtains the coordinates and tangent at a distance from the start point of this path. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If any of path, position, or tangent is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.

@param path Pointer to the {@link OH_Drawing_Path} object. @param forceClosed Whether the path is measured as a closed path. The value true means that the path is considered closed during measurement, and false means that the path is measured based on the actual closed status. @param distance Distance from the start point. If the distance is less than 0, it is considered as 0. If the distance is greater than the path length, it is considered as the path length. @param position Pointer to the coordinates. @param tangent Pointer to the tangent, where tangent.x and tangent.y represent the cosine and sine of the tangent of the point, respectively. @return Returns whether the measurement is successful. true means successful; false otherwise. @since 12 @version 1.0