.TH "SDLmm::SRect" 3 "16 Jul 2001" "SDLmm" \" -*- nroff -*- .ad l .nh .SH NAME SDLmm::SRect \- This enhanced version of \fI\fBSDL_Rect\fP\fP includes a number of handy short-hand constructors. Since the class is derived from the \fBSDL_Rect\fP struct, it can be used in any context where an \fI\fBSDL_Rect\fP\fP is valid. .SH SYNOPSIS .br .PP \fC#include \fP .PP Inherits \fBSDL_Rect\fP. .PP .SS "Public Methods" .in +1c .ti -1c .RI "\fBSRect\fP ()" .br .RI "\fIDefault constructor which creates an empty \fBSRect\fP (xywh variables set to sero).\fP" .ti -1c .RI "\fBSRect\fP (const SRect &rect)" .br .RI "\fIThis is the copy constructor. Simply initializes the value of an \fBSRect\fP to that of another \fBSRect\fP.\fP" .ti -1c .RI "\fBSRect\fP (const \fBSDL_Rect\fP &rect)" .br .RI "\fIConstructor which initializes the class from an \fBSDL_Rect\fP struct.\fP" .ti -1c .RI "\fBSRect\fP (const \fBSPoint\fP &point)" .br .RI "\fIConstructor which initializes the class from an \fBSPoint\fP object.\fP" .ti -1c .RI "\fBSRect\fP (const \fBSPoint\fP &upper_left_point, const \fBSPoint\fP &bottom_right_point)" .br .RI "\fIConstruct an object using the given upper left and bottom right corners.\fP" .ti -1c .RI "\fBSRect\fP (const \fBSPoint\fP &point, Uint16 nw, Uint16 nh)" .br .RI "\fIConstructor which initializes the class from an \fBSPoint\fP object and integer values.\fP" .ti -1c .RI "\fBSRect\fP (Sint16 nx, Sint16 ny, Uint16 nw, Uint16 nh)" .br .RI "\fIConstructor which initializes the class from integer values.\fP" .ti -1c .RI "\fBSRect\fP (Uint16 nw, Uint16 nh)" .br .RI "\fIConstructor which initializes the width and height from integer values.\fP" .ti -1c .RI "SRect& \fBoperator=\fP (const \fBSDL_Rect\fP &rect)" .br .RI "\fISet the value of an \fBSRect\fP to that of an existing \fBSDL_Rect\fP or \fBSRect\fP.\fP" .ti -1c .RI "bool \fBoperator==\fP (const \fBSDL_Rect\fP &rect) const" .br .RI "\fICompare two rectangles for equality.\fP" .ti -1c .RI "\fBSPoint\fP \fBGetUpperLeft\fP () const" .br .RI "\fIGet the coordinates for the upper left corner of the \fBSRect\fP.\fP" .ti -1c .RI "\fBSPoint\fP \fBGetUpperRight\fP () const" .br .RI "\fIGet the coordinates for the upper right corner of the \fBSRect\fP.\fP" .ti -1c .RI "\fBSPoint\fP \fBGetBottomLeft\fP () const" .br .RI "\fIGet the coordinates for the bottom left corner of the \fBSRect\fP.\fP" .ti -1c .RI "\fBSPoint\fP \fBGetBottomRight\fP () const" .br .RI "\fIGet the coordinates for the bottom right corner of the \fBSRect\fP.\fP" .in -1c .SH "DETAILED DESCRIPTION" .PP This enhanced version of \fI\fBSDL_Rect\fP\fP includes a number of handy short-hand constructors. Since the class is derived from the \fBSDL_Rect\fP struct, it can be used in any context where an \fI\fBSDL_Rect\fP\fP is valid. .PP \fB\fBTodo: \fP\fP .in +1c Extend the class with useful utility functions in regards to rectangles like intersections. .PP \fBAuthor: \fP .in +1c David Hedbor .PP .SH "CONSTRUCTOR & DESTRUCTOR DOCUMENTATION" .PP .SS "SDLmm::SRect::SRect ()" .PP Default constructor which creates an empty \fBSRect\fP (xywh variables set to sero). .PP .SS "SDLmm::SRect::SRect (const SRect & rect)" .PP This is the copy constructor. Simply initializes the value of an \fBSRect\fP to that of another \fBSRect\fP. .PP \fBParameters: \fP .in +1c .TP \fB\fIrect\fP\fP an existing \fBSRect\fP object. .SS "SDLmm::SRect::SRect (const \fBSDL_Rect\fP & rect)" .PP Constructor which initializes the class from an \fBSDL_Rect\fP struct. .PP \fBParameters: \fP .in +1c .TP \fB\fIrect\fP\fP an existing \fBSDL_Rect\fP struct. .SS "SDLmm::SRect::SRect (const \fBSPoint\fP & point)" .PP Constructor which initializes the class from an \fBSPoint\fP object. .PP The x and y values will be initialized with the x/y values of the \fBSPoint\fP. h and w will be set to zero. .PP \fBParameters: \fP .in +1c .TP \fB\fIpoint\fP\fP reference to an existing \fBSPoint\fP object. .SS "SDLmm::SRect::SRect (const \fBSPoint\fP & upper_left_point, const \fBSPoint\fP & bottom_right_point)" .PP Construct an object using the given upper left and bottom right corners. .PP \fBParameters: \fP .in +1c .TP \fB\fIupper_left_point\fP\fP \fBSPoint\fP for the upper right corner of the rectangle .TP \fB\fIbottom_right_point\fP\fP \fBSPoint\fP for the bottom right corner of the rectangle .SS "SDLmm::SRect::SRect (const \fBSPoint\fP & point, Uint16 nw, Uint16 nh)" .PP Constructor which initializes the class from an \fBSPoint\fP object and integer values. .PP The x and y values will be initialized with the x/y values of the \fBSPoint\fP and the dimensions from nw and nh. .PP \fBParameters: \fP .in +1c .TP \fB\fInw, nh\fP\fP the width and height of the rectangle .TP \fB\fIpoint\fP\fP reference to an existing \fBSPoint\fP object for the upper right corner. .SS "SDLmm::SRect::SRect (Sint16 nx, Sint16 ny, Uint16 nw, Uint16 nh)" .PP Constructor which initializes the class from integer values. .PP \fBParameters: \fP .in +1c .TP \fB\fInx, ny\fP\fP position of the upper left corner of the rectangle .TP \fB\fInw, nh\fP\fP the width and height of the rectangle .SS "SDLmm::SRect::SRect (Uint16 nw, Uint16 nh)" .PP Constructor which initializes the width and height from integer values. .PP The x/y coordinates for the upper left corner will be set to zero. .PP \fBParameters: \fP .in +1c .TP \fB\fInw, nh\fP\fP the width and height of the rectangle .SH "MEMBER FUNCTION DOCUMENTATION" .PP .SS "\fBSPoint\fP SDLmm::SRect::GetBottomLeft () const\fC [inline]\fP" .PP Get the coordinates for the bottom left corner of the \fBSRect\fP. .PP \fBReturns: \fP .in +1c \fBSPoint\fP object .SS "\fBSPoint\fP SDLmm::SRect::GetBottomRight () const\fC [inline]\fP" .PP Get the coordinates for the bottom right corner of the \fBSRect\fP. .PP \fBReturns: \fP .in +1c \fBSPoint\fP object .SS "\fBSPoint\fP SDLmm::SRect::GetUpperLeft () const\fC [inline]\fP" .PP Get the coordinates for the upper left corner of the \fBSRect\fP. .PP \fBReturns: \fP .in +1c \fBSPoint\fP object .SS "\fBSPoint\fP SDLmm::SRect::GetUpperRight () const\fC [inline]\fP" .PP Get the coordinates for the upper right corner of the \fBSRect\fP. .PP \fBReturns: \fP .in +1c \fBSPoint\fP object .SS "SRect & SDLmm::SRect::operator= (const \fBSDL_Rect\fP & rect)\fC [inline]\fP" .PP Set the value of an \fBSRect\fP to that of an existing \fBSDL_Rect\fP or \fBSRect\fP. .PP .SS "bool SDLmm::SRect::operator== (const \fBSDL_Rect\fP & rect) const\fC [inline]\fP" .PP Compare two rectangles for equality. .PP \fBReturns: \fP .in +1c true if x / y coordinates and h / w are identical in both rectangles. .SH "AUTHOR" .PP Generated automatically by Doxygen for SDLmm from the source code.