OilRect Class Reference

More...

#include <oilrect.h>

Inheritance diagram for OilRect:

Rect List of all members.

Public Member Functions

 OilRect ()
 Default constructor for OilRect class.
 OilRect (OilCoord, OilCoord)
 Constructor for OilRect class.
WinRect ToWin (View *pView) const
 Converts an OilRect into a WinRect, using the current OilCoord pixel scales.
WorkRect ToWork (const WorkCoord &ScrollOffset) const
 Converts an OilRect into a WorkRect.
DocRect ToDoc (const Spread *pSpread, View *pView) const

Detailed Description

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

Definition at line 123 of file oilrect.h.


Constructor & Destructor Documentation

OilRect::OilRect  ) 
 

Default constructor for OilRect class.

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

Errors: -

See also:
-

Definition at line 129 of file oilrect.cpp.

00129                  : Rect()
00130 {
00131 }

OilRect::OilRect OilCoord  lo,
OilCoord  hi
 

Constructor for OilRect class.

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

Errors: -

See also:
-

Definition at line 150 of file oilrect.cpp.

00150                                          : Rect(lo, hi)
00151 {
00152 }


Member Function Documentation

DocRect OilRect::ToDoc const Spread pSpread,
View pView
const
 

Definition at line 210 of file oilrect.cpp.

00211 {
00212     DocRect NewRect;
00213 
00214     OilCoord OilLo(lo.x, lo.y);
00215     OilCoord OilHi(hi.x, hi.y);
00216     
00217     // Convert the coords, leaving result in this new object
00218     NewRect.lo = OilLo.ToDoc( pSpread, pView);
00219     NewRect.hi = OilHi.ToDoc( pSpread, pView);
00220 
00221     return NewRect;
00222 }

WinRect OilRect::ToWin View pView  )  const
 

Converts an OilRect into a WinRect, using the current OilCoord pixel scales.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
10/8/93
Parameters:
pView - the view we are covnerting to. [INPUTS]
Returns:
A WinRect

Definition at line 169 of file oilrect.cpp.

00170 {
00171     // Get pixel size for this view
00172     // NB. Previously this was done with 4 function calls!  - Tim
00173     FIXED16 PixelWidth, PixelHeight;
00174     pView->GetPixelSize(&PixelWidth, &PixelHeight);
00175 
00176     // Do the conversion and return the results.
00177     return WinRect(INT32(MPtoPixel(lo.x, PixelWidth)),
00178                   -INT32(MPtoPixel(hi.y, PixelHeight) ),
00179                    INT32(MPtoPixel(hi.x, PixelWidth)),
00180                   -INT32(MPtoPixel(lo.y, PixelHeight) ));
00181 }

WorkRect OilRect::ToWork const WorkCoord ScrollOffset  )  const
 

Converts an OilRect into a WorkRect.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
10/8/93
Parameters:
The current ScrollOffsets [INPUTS]
- [OUTPUTS]
Returns:
A WorkRect.

Errors: -

See also:
-

Definition at line 201 of file oilrect.cpp.

00202 {
00203     return WorkRect(WorkCoord(ScrollOffset.x + lo.x, ScrollOffset.y + lo.y),
00204                     WorkCoord(ScrollOffset.x + hi.x, ScrollOffset.y + hi.y));
00205 }


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