Module rect
Available on crate feature
dep_sdl3
only.Expand description
Some helper functions for managing rectangles and 2D points, in both integer and floating point versions.
Structs§
- SDL_
FPoint - The structure that defines a point (using floating point values).
- SDL_
FRect - A rectangle, with the origin at the upper left (using floating point values).
- SDL_
Point - The structure that defines a point (using integers).
- SDL_
Rect - A rectangle, with the origin at the upper left (using integers).
Functions§
- SDL_
GetRect ⚠AndLine Intersection - Calculate the intersection of a rectangle and line segment.
- SDL_
GetRect ⚠AndLine Intersection Float - Calculate the intersection of a rectangle and line segment with float precision.
- SDL_
GetRect ⚠Enclosing Points - Calculate a minimal rectangle enclosing a set of points.
- SDL_
GetRect ⚠Enclosing Points Float - Calculate a minimal rectangle enclosing a set of points with float precision.
- SDL_
GetRect ⚠Intersection - Calculate the intersection of two rectangles.
- SDL_
GetRect ⚠Intersection Float - Calculate the intersection of two rectangles with float precision.
- SDL_
GetRect ⚠Union - Calculate the union of two rectangles.
- SDL_
GetRect ⚠Union Float - Calculate the union of two rectangles with float precision.
- SDL_
HasRect ⚠Intersection - Determine whether two rectangles intersect.
- SDL_
HasRect ⚠Intersection Float - Determine whether two rectangles intersect with float precision.
- SDL_
Point ⚠InRect - Determine whether a point resides inside a rectangle.
- SDL_
Point ⚠InRect Float - Determine whether a point resides inside a floating point rectangle.
- SDL_
Rect ⚠Empty - Determine whether a rectangle has no area.
- SDL_
Rect ⚠Empty Float - Determine whether a floating point rectangle can contain any point.
- SDL_
Rect ⚠ToFRect - Convert an
SDL_Rect
toSDL_FRect
- SDL_
Rects ⚠Equal - Determine whether two rectangles are equal.
- SDL_
Rects ⚠Equal Epsilon - Determine whether two floating point rectangles are equal, within some given epsilon.
- SDL_
Rects ⚠Equal Float - Determine whether two floating point rectangles are equal, within a default epsilon.