A scale map. More...
#include <qwt_scale_map.h>
Public Member Functions | |
double | invTransform (double p) const |
bool | isInverting () const |
QwtScaleMap & | operator= (const QwtScaleMap &) |
Assignment operator. More... | |
double | p1 () const |
double | p2 () const |
double | pDist () const |
QwtScaleMap () | |
Constructor. More... | |
QwtScaleMap (const QwtScaleMap &) | |
Copy constructor. More... | |
double | s1 () const |
double | s2 () const |
double | sDist () const |
void | setPaintInterval (double p1, double p2) |
Specify the borders of the paint device interval. More... | |
void | setScaleInterval (double s1, double s2) |
Specify the borders of the scale interval. More... | |
void | setTransformation (QwtTransform *) |
double | transform (double s) const |
const QwtTransform * | transformation () const |
Get the transformation. More... | |
~QwtScaleMap () | |
Static Public Member Functions | |
static QPointF | invTransform (const QwtScaleMap &, const QwtScaleMap &, const QPointF &) |
static QRectF | invTransform (const QwtScaleMap &, const QwtScaleMap &, const QRectF &) |
static QPointF | transform (const QwtScaleMap &, const QwtScaleMap &, const QPointF &) |
static QRectF | transform (const QwtScaleMap &, const QwtScaleMap &, const QRectF &) |
Private Member Functions | |
void | updateFactor () |
Private Attributes | |
double | m_cnv |
double | m_p1 |
double | m_p2 |
double | m_s1 |
double | m_s2 |
QwtTransform * | m_transform |
double | m_ts1 |
A scale map.
QwtScaleMap offers transformations from the coordinate system of a scale into the linear coordinate system of a paint device and vice versa.
Definition at line 26 of file qwt_scale_map.h.
QwtScaleMap::QwtScaleMap | ( | ) |
Constructor.
The scale and paint device intervals are both set to [0,1].
Definition at line 21 of file qwt_scale_map.cpp.
QwtScaleMap::QwtScaleMap | ( | const QwtScaleMap & | other | ) |
Copy constructor.
Definition at line 33 of file qwt_scale_map.cpp.
QwtScaleMap::~QwtScaleMap | ( | ) |
Destructor
Definition at line 49 of file qwt_scale_map.cpp.
|
static |
Transform a rectangle from paint to scale coordinates
xMap | X map |
yMap | Y map |
pos | Position in paint coordinates |
Definition at line 187 of file qwt_scale_map.cpp.
|
static |
Transform a rectangle from paint to scale coordinates
xMap | X map |
yMap | Y map |
rect | Rectangle in paint coordinates |
Definition at line 224 of file qwt_scale_map.cpp.
|
inline |
Transform an paint device value into a value in the interval of the scale.
p | Value relative to the coordinates of the paint device |
Definition at line 154 of file qwt_scale_map.h.
|
inline |
QwtScaleMap & QwtScaleMap::operator= | ( | const QwtScaleMap & | other | ) |
Assignment operator.
Definition at line 55 of file qwt_scale_map.cpp.
|
inline |
Definition at line 99 of file qwt_scale_map.h.
|
inline |
Definition at line 107 of file qwt_scale_map.h.
|
inline |
Definition at line 115 of file qwt_scale_map.h.
|
inline |
Definition at line 83 of file qwt_scale_map.h.
|
inline |
Definition at line 91 of file qwt_scale_map.h.
|
inline |
Definition at line 123 of file qwt_scale_map.h.
void QwtScaleMap::setPaintInterval | ( | double | p1, |
double | p2 | ||
) |
Specify the borders of the paint device interval.
p1 | first border |
p2 | second border |
Definition at line 119 of file qwt_scale_map.cpp.
void QwtScaleMap::setScaleInterval | ( | double | s1, |
double | s2 | ||
) |
Specify the borders of the scale interval.
s1 | first border |
s2 | second border |
Definition at line 100 of file qwt_scale_map.cpp.
void QwtScaleMap::setTransformation | ( | QwtTransform * | transform | ) |
Initialize the map with a transformation
Definition at line 76 of file qwt_scale_map.cpp.
|
static |
Transform a point from scale to paint coordinates
xMap | X map |
yMap | Y map |
pos | Position in scale coordinates |
Definition at line 206 of file qwt_scale_map.cpp.
|
static |
Transform a rectangle from scale to paint coordinates
xMap | X map |
yMap | Y map |
rect | Rectangle in scale coordinates |
Definition at line 153 of file qwt_scale_map.cpp.
|
inline |
Transform a point related to the scale interval into an point related to the interval of the paint device
s | Value relative to the coordinates of the scale |
Definition at line 137 of file qwt_scale_map.h.
const QwtTransform * QwtScaleMap::transformation | ( | ) | const |
Get the transformation.
Definition at line 88 of file qwt_scale_map.cpp.
|
private |
Definition at line 127 of file qwt_scale_map.cpp.
|
private |
Definition at line 74 of file qwt_scale_map.h.
|
private |
Definition at line 72 of file qwt_scale_map.h.
|
private |
Definition at line 72 of file qwt_scale_map.h.
|
private |
Definition at line 71 of file qwt_scale_map.h.
|
private |
Definition at line 71 of file qwt_scale_map.h.
|
private |
Definition at line 77 of file qwt_scale_map.h.
|
private |
Definition at line 75 of file qwt_scale_map.h.