Mercurial > sdl-ios-xcode
diff include/SDL_rect.h @ 2909:3da0bb421d83
Added line clipping
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 23 Dec 2008 02:23:18 +0000 |
parents | 99210400e8b9 |
children | d3baf5ac4e37 |
line wrap: on
line diff
--- 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* */