QwtScaleMap(3)

🌸 NAME 🌸

okay so this page is QwtScaleMap from the Library Functions Manual β€” yes bestie, the library functions manual, you're in the right place πŸ’…βœ¨

QwtScaleMap β€” a scale map. That's the whole name, and it's iconic for it πŸ‘‘


✨ SYNOPSIS ✨

#include <qwt_scale_map.h>

πŸ’– Public Member Functions πŸ’–

  • QwtScaleMap () β€” constructor, no cap.
  • QwtScaleMap (const QwtScaleMap &) β€” copy constructor, giving dupe energy but legal πŸ’–
  • ~QwtScaleMap () β€” destructor, she's leaving the group chat.
  • QwtScaleMap & operator= (const QwtScaleMap &) β€” assignment operator, putting one map into another.
  • void setTransformation (QwtTransform *) β€” set the transformation.
  • const QwtTransform * transformation () const β€” get the transformation.
  • void setPaintInterval (double p1, double p2) β€” specify the borders of the paint device interval.
  • void setScaleInterval (double s1, double s2) β€” specify the borders of the scale interval.
  • double transform (double s) const β€” transform a scale value.
  • double invTransform (double p) const β€” transform a paint-device value back.
  • double p1 () const β€” first paint border.
  • double p2 () const β€” second paint border.
  • double s1 () const β€” first scale border.
  • double s2 () const β€” second scale border.
  • double pDist () const β€” paint distance.
  • double sDist () const β€” scale distance.
  • bool isInverting () const β€” checking if the map is inverting.

πŸ’œ Static Public Member Functions πŸ’œ

  • static QRectF transform (const QwtScaleMap &, const QwtScaleMap &, const QRectF &) β€” transform a rectangle from scale to paint coordinates.
  • static QRectF invTransform (const QwtScaleMap &, const QwtScaleMap &, const QRectF &) β€” transform a rectangle from paint to scale coordinates.
  • static QPointF transform (const QwtScaleMap &, const QwtScaleMap &, const QPointF &) β€” transform a point from scale to paint coordinates.
  • static QPointF invTransform (const QwtScaleMap &, const QwtScaleMap &, const QPointF &) β€” transform a point from paint to scale coordinates.

🌈 Detailed Description 🌈

A scale map. Literally what it says on the tin, bestie πŸŽ€

QwtScaleMap offers transformations from the coordinate system of a scale into the linear coordinate system of a paint device and vice versa. It's giving bridge between two worlds, and honestly? Obsessed ✨

πŸ“ Definition at line 26 of file qwt_scale_map.h.


πŸŽ€ Constructor & Destructor Documentation πŸŽ€

πŸ’– QwtScaleMap::QwtScaleMap () πŸ’–

Constructor. The scale and paint device intervals are both set to [0,1]. Starting fresh, cute and symmetrical 🫢

πŸ“ Definition at line 21 of file qwt_scale_map.cpp.

πŸ¦‹ QwtScaleMap::QwtScaleMap (const QwtScaleMap & other) πŸ¦‹

Copy constructor. It's a duplicate, but make it fashion πŸ’…

πŸ“ Definition at line 33 of file qwt_scale_map.cpp.

🌸 QwtScaleMap::~QwtScaleMap () 🌸

Destructor. Cleanup era, we love to see it 🧹✨

πŸ“ Definition at line 49 of file qwt_scale_map.cpp.


πŸ’… Member Function Documentation πŸ’…

πŸŽ€ QPointF QwtScaleMap::invTransform (const QwtScaleMap & xMap, const QwtScaleMap & yMap, const QPointF & pos) [static] πŸŽ€

Transform a rectangle from paint to scale coordinates. Yes, the docs say rectangle even though this overload takes a QPointF β€” I'm just the messenger, bestie πŸ’€

Parameters:

  • xMap β€” X map
  • yMap β€” Y map
  • pos β€” Position in paint coordinates

Returns: Position in scale coordinates.

See also: transform()

πŸ“ Definition at line 187 of file qwt_scale_map.cpp.

πŸ¦‹ QRectF QwtScaleMap::invTransform (const QwtScaleMap & xMap, const QwtScaleMap & yMap, const QRectF & rect) [static] πŸ¦‹

Transform a rectangle from paint to scale coordinates. Rectangle reverse era πŸ”

Parameters:

  • xMap β€” X map
  • yMap β€” Y map
  • rect β€” Rectangle in paint coordinates

Returns: Rectangle in scale coordinates.

See also: transform()

πŸ“ Definition at line 224 of file qwt_scale_map.cpp.

πŸ’œ double QwtScaleMap::invTransform (double p) const [inline] πŸ’œ

Transform an paint device value into a value in the interval of the scale. (The manpage says β€œan paint device value” β€” we're keeping the lore exactly as written πŸ˜­πŸ’–)

Parameters:

  • p β€” Value relative to the coordinates of the paint device

Returns: Transformed value.

See also: transform()

πŸ“ Definition at line 154 of file qwt_scale_map.h.

πŸ‘‘ bool QwtScaleMap::isInverting () const [inline] πŸ‘‘

Returns: True, when ( p1() < p2() ) != ( s1() < s2() )

πŸ“ Definition at line 164 of file qwt_scale_map.h.

✨ QwtScaleMap & QwtScaleMap::operator= (const QwtScaleMap & other) ✨

Assignment operator. Copy the vibe, keep the facts πŸ’…

πŸ“ Definition at line 55 of file qwt_scale_map.cpp.

πŸ’– double QwtScaleMap::p1 () const [inline] πŸ’–

Returns: First border of the paint interval.

πŸ“ Definition at line 99 of file qwt_scale_map.h.

🩷 double QwtScaleMap::p2 () const [inline] 🩷

Returns: Second border of the paint interval.

πŸ“ Definition at line 107 of file qwt_scale_map.h.

🧚 double QwtScaleMap::pDist () const [inline] 🧚

Returns: qwtAbs(p2() - p1())

πŸ“ Definition at line 115 of file qwt_scale_map.h.

🌸 double QwtScaleMap::s1 () const [inline] 🌸

Returns: First border of the scale interval.

πŸ“ Definition at line 83 of file qwt_scale_map.h.

πŸ¦‹ double QwtScaleMap::s2 () const [inline] πŸ¦‹

Returns: Second border of the scale interval.

πŸ“ Definition at line 91 of file qwt_scale_map.h.

πŸ’œ double QwtScaleMap::sDist () const [inline] πŸ’œ

Returns: qwtAbs(s2() - s1())

πŸ“ 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.

Parameters:

  • 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.

Parameters:

  • s1 β€” first border
  • s2 β€” second border
⚠️ Warning: scales might be aligned to transformation depending boundaries. So like, don't act surprised later, bestie 😭

πŸ“ Definition at line 100 of file qwt_scale_map.cpp.

⭐ void QwtScaleMap::setTransformation (QwtTransform * transform) ⭐

Initialize the map with a transformation. Transformation setup, slay πŸ”₯

πŸ“ Definition at line 76 of file qwt_scale_map.cpp.

🫢 QPointF QwtScaleMap::transform (const QwtScaleMap & xMap, const QwtScaleMap & yMap, const QPointF & pos) [static] 🫢

Transform a point from scale to paint coordinates. Point-forward behavior, honestly iconic πŸ’…

Parameters:

  • xMap β€” X map
  • yMap β€” Y map
  • pos β€” Position in scale coordinates

Returns: Position in paint coordinates.

See also: invTransform()

πŸ“ Definition at line 206 of file qwt_scale_map.cpp.

πŸ“ QRectF QwtScaleMap::transform (const QwtScaleMap & xMap, const QwtScaleMap & yMap, const QRectF & rect) [static] πŸ“

Transform a rectangle from scale to paint coordinates. Rectangle glow-up, periodt 🌟

Parameters:

  • xMap β€” X map
  • yMap β€” Y map
  • rect β€” Rectangle in scale coordinates

Returns: Rectangle in paint coordinates.

See also: invTransform()

πŸ“ Definition at line 153 of file qwt_scale_map.cpp.

πŸ’– double QwtScaleMap::transform (double s) const [inline] πŸ’–

Transform a point related to the scale interval into an point related to the interval of the paint device. Yep, β€œan point” is in the original, and I refuse to erase her legacy πŸ˜­πŸ’€

Parameters:

  • s β€” Value relative to the coordinates of the scale

Returns: Transformed value.

See also: invTransform()

πŸ“ Definition at line 137 of file qwt_scale_map.h.

🧚 const QwtTransform * QwtScaleMap::transformation () const 🧚

Get the transformation. Short, sweet, main character energy ✨

πŸ“ Definition at line 88 of file qwt_scale_map.cpp.


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for Qwt User's Guide from the source code. The robots wrote this one, bestie πŸ€–πŸ’–


okay that's the whole vibe 🫢 source/version vibes: the Qwt User's Guide; footer label: QwtScaleMap(3); date: not shown in this footer, ngl, so I'm not inventing one 🌈✨ bye bestie πŸ’…

πŸ“¦ where this page comes from