hoa_video::ScreenRect Class Reference

A structure used for storing rectangles with pixel coordinates This class is used in storing the current scissoring rectangles, viewport rectangles, etc. It is based on standard screen coordinates, where (0,0) is the top-left and the unit is 1 pixel (hence int32 coordinates instead of floats). More...

#include <screen_rect.h>

Collaboration diagram for hoa_video::ScreenRect:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void Intersect (const ScreenRect &rect)
 Modifies the rectangle coordinates to be an intersection of itself with another rectangle.
 ScreenRect (int32 l, int32 t, int32 w, int32 h)
 ScreenRect ()

Public Attributes

int32 height
int32 left
 Coordinates for the top left corner of the rectangle.
int32 top
int32 width
 Stores the dimensions for this rectangle.

Detailed Description

A structure used for storing rectangles with pixel coordinates This class is used in storing the current scissoring rectangles, viewport rectangles, etc. It is based on standard screen coordinates, where (0,0) is the top-left and the unit is 1 pixel (hence int32 coordinates instead of floats).

****************************************************************************

Definition at line 32 of file screen_rect.h.


Constructor & Destructor Documentation

hoa_video::ScreenRect::ScreenRect (  )  [inline]

Definition at line 34 of file screen_rect.h.

hoa_video::ScreenRect::ScreenRect ( int32  l,
int32  t,
int32  w,
int32  h 
) [inline]

Definition at line 36 of file screen_rect.h.


Member Function Documentation

void hoa_video::ScreenRect::Intersect ( const ScreenRect rect  )  [inline]

Modifies the rectangle coordinates to be an intersection of itself with another rectangle.

Parameters:
rect The rectangle to intersect this rectangle with The resulting intersection rectangle will have all its members set to zero if the two rectangles do not intersect. If the current rectangle has 100% intersection with the argument rectangle, no change in coordinates will occur. Typically, the intersection will be a smaller rectangle than the original two rectangles.
Note:
This function is defined in video.cpp

Definition at line 47 of file screen_rect.h.

References height, left, top, and width.

Referenced by hoa_video::TextBox::_DrawTextLines(), hoa_video::OptionBox::Draw(), and hoa_video::MenuWindow::Draw().


Member Data Documentation

int32 hoa_video::ScreenRect::height

Definition at line 76 of file screen_rect.h.

Referenced by hoa_video::GameVideo::_PopContext(), hoa_video::GameVideo::CalculateScreenRect(), hoa_video::OptionBox::Draw(), Intersect(), hoa_video::GameVideo::SetScissorRect(), and hoa_video::MenuWindow::Update().

int32 hoa_video::ScreenRect::left

Coordinates for the top left corner of the rectangle.

Definition at line 73 of file screen_rect.h.

Referenced by hoa_video::GameVideo::_PopContext(), hoa_video::GameVideo::CalculateScreenRect(), hoa_video::OptionBox::Draw(), Intersect(), hoa_video::GameVideo::SetScissorRect(), and hoa_video::MenuWindow::Update().

int32 hoa_video::ScreenRect::top

Definition at line 73 of file screen_rect.h.

Referenced by hoa_video::GameVideo::_PopContext(), hoa_video::GameVideo::CalculateScreenRect(), hoa_video::OptionBox::Draw(), Intersect(), hoa_video::GameVideo::SetScissorRect(), and hoa_video::MenuWindow::Update().

int32 hoa_video::ScreenRect::width

Stores the dimensions for this rectangle.

Definition at line 76 of file screen_rect.h.

Referenced by hoa_video::GameVideo::_PopContext(), hoa_video::GameVideo::CalculateScreenRect(), hoa_video::OptionBox::Draw(), Intersect(), hoa_video::GameVideo::SetScissorRect(), and hoa_video::MenuWindow::Update().


The documentation for this class was generated from the following file:
Generated on Fri Jul 6 23:16:39 2007 for Hero of Allacrost by  doxygen 1.5.1