#include <oilrect.h>
Inheritance diagram for OilRect:
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 |
Definition at line 123 of file oilrect.h.
|
Default constructor for OilRect class.
Definition at line 129 of file oilrect.cpp. 00129 : Rect() 00130 { 00131 }
|
|
Constructor for OilRect class.
Definition at line 150 of file oilrect.cpp. 00150 : Rect(lo, hi) 00151 { 00152 }
|
|
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 }
|
|
Converts an OilRect into a WinRect, using the current OilCoord pixel scales.
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 }
|
|
Converts an OilRect into a WorkRect.
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 }
|