Skip to main content

SDL_GetRectIntersection

Function SDL_GetRectIntersection 

Source
pub unsafe extern "C" fn SDL_GetRectIntersection(
    A: *const SDL_Rect,
    B: *const SDL_Rect,
    result: *mut SDL_Rect,
) -> bool
Expand description

Calculate the intersection of two rectangles.

If result is NULL then this function will return false.

Parameter: A an SDL_Rect structure representing the first rectangle. Parameter: B an SDL_Rect structure representing the second rectangle. Parameter: result an SDL_Rect structure filled in with the intersection of rectangles A and B. Returns: true if there is an intersection, false otherwise.

Thread Safety: It is safe to call this function from any thread.

Available Since: This function is available since SDL 3.2.0.

See Also: SDL_HasRectIntersection