FRect.intersectLine

Wraps SDL_IntersectFRectAndLine (from SDL 2.0.22) which attempts to clip a line segment in the boundaries of the dsdl2.FRect

struct FRect
const @trusted
static if(sdlSupport >= SDLSupport.v2_0_22)
Nullable!(FPoint[2])
intersectLine

Parameters

line FPoint[2]

set of two dsdl2.FPoints denoting the start and end coordinates of the line to clip from its intersection with the dsdl2.FRect

Return Value

Type: Nullable!(FPoint[2])

non-null Nullable!(FPoint[2]) as the clipped line if there's an intersection, otherwise a null one

Meta