qskInnerRectF added
This commit is contained in:
parent
f1600a396d
commit
8058615c02
@ -75,6 +75,16 @@ QRect qskInnerRect( const QRectF& rect )
|
|||||||
return QRect( left, top, right - left, bottom - top );
|
return QRect( left, top, right - left, bottom - top );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QRectF qskInnerRectF( const QRectF& rect )
|
||||||
|
{
|
||||||
|
const qreal left = qCeil( rect.left() );
|
||||||
|
const qreal top = qCeil( rect.top() );
|
||||||
|
const qreal right = qFloor( rect.right() );
|
||||||
|
const qreal bottom = qFloor( rect.bottom() );
|
||||||
|
|
||||||
|
return QRectF( left, top, right - left, bottom - top );
|
||||||
|
}
|
||||||
|
|
||||||
QRectF qskValidOrEmptyInnerRect( const QRectF& rect, const QMarginsF& margins )
|
QRectF qskValidOrEmptyInnerRect( const QRectF& rect, const QMarginsF& margins )
|
||||||
{
|
{
|
||||||
qreal x, y, h, w;
|
qreal x, y, h, w;
|
||||||
|
@ -20,6 +20,7 @@ QSK_EXPORT QRectF qskAlignedRectF( const QRectF& outerRect,
|
|||||||
qreal width, qreal height, Qt::Alignment alignment );
|
qreal width, qreal height, Qt::Alignment alignment );
|
||||||
|
|
||||||
QSK_EXPORT QRect qskInnerRect( const QRectF& rect );
|
QSK_EXPORT QRect qskInnerRect( const QRectF& rect );
|
||||||
|
QSK_EXPORT QRectF qskInnerRectF( const QRectF& rect );
|
||||||
|
|
||||||
QSK_EXPORT QRectF qskValidOrEmptyInnerRect(
|
QSK_EXPORT QRectF qskValidOrEmptyInnerRect(
|
||||||
const QRectF& rect, const QMarginsF& margins );
|
const QRectF& rect, const QMarginsF& margins );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user