WinRect Class Reference

A Windows rectangle. More...

#include <winrect.h>

List of all members.

Public Member Functions

 WinRect ()
 Default constructor for WinRect class.
 WinRect (INT32 Left, INT32 Top, INT32 Right, INT32 Bottom)
 Constructor for WinRect class.
const WinRectoperator= (const wxRect &rect)
INT32 GetRightEx () const
INT32 GetBottomEx () const
wxPoint GetBottomRightEx () const
void SetRightEx (INT32 right)
void SetBottomEx (INT32 bottom)
void SetBottomRightEx (const wxPoint &pt)
OilRect ToOil (View *pView) const
 Converts a WinRect to an OilRect.


Detailed Description

A Windows rectangle.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com> Date: 8/8/93
Returns:
Errors: -
See also:
WinCoord

Definition at line 122 of file winrect.h.


Constructor & Destructor Documentation

WinRect::WinRect  ) 
 

Default constructor for WinRect class.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/8/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 133 of file winrect.cpp.

00133                  : wxRect()
00134 {
00135 }

WinRect::WinRect INT32  Left,
INT32  Top,
INT32  Right,
INT32  Bottom
 

Constructor for WinRect class.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/8/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 155 of file winrect.cpp.

00156     : wxRect( Left, Top, Right - Left, Bottom - Top )
00157 {
00158 }


Member Function Documentation

INT32 WinRect::GetBottomEx  )  const [inline]
 

Definition at line 139 of file winrect.h.

00139 { return y + height; }

wxPoint WinRect::GetBottomRightEx  )  const [inline]
 

Definition at line 140 of file winrect.h.

00140 {return wxPoint(x + width, y + height);}

INT32 WinRect::GetRightEx  )  const [inline]
 

Definition at line 138 of file winrect.h.

00138 { return x + width; }

const WinRect& WinRect::operator= const wxRect &  rect  )  [inline]
 

Definition at line 128 of file winrect.h.

00129     {
00130         x = rect.x;
00131         y = rect.y;
00132         width = rect.width;
00133         height = rect.height;
00134         return(*this);
00135     }

void WinRect::SetBottomEx INT32  bottom  )  [inline]
 

Definition at line 143 of file winrect.h.

00143 { height = bottom - y; }

void WinRect::SetBottomRightEx const wxPoint &  pt  )  [inline]
 

Definition at line 144 of file winrect.h.

00145     {
00146         width = pt.x - x;
00147         height = pt.y - y;
00148     }

void WinRect::SetRightEx INT32  right  )  [inline]
 

Definition at line 142 of file winrect.h.

00142 { width = right - x; }

OilRect WinRect::ToOil View pView  )  const
 

Converts a WinRect to an OilRect.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
5/8/93
Parameters:
Pointer to the view that we are converting in. [INPUTS]
Returns:
Errors: None.

Definition at line 175 of file winrect.cpp.

00176 {
00177     // Get pixel size for this view
00178     // NB. Previously this was done with 4 function calls!  - Tim
00179     FIXED16 PixelWidth, PixelHeight;
00180     pView->GetPixelSize(&PixelWidth, &PixelHeight);
00181 
00182     // Do the conversion and return the results.
00183     return OilRect(OilCoord(LongMulFixed16( x,          PixelWidth ),
00184                            -LongMulFixed16( y + height, PixelHeight ) ),
00185                    OilCoord(LongMulFixed16( x + width,  PixelWidth ),
00186                            -LongMulFixed16( y,          PixelHeight ) ) );
00187 }


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 04:03:09 2007 for Camelot by  doxygen 1.4.4