QwtMetricsMap(3)
π QwtMetricsMap(3) π
okay bestie, so this page is from the Qwt User's Guide, and it's all about a little class called QwtMetricsMap. it translates between layout coords, screen coords, and paint-device coords. it's giving unit-conversion but make it β¨plottingβ¨. let's get into it π«Ά
π NAME π
QwtMetricsMap β
fr fr that's the whole NAME entry, it's just the class name and a lonely little dash. the mystery. the intrigue. the dash. π
β¨ SYNOPSIS β¨
#include <qwt_layout_metrics.h>
πΈ Public Member Functions πΈ
QPoint deviceToLayout (const QPoint &, const QPainter *=NULL) const
QSize deviceToLayout (const QSize &) const
QRect deviceToLayout (const QRect &, const QPainter *=NULL) const
QwtPolygon deviceToLayout (const QwtPolygon &, const QPainter *=NULL) const
int deviceToLayoutX (int x) const
int deviceToLayoutY (int y) const
bool isIdentity () const
QPoint layoutToDevice (const QPoint &, const QPainter *=NULL) const
QSize layoutToDevice (const QSize &) const
QRect layoutToDevice (const QRect &, const QPainter *=NULL) const
QwtPolygon layoutToDevice (const QwtPolygon &, const QPainter *=NULL) const
int layoutToDeviceX (int x) const
int layoutToDeviceY (int y) const
QPoint layoutToScreen (const QPoint &point) const
QSize layoutToScreen (const QSize &) const
QRect layoutToScreen (const QRect &) const
int layoutToScreenX (int x) const
int layoutToScreenY (int y) const
QPoint screenToLayout (const QPoint &) const
QSize screenToLayout (const QSize &) const
QRect screenToLayout (const QRect &) const
int screenToLayoutX (int x) const
int screenToLayoutY (int y) const
void setMetrics (const QPaintDevice *layoutMetrics, const QPaintDevice *deviceMetrics)
π¦ Static Public Member Functions π¦
static QwtPolygon translate (const QMatrix &, const QwtPolygon &)
static QRect translate (const QMatrix &, const QRect &)
π Detailed Description π
A Map to translate between layout, screen and paint device metrics.
so here's the lore, bestie π β Qt3 only supports painting in integer coordinates only. which means it's literally not possible to scale the layout in screen coordinates up to layouts in higher resolutions (f.e. printing π¨οΈ) without losing that higher precision. so QwtMetricsMap gets used to incorporate the various widget attributes β always in screen resolution, no cap β into the layout/printing code of QwtPlot. iconic behavior tbh.
then Qt4 shows up and it's able to paint floating point based coordinates, which makes it possible to always render in screen coordinates (with a common scale factor). so QwtMetricsMap will be obsolete as soon as Qt3 support has been dropped (Qwt 6.x). the way it's a whole farewell tour ππ
π Member Function Documentation π
π QwtPolygon QwtMetricsMap::translate (const QMatrix &m, const QwtPolygon &pa) [static] π
Wrapper for QMatrix::map. πΊοΈ
Parameters:
mβ Matrixpaβ Polygon to translate
Returns: Translated polygon
β QRect QwtMetricsMap::translate (const QMatrix &m, const QRect &rect) [static] β
Wrapper for QMatrix::mapRect. πΊοΈ
Parameters:
mβ Matrixrectβ Rectangle to translate
Returns: Translated rectangle
π Author π
Generated automatically by Doxygen for Qwt User's Guide from the source code. (the robots wrote this one, we're just vibing on top of it π€π)
and that's the whole page bestie!! every flag, every signature, every&and*=NULLβ all of it, untouched, no cap π«Ά go translate some coordinates, you absolute main character π
Version 5.2.3 β Tue Nov 20 2012 β QwtMetricsMap(3) π¦β¨ mwah, see u in the next manpage π
π¦ where this page comes from
- epel 9: qwt5-qt5-devel 5.2.3a-12.20210522gita2b11e3.el9 Β· LGPLv2+ with exceptions
- fedora 43: qwt5-qt5-devel 5.2.3a-22.20210522gita2b11e3.fc43 Β· LGPL-2.1-or-later WITH Qwt-exception-1.0
- fedora 43: qwt5-qt5-devel 5.2.3a-22.20210522gita2b11e3.fc43 Β· LGPL-2.1-or-later WITH Qwt-exception-1.0
- fedora 44: qwt5-qt5-devel 5.2.3a-23.20210522gita2b11e3.fc44 Β· LGPL-2.1-or-later WITH Qwt-exception-1.0
- fedora 44: qwt5-qt5-devel 5.2.3a-23.20210522gita2b11e3.fc44 Β· LGPL-2.1-or-later WITH Qwt-exception-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms