shadowRect added
This commit is contained in:
parent
513e167d25
commit
9b9fb04adb
@ -6,7 +6,7 @@
|
|||||||
#include "QskShadowMetrics.h"
|
#include "QskShadowMetrics.h"
|
||||||
|
|
||||||
#include <qhashfunctions.h>
|
#include <qhashfunctions.h>
|
||||||
#include <qsize.h>
|
#include <qrect.h>
|
||||||
#include <qvariant.h>
|
#include <qvariant.h>
|
||||||
|
|
||||||
static void qskRegisterShadowMetrics()
|
static void qskRegisterShadowMetrics()
|
||||||
@ -71,6 +71,15 @@ QVariant QskShadowMetrics::interpolate(
|
|||||||
return QVariant::fromValue( from.interpolated( to, progress ) );
|
return QVariant::fromValue( from.interpolated( to, progress ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QRectF QskShadowMetrics::shadowRect( const QRectF& sourceRect ) const
|
||||||
|
{
|
||||||
|
return QRectF(
|
||||||
|
sourceRect.x() + m_offset.x() - m_spreadRadius,
|
||||||
|
sourceRect.y() + m_offset.y() - m_spreadRadius,
|
||||||
|
sourceRect.width() + 2 * m_spreadRadius,
|
||||||
|
sourceRect.height() + 2 * m_spreadRadius );
|
||||||
|
}
|
||||||
|
|
||||||
uint QskShadowMetrics::hash( uint seed ) const noexcept
|
uint QskShadowMetrics::hash( uint seed ) const noexcept
|
||||||
{
|
{
|
||||||
uint hash;
|
uint hash;
|
||||||
|
@ -46,6 +46,8 @@ class QSK_EXPORT QskShadowMetrics
|
|||||||
|
|
||||||
QskShadowMetrics toAbsolute( const QSizeF& ) const noexcept;
|
QskShadowMetrics toAbsolute( const QSizeF& ) const noexcept;
|
||||||
|
|
||||||
|
QRectF shadowRect( const QRectF& sourceRect ) const;
|
||||||
|
|
||||||
uint hash( uint seed = 0 ) const noexcept;
|
uint hash( uint seed = 0 ) const noexcept;
|
||||||
|
|
||||||
static QVariant interpolate( const QskShadowMetrics&,
|
static QVariant interpolate( const QskShadowMetrics&,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user