Open
Graph Drawing
Framework

 v.2012.07
 

ogdf::DScaler Class Reference

Scaling between coordinate systems. More...

#include <ogdf/basic/geometry.h>

List of all members.

Public Member Functions

 DScaler (const DRect &from, const DRect &to)
 Creates a scaler for scaling from area from to area to.
 ~DScaler ()
const DRectfrom () const
 Returns the rectangle in the source coordinate system.
double scaleHeight (double height)
 Scales a vertical length from source to 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.
const DRectto () const
 Returns the rectangle in the target coordinate system.

Private Attributes

double m_factorX
 The scaling factor for the x-coordinates.
double m_factorY
 The scaling factor for the y-coordinates.
const DRectm_from
 Rectangluar area in source coordinate system.
double m_offsetX
 The offset for the x-coordinates.
double m_offsetY
 The offset for the y-coordinates.
const DRectm_to
 Rectangluar area in target coordinate system.

Detailed Description

Scaling between coordinate systems.

Definition at line 615 of file geometry.h.


Constructor & Destructor Documentation

ogdf::DScaler::DScaler ( const DRect from,
const DRect to 
)
inline

Creates a scaler for scaling from area from to area to.

Definition at line 629 of file geometry.h.

ogdf::DScaler::~DScaler ( )
inline

Definition at line 637 of file geometry.h.


Member Function Documentation

const DRect& ogdf::DScaler::from ( ) const
inline

Returns the rectangle in the source coordinate system.

Definition at line 640 of file geometry.h.

double ogdf::DScaler::scaleHeight ( double  height)
inline

Scales a vertical length from source to target coordinate system.

Definition at line 655 of file geometry.h.

double ogdf::DScaler::scaleToX ( double  x)
inline

Transforms x-coordinates from source to target coordinate system.

Definition at line 646 of file geometry.h.

double ogdf::DScaler::scaleToY ( double  y)
inline

Transforms y-coordinates from source to target coordinate system.

Definition at line 649 of file geometry.h.

double ogdf::DScaler::scaleWidth ( double  width)
inline

Scales a horizontal length from source to target coordinate system.

Definition at line 652 of file geometry.h.

const DRect& ogdf::DScaler::to ( ) const
inline

Returns the rectangle in the target coordinate system.

Definition at line 643 of file geometry.h.


Member Data Documentation

double ogdf::DScaler::m_factorX
private

The scaling factor for the x-coordinates.

Definition at line 622 of file geometry.h.

double ogdf::DScaler::m_factorY
private

The scaling factor for the y-coordinates.

Definition at line 623 of file geometry.h.

const DRect* ogdf::DScaler::m_from
private

Rectangluar area in source coordinate system.

Definition at line 619 of file geometry.h.

double ogdf::DScaler::m_offsetX
private

The offset for the x-coordinates.

Definition at line 624 of file geometry.h.

double ogdf::DScaler::m_offsetY
private

The offset for the y-coordinates.

Definition at line 625 of file geometry.h.

const DRect* ogdf::DScaler::m_to
private

Rectangluar area in target coordinate system.

Definition at line 620 of file geometry.h.


The documentation for this class was generated from the following file: