/Users/hercules/trunk/SDL/include/SDL_rect.h File Reference

#include "SDL_stdinc.h"
#include "SDL_error.h"
#include "SDL_pixels.h"
#include "SDL_rwops.h"
#include "begin_code.h"
#include "close_code.h"

Go to the source code of this file.

Data Structures

struct  SDL_Rect
 A rectangle, with the origin at the upper left. More...

Defines

#define SDL_RectEmpty(X)   (((X)->w <= 0) || ((X)->h <= 0))
 Returns true if the rectangle has no area.
#define SDL_RectEquals(A, B)
 Returns true if the two rectangles are equal.

Functions

DECLSPEC SDL_bool SDLCALL SDL_HasIntersection (const SDL_Rect *A, const SDL_Rect *B)
 Determine whether two rectangles intersect.
DECLSPEC SDL_bool SDLCALL SDL_IntersectRect (const SDL_Rect *A, const SDL_Rect *B, SDL_Rect *result)
 Calculate the intersection of two rectangles.
DECLSPEC void SDLCALL SDL_UnionRect (const SDL_Rect *A, const SDL_Rect *B, SDL_Rect *result)
 Calculate the union of two rectangles.
DECLSPEC SDL_bool SDLCALL SDL_IntersectRectAndLine (const SDL_Rect *rect, int *X1, int *Y1, int *X2, int *Y2)
 Calculate the intersection of a rectangle and line segment.


Detailed Description

Header file for SDL_rect definition and management functions

Define Documentation

#define SDL_RectEquals ( A,
 ) 

Value:

(((A)->x == (B)->x) && ((A)->y == (B)->y) && \
                                ((A)->w == (B)->w) && ((A)->h == (B)->h))
Returns true if the two rectangles are equal.


Function Documentation

SDL_bool SDL_HasIntersection ( const SDL_Rect A,
const SDL_Rect B 
)

Determine whether two rectangles intersect.

Returns:
SDL_TRUE if there is an intersection, SDL_FALSE otherwise.

SDL_bool SDL_IntersectRect ( const SDL_Rect A,
const SDL_Rect B,
SDL_Rect result 
)

Calculate the intersection of two rectangles.

Returns:
SDL_TRUE if there is an intersection, SDL_FALSE otherwise.

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

Calculate the intersection of a rectangle and line segment.

Returns:
SDL_TRUE if there is an intersection, SDL_FALSE otherwise.


Generated on Mon Sep 21 21:32:25 2009 for Simple DirectMedia Layer by  doxygen 1.5.8