Qwt User's Guide: QwtTransform Class Reference

Qwt User's Guide 6.1.2

- Main Page
- Related Pages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | List of all members
QwtTransform Class Referenceabstract

A transformation between coordinate systems. More...

`#include <qwt_transform.h>`

Inheritance diagram for QwtTransform:
[legend]

## Public Member Functions
| QwtTransform ()
| Constructor.
virtual | ~QwtTransform ()
| Destructor.
virtual double | bounded (double value) const
virtual double | transform (double value) const =0
virtual double | invTransform (double value) const =0
virtual QwtTransform * | copy () const =0
| Virtualized copy operation.

## Detailed Description

A transformation between coordinate systems.

QwtTransform manipulates values, when being mapped between the scale and the paint device coordinate system.

A transformation consists of 2 methods:

- transform
- invTransform

where one is is the inverse function of the other.

When p1, p2 are the boundaries of the paint device coordinates and s1, s2 the boundaries of the scale, QwtScaleMap uses the following calculations:

- p = p1 + ( p2 - p1 ) * ( T( s ) - T( s1 ) / ( T( s2 ) - T( s1 ) );
- s = invT ( T( s1 ) + ( T( s2 ) - T( s1 ) ) * ( p - p1 ) / ( p2 - p1 ) );

## Member Function Documentation

double QwtTransform::bounded | ( | double | value | ) | const
| virtual

Modify value to be a valid value for the transformation. The default implementation does nothing.

Parameters

  value | Value to be bounded

Returns
  value unmodified

Reimplemented in QwtLogTransform.

virtual double QwtTransform::invTransform | ( | double | value | ) | const
| pure virtual

Inverse transformation function

Parameters

  value | Value

Returns
  Modified value

See Also
  transform()

Implemented in QwtPowerTransform, QwtLogTransform, and QwtNullTransform.

virtual double QwtTransform::transform | ( | double | value | ) | const
| pure virtual

Transformation function

Parameters

  value | Value

Returns
  Modified value

See Also
  invTransform()

Implemented in QwtPowerTransform, QwtLogTransform, and QwtNullTransform.