QwtTransform(3)

πŸ’… QwtTransform(3) β€” like, the whole manual, bestie

Ok so this is a page from the Library Functions Manual, and it's all about QwtTransform. Grab a boba, we're getting into it πŸ§‹βœ¨


🌸 NAME

QwtTransform β€” a transformation between coordinate systems. That's it, that's the vibe πŸ’«


✨ SYNOPSIS

#include <qwt_transform.h>

Inherited by QwtLogTransform, QwtNullTransform, and QwtPowerTransform. So yeah, it's the mom friend of the family πŸ‘‘

🫢 Public Member Functions

  • QwtTransform () β€” Constructor. Baby's first transform 🍼
  • virtual ~QwtTransform () β€” Destructor. Byeee πŸ‘‹
  • virtual double bounded (double value) const
  • virtual double transform (double value) const =0
  • virtual double invTransform (double value) const =0
  • virtual QwtTransform * copy () const =0 β€” Virtualized copy operation. She COPIES πŸ’…

πŸ¦‹ Detailed Description

A transformation between coordinate systems. Periodt.

QwtTransform manipulates values when they're being mapped between the scale and the paint device coordinate system. Basically she's the middle woman doing the translating so nothing gets lost in the group chat 😭

A transformation consists of 2 methods:

  • transform
  • invTransform

where one is the inverse function of the other. Like, they're each other's person, no cap 🫢

When p1, p2 are the boundaries of the paint device coordinates and s1, s2 the boundaries of the scale, QwtScaleMap uses the following calculations:

  • p = p1 + ( p2 - p1 ) * ( T( s ) - T( s1 ) / ( T( s2 ) - T( s1 ) );
  • s = invT ( T( s1 ) + ( T( s2 ) - T( s1 ) ) * ( p - p1 ) / ( p2 - p1 ) );

Fr fr, those are the formulas. Write them down, don't @ me 😌

Definition at line 35 of file qwt_transform.h.

πŸŽ€ Constructor & Destructor Documentation

QwtTransform::QwtTransform ()

Constructor. Iconic. No arguments, no drama. πŸ’–

Definition at line 20 of file qwt_transform.cpp.

QwtTransform::~QwtTransform () [virtual]

Destructor. She's logging off, the group chat goes quiet πŸ₯²

Definition at line 25 of file qwt_transform.cpp.

πŸ’œ Member Function Documentation

double QwtTransform::bounded (double value) const [virtual]

Lowkey the whole job here is: modify value to be a valid value for the transformation. The default implementation does nothing β€” she's just standing there, existing, unbothered 🌈

Parameters

  • value β€” Value to be bounded

Returns

value, unmodified. Girl did not touch it πŸ’€

Reimplemented in QwtLogTransform.

Definition at line 33 of file qwt_transform.cpp.

virtual QwtTransform * QwtTransform::copy () const [pure virtual]

Virtualized copy operation. She said "make it a double" πŸ’…βœ¨

Implemented in QwtLogTransform, QwtNullTransform, and QwtPowerTransform.

virtual double QwtTransform::invTransform (double value) const [pure virtual]

Inverse transformation function β€” the undo button, the "jk lol", the rewind βͺ

Parameters

  • value β€” Value

Returns

Modified value

See also

transform() β€” her other half 🫢

Implemented in QwtLogTransform, QwtNullTransform, and QwtPowerTransform.

virtual double QwtTransform::transform (double value) const [pure virtual]

Transformation function. The main character of this whole operation πŸ‘‘

Parameters

  • value β€” Value

Returns

Modified value

See also

invTransform() β€” the one she's inverse of πŸ’ž

Implemented in QwtLogTransform, QwtNullTransform, and QwtPowerTransform.


⭐ Author

Generated automatically by Doxygen for Qwt User's Guide from the source code. Not a human, just a robot doing robot things πŸ€–βœ¨


Ok that's the whole page, every flag and formula and line number intact, none of it skipped, we ate and left no crumbs πŸ“πŸ’…

Sign-off time: this was Qwt User's Guide, page QwtTransform(3) β€” mwah, take care bestie, go transform something πŸŒΈπŸ¦‹πŸ’–

πŸ“¦ where this page comes from