Qwt User's Guide
6.1.6
|
A scale map. More...
#include <qwt_scale_map.h>
Public Member Functions | |
QwtScaleMap () | |
Constructor. More... | |
QwtScaleMap (const QwtScaleMap &) | |
Copy constructor. | |
~QwtScaleMap () | |
QwtScaleMap & | operator= (const QwtScaleMap &) |
Assignment operator. | |
void | setTransformation (QwtTransform *) |
const QwtTransform * | transformation () const |
Get the transformation. | |
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... | |
double | transform (double s) const |
double | invTransform (double p) const |
double | p1 () const |
double | p2 () const |
double | s1 () const |
double | s2 () const |
double | pDist () const |
double | sDist () const |
bool | isInverting () const |
Static Public Member Functions | |
static QRectF | transform (const QwtScaleMap &, const QwtScaleMap &, const QRectF &) |
static QRectF | invTransform (const QwtScaleMap &, const QwtScaleMap &, const QRectF &) |
static QPointF | transform (const QwtScaleMap &, const QwtScaleMap &, const QPointF &) |
static QPointF | invTransform (const QwtScaleMap &, const QwtScaleMap &, const QPointF &) |
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.
QwtScaleMap::QwtScaleMap | ( | ) |
Constructor.
The scale and paint device intervals are both set to [0,1].
QwtScaleMap::~QwtScaleMap | ( | ) |
Destructor
|
static |
Transform a rectangle from paint to scale coordinates
xMap | X map |
yMap | Y map |
pos | Position in paint coordinates |
|
static |
Transform a rectangle from paint to scale coordinates
xMap | X map |
yMap | Y map |
rect | Rectangle in paint coordinates |
|
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 |
|
inline |
|
inline |
|
inline |
|
inline |
void QwtScaleMap::setPaintInterval | ( | double | p1, |
double | p2 | ||
) |
Specify the borders of the paint device interval.
p1 | first border |
p2 | second border |
void QwtScaleMap::setScaleInterval | ( | double | s1, |
double | s2 | ||
) |
Specify the borders of the scale interval.
s1 | first border |
s2 | second border |
void QwtScaleMap::setTransformation | ( | QwtTransform * | transform | ) |
Initialize the map with a transformation
|
static |
Transform a point from scale to paint coordinates
xMap | X map |
yMap | Y map |
pos | Position in scale coordinates |
|
static |
Transform a rectangle from scale to paint coordinates
xMap | X map |
yMap | Y map |
rect | Rectangle in scale coordinates |
|
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 |