QwtMetricsMap(3)

πŸ“¦ version 5.2.3a, in epel 9, fedora 43, fedora 44

πŸ’– 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 β€” Matrix
  • pa β€” Polygon to translate

Returns: Translated polygon


⭐ QRect QwtMetricsMap::translate (const QMatrix &m, const QRect &rect) [static] ⭐

Wrapper for QMatrix::mapRect. πŸ—ΊοΈ

Parameters:

  • m β€” Matrix
  • rect β€” 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