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 QRectF | invTransform (const QwtScaleMap &, const QwtScaleMap &, const QRectF &) |
static QPointF | invTransform (const QwtScaleMap &, const QwtScaleMap &, const QPointF &) |
static QRectF | transform (const QwtScaleMap &, const QwtScaleMap &, const QRectF &) |
static QPointF | transform (const QwtScaleMap &, const QwtScaleMap &, const QPointF &) |
Private Member Functions | |
void | updateFactor () |
Private Attributes | |
double | d_cnv |
double | d_p1 |
double | d_p2 |
double | d_s1 |
double | d_s2 |
QwtTransform * | d_transform |
double | d_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 30 of file qwt_scale_map.h.
QwtScaleMap::QwtScaleMap | ( | ) |
Constructor.
The scale and paint device intervals are both set to [0,1].
Definition at line 20 of file qwt_scale_map.cpp.
QwtScaleMap::QwtScaleMap | ( | const QwtScaleMap & | other | ) |
Copy constructor.
Definition at line 32 of file qwt_scale_map.cpp.
QwtScaleMap::~QwtScaleMap | ( | ) |
Destructor
Definition at line 48 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 156 of file qwt_scale_map.h.
|
static |
Transform a rectangle from paint to scale coordinates
xMap | X map |
yMap | Y map |
rect | Rectangle in paint coordinates |
Definition at line 223 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 186 of file qwt_scale_map.cpp.
|
inline |
QwtScaleMap & QwtScaleMap::operator= | ( | const QwtScaleMap & | other | ) |
Assignment operator.
Definition at line 54 of file qwt_scale_map.cpp.
|
inline |
Definition at line 101 of file qwt_scale_map.h.
|
inline |
Definition at line 109 of file qwt_scale_map.h.
|
inline |
Definition at line 117 of file qwt_scale_map.h.
|
inline |
Definition at line 85 of file qwt_scale_map.h.
|
inline |
Definition at line 93 of file qwt_scale_map.h.
|
inline |
Definition at line 125 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 118 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 99 of file qwt_scale_map.cpp.
void QwtScaleMap::setTransformation | ( | QwtTransform * | transform | ) |
Initialize the map with a transformation
Definition at line 75 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 139 of file qwt_scale_map.h.
|
static |
Transform a rectangle from scale to paint coordinates
xMap | X map |
yMap | Y map |
rect | Rectangle in scale coordinates |
Definition at line 152 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 205 of file qwt_scale_map.cpp.
const QwtTransform * QwtScaleMap::transformation | ( | ) | const |
Get the transformation.
Definition at line 87 of file qwt_scale_map.cpp.
|
private |
Definition at line 126 of file qwt_scale_map.cpp.
|
private |
Definition at line 76 of file qwt_scale_map.h.
|
private |
Definition at line 74 of file qwt_scale_map.h.
|
private |
Definition at line 74 of file qwt_scale_map.h.
|
private |
Definition at line 73 of file qwt_scale_map.h.
|
private |
Definition at line 73 of file qwt_scale_map.h.
|
private |
Definition at line 79 of file qwt_scale_map.h.
|
private |
Definition at line 77 of file qwt_scale_map.h.