include/SDL_rect.h
changeset 2909 3da0bb421d83
parent 2859 99210400e8b9
child 3407 d3baf5ac4e37
--- a/include/SDL_rect.h	Tue Dec 23 01:28:06 2008 +0000
+++ b/include/SDL_rect.h	Tue Dec 23 02:23:18 2008 +0000
@@ -104,6 +104,18 @@
                                            const SDL_Rect * B,
                                            SDL_Rect * result);
 
+/**
+ * \fn SDL_bool SDL_IntersectRectAndLine(const SDL_Rect *rect, int *X1, int *Y1, int *X2, int *Y2)
+ *
+ * \brief Calculate the intersection of a rectangle and line segment.
+ *
+ * \return SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRectAndLine(const SDL_Rect *
+                                                          rect, int *X1,
+                                                          int *Y1, int *X2,
+                                                          int *Y2);
+
 /* Ends C function definitions when using C++ */
 #ifdef __cplusplus
 /* *INDENT-OFF* */