Wiki Page Content

Revision 2 as of 2010-09-22 23:50:13

Clear message

DRAFT

SDL_IntersectRectAndLine

Use this function to calculate the intersection of a rectangle and line segment.

Syntax

SDL_bool SDL_IntersectRectAndLine(const SDL_Rect* rect,
                                  int*            X1,
                                  int*            Y1,
                                  int*            X2,
                                  int*            Y2)

Function Parameters

rect

a pointer to the rectangle of type SDL_Rect to be compared

X1

a pointer to the starting X-coordinate of the line to be compared

Y1

a pointer to the starting Y-coordinate of the line to be compared

X2

a pointer to the ending X-coordinate of the line to be compared

Y2

a pointer to the ending Y-coordinate of the line to be compared

Return Value

SDL_TRUE if there is an intersection, SDL_FALSE otherwise.

Code Examples

You can add your code example here

Remarks

You can add useful comments here


CategoryAPI, CategoryRect

(Page Info.)
Feedback
Please include your contact information if you'd like to receive a reply.
Submit