toRect added
This commit is contained in:
parent
90cbe8ad8f
commit
bf4bc41316
@ -7,6 +7,7 @@
|
||||
#include "QskFunctions.h"
|
||||
|
||||
#include <qvariant.h>
|
||||
#include <qrect.h>
|
||||
#include <algorithm>
|
||||
|
||||
static void qskRegisterIntervalF()
|
||||
@ -226,6 +227,13 @@ bool QskIntervalF::fuzzyIsBoundary( qreal value ) const
|
||||
|| 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
|
||||
|
||||
#include <qdebug.h>
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include <qmetatype.h>
|
||||
|
||||
class QVariant;
|
||||
class QRectF;
|
||||
|
||||
class QSK_EXPORT QskIntervalF
|
||||
{
|
||||
@ -82,6 +83,8 @@ class QSK_EXPORT QskIntervalF
|
||||
|
||||
QskIntervalF interpolated( const QskIntervalF&, qreal progress ) const noexcept;
|
||||
|
||||
static QRectF toRect( const QskIntervalF&, const QskIntervalF& ) noexcept;
|
||||
|
||||
static QVariant interpolate( const QskIntervalF&,
|
||||
const QskIntervalF&, qreal progress ) noexcept;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user