Wiki Page Content

Differences between revisions 1 and 2
Revision 1 as of 2010-01-11 02:07:46
Size: 1297
Editor: SheenaSmith
Comment: create page, add content
Revision 2 as of 2010-09-22 23:50:13
Size: 1315
Editor: SheenaSmith
Comment: update content - rectangle
Deletions are marked like this. Additions are marked like this.
Line 20: Line 20:
||'''rect'''||a pointer to the [[SDL_Rect]] to be compared|| ||'''rect'''||a pointer to the rectangle of type [[SDL_Rect]] to be compared||

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

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