Rect.intersectLine

Wraps SDL_IntersectRectAndLine which attempts to clip a line segment in the boundaries of the dsdl2.Rect

struct Rect
const @trusted
Nullable!(Point[2])
intersectLine
()

Parameters

line Point[2]

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

Return Value

Type: Nullable!(Point[2])

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

Meta