Wiki Page Content

Differences between revisions 2 and 3
Revision 2 as of 2010-09-22 23:50:13
Size: 1315
Editor: SheenaSmith
Comment: update content - rectangle
Revision 3 as of 2010-09-24 23:46:11
Size: 1323
Editor: SheenaSmith
Comment: minor change
Deletions are marked like this. Additions are marked like this.
Line 27: Line 27:
SDL_TRUE if there is an intersection, SDL_FALSE otherwise. Returns SDL_TRUE if there is an intersection, SDL_FALSE otherwise.

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

Returns 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

None: SDL_IntersectRectAndLine (last edited 2010-10-16 06:14:25 by SheenaSmith)

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