Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

ogdf::DScaler Class Reference

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. More...
 
 ~DScaler ()
 
const DRect & from () const
 Returns the rectangle in the source coordinate system. More...
 
double scaleHeight (double height)
 Scales a vertical length from source to target coordinate system. More...
 
double scaleToX (double x)
 Transforms x-coordinates from source to target coordinate system. More...
 
double scaleToY (double y)
 Transforms y-coordinates from source to target coordinate system. More...
 
double scaleWidth (double width)
 Scales a horizontal length from source to target coordinate system. More...
 
const DRect & to () const
 Returns the rectangle in the target coordinate system. More...
 

Private Attributes

double m_factorX
 The scaling factor for the x-coordinates. More...
 
double m_factorY
 The scaling factor for the y-coordinates. More...
 
const DRect * m_from
 Rectangluar area in source coordinate system. More...
 
double m_offsetX
 The offset for the x-coordinates. More...
 
double m_offsetY
 The offset for the y-coordinates. More...
 
const DRect * m_to
 Rectangluar area in target coordinate system. More...
 

Detailed Description

Scaling between coordinate systems.

Definition at line 727 of file geometry.h.

Constructor & Destructor Documentation

◆ DScaler()

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

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

Definition at line 741 of file geometry.h.

◆ ~DScaler()

ogdf::DScaler::~DScaler ( )
inline

Definition at line 749 of file geometry.h.

Member Function Documentation

◆ from()

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

Returns the rectangle in the source coordinate system.

Definition at line 752 of file geometry.h.

◆ scaleHeight()

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

Scales a vertical length from source to target coordinate system.

Definition at line 767 of file geometry.h.

◆ scaleToX()

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

Transforms x-coordinates from source to target coordinate system.

Definition at line 758 of file geometry.h.

◆ scaleToY()

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

Transforms y-coordinates from source to target coordinate system.

Definition at line 761 of file geometry.h.

◆ scaleWidth()

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

Scales a horizontal length from source to target coordinate system.

Definition at line 764 of file geometry.h.

◆ to()

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

Returns the rectangle in the target coordinate system.

Definition at line 755 of file geometry.h.

Member Data Documentation

◆ m_factorX

double ogdf::DScaler::m_factorX
private

The scaling factor for the x-coordinates.

Definition at line 734 of file geometry.h.

◆ m_factorY

double ogdf::DScaler::m_factorY
private

The scaling factor for the y-coordinates.

Definition at line 735 of file geometry.h.

◆ m_from

const DRect* ogdf::DScaler::m_from
private

Rectangluar area in source coordinate system.

Definition at line 731 of file geometry.h.

◆ m_offsetX

double ogdf::DScaler::m_offsetX
private

The offset for the x-coordinates.

Definition at line 736 of file geometry.h.

◆ m_offsetY

double ogdf::DScaler::m_offsetY
private

The offset for the y-coordinates.

Definition at line 737 of file geometry.h.

◆ m_to

const DRect* ogdf::DScaler::m_to
private

Rectangluar area in target coordinate system.

Definition at line 732 of file geometry.h.


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