Scaling between coordinate systems. More...
#include <ogdf/basic/geometry.h>
Public Member Functions | |
| DScaler (const DRect &from, const DRect &to) | |
| Creates a scaler for scaling from area from to area to. | |
| ~DScaler () | |
| const DRect & | from () const |
| Returns the rectangle in the source coordinate system. | |
| const DRect & | to () const |
| Returns the rectangle in the target coordinate system. | |
| double | scaleToX (double x) |
| Transforms x-coordinates from source to target coordinate system. | |
| double | scaleToY (double y) |
| Transforms y-coordinates from source to target coordinate system. | |
| double | scaleWidth (double width) |
| Scales a horizontal length from source to target coordinate system. | |
| double | scaleHeight (double height) |
| Scales a vertical length from source to target coordinate system. | |
Private Attributes | |
| const DRect * | m_from |
| Rectangluar area in source coordinate system. | |
| const DRect * | m_to |
| Rectangluar area in target coordinate system. | |
| double | m_factorX |
| The scaling factor for the x-coordinates. | |
| double | m_factorY |
| The scaling factor for the y-coordinates. | |
| double | m_offsetX |
| The offset for the x-coordinates. | |
| double | m_offsetY |
| The offset for the y-coordinates. | |
Scaling between coordinate systems.
Definition at line 610 of file geometry.h.
| ogdf::DScaler::DScaler | ( | const DRect & | from, |
| const DRect & | to | ||
| ) | [inline] |
Creates a scaler for scaling from area from to area to.
Definition at line 624 of file geometry.h.
| ogdf::DScaler::~DScaler | ( | ) | [inline] |
Definition at line 633 of file geometry.h.
| const DRect& ogdf::DScaler::from | ( | ) | const [inline] |
Returns the rectangle in the source coordinate system.
Definition at line 636 of file geometry.h.
| double ogdf::DScaler::scaleHeight | ( | double | height | ) | [inline] |
Scales a vertical length from source to target coordinate system.
Definition at line 651 of file geometry.h.
| double ogdf::DScaler::scaleToX | ( | double | x | ) | [inline] |
Transforms x-coordinates from source to target coordinate system.
Definition at line 642 of file geometry.h.
| double ogdf::DScaler::scaleToY | ( | double | y | ) | [inline] |
Transforms y-coordinates from source to target coordinate system.
Definition at line 645 of file geometry.h.
| double ogdf::DScaler::scaleWidth | ( | double | width | ) | [inline] |
Scales a horizontal length from source to target coordinate system.
Definition at line 648 of file geometry.h.
| const DRect& ogdf::DScaler::to | ( | ) | const [inline] |
Returns the rectangle in the target coordinate system.
Definition at line 639 of file geometry.h.
double ogdf::DScaler::m_factorX [private] |
The scaling factor for the x-coordinates.
Definition at line 617 of file geometry.h.
double ogdf::DScaler::m_factorY [private] |
The scaling factor for the y-coordinates.
Definition at line 618 of file geometry.h.
const DRect* ogdf::DScaler::m_from [private] |
Rectangluar area in source coordinate system.
Definition at line 614 of file geometry.h.
double ogdf::DScaler::m_offsetX [private] |
The offset for the x-coordinates.
Definition at line 619 of file geometry.h.
double ogdf::DScaler::m_offsetY [private] |
The offset for the y-coordinates.
Definition at line 620 of file geometry.h.
const DRect* ogdf::DScaler::m_to [private] |
Rectangluar area in target coordinate system.
Definition at line 615 of file geometry.h.