toRect added
This commit is contained in:
parent
90cbe8ad8f
commit
bf4bc41316
|
@ -7,6 +7,7 @@
|
||||||
#include "QskFunctions.h"
|
#include "QskFunctions.h"
|
||||||
|
|
||||||
#include <qvariant.h>
|
#include <qvariant.h>
|
||||||
|
#include <qrect.h>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
static void qskRegisterIntervalF()
|
static void qskRegisterIntervalF()
|
||||||
|
@ -226,6 +227,13 @@ bool QskIntervalF::fuzzyIsBoundary( qreal value ) const
|
||||||
|| qskFuzzyCompare( value, m_upperBound );
|
|| qskFuzzyCompare( value, m_upperBound );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QRectF QskIntervalF::toRect( const QskIntervalF& intervalX,
|
||||||
|
const QskIntervalF& intervalY ) noexcept
|
||||||
|
{
|
||||||
|
return QRectF( intervalX.lowerBound(), intervalY.lowerBound(),
|
||||||
|
intervalX.width(), intervalY.width() ).normalized();
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef QT_NO_DEBUG_STREAM
|
#ifndef QT_NO_DEBUG_STREAM
|
||||||
|
|
||||||
#include <qdebug.h>
|
#include <qdebug.h>
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include <qmetatype.h>
|
#include <qmetatype.h>
|
||||||
|
|
||||||
class QVariant;
|
class QVariant;
|
||||||
|
class QRectF;
|
||||||
|
|
||||||
class QSK_EXPORT QskIntervalF
|
class QSK_EXPORT QskIntervalF
|
||||||
{
|
{
|
||||||
|
@ -82,6 +83,8 @@ class QSK_EXPORT QskIntervalF
|
||||||
|
|
||||||
QskIntervalF interpolated( const QskIntervalF&, qreal progress ) const noexcept;
|
QskIntervalF interpolated( const QskIntervalF&, qreal progress ) const noexcept;
|
||||||
|
|
||||||
|
static QRectF toRect( const QskIntervalF&, const QskIntervalF& ) noexcept;
|
||||||
|
|
||||||
static QVariant interpolate( const QskIntervalF&,
|
static QVariant interpolate( const QskIntervalF&,
|
||||||
const QskIntervalF&, qreal progress ) noexcept;
|
const QskIntervalF&, qreal progress ) noexcept;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue