Skip to main content

OH_Drawing_RectIntersect

Function OH_Drawing_RectIntersect 

Source
pub unsafe extern "C" fn OH_Drawing_RectIntersect(
    rect: *mut OH_Drawing_Rect,
    other: *const OH_Drawing_Rect,
) -> bool
Expand description

@brief Checks whether two rectangles intersect and if yes, sets rect to the area of intersection. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If either rect or other is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned.

@param rect Pointer to an OH_Drawing_Rect object. @param other Pointer to an OH_Drawing_Rect object. @return Returns true if they intersect (rect is set to the intersection area); returns false otherwise (* rect* remains unchanged). @since 12 @version 1.0