QskBorderMetrics::rotated + QskBoxColors::rotated added
This commit is contained in:
parent
1866ecb2f3
commit
ad5d2ddf66
@ -106,6 +106,21 @@ void QskBorderMetrics::setRadius( Qt::Corner corner, qreal radiusX, qreal radius
|
||||
}
|
||||
}
|
||||
|
||||
QskBorderMetrics QskBorderMetrics::rotated() const
|
||||
{
|
||||
QskBorderMetrics other;
|
||||
|
||||
other.m_widths = m_widths.rotated();
|
||||
|
||||
for ( int i = 0; i < 4; i++ )
|
||||
other.m_radii[i] = m_radii[i].transposed();
|
||||
|
||||
other.m_widthIsRelative = m_widthIsRelative;
|
||||
other.m_radiusIsRelative = m_radiusIsRelative;
|
||||
|
||||
return other;
|
||||
}
|
||||
|
||||
QskBorderMetrics QskBorderMetrics::toAbsolute( const QSizeF& size ) const
|
||||
{
|
||||
if ( !( m_radiusIsRelative || m_widthIsRelative ) )
|
||||
|
@ -65,6 +65,7 @@ public:
|
||||
|
||||
QskBorderMetrics interpolated( const QskBorderMetrics&, qreal value ) const;
|
||||
QskBorderMetrics toAbsolute ( const QSizeF& ) const;
|
||||
QskBorderMetrics rotated() const;
|
||||
|
||||
static QVariant interpolate( const QskBorderMetrics&,
|
||||
const QskBorderMetrics&, qreal progress );
|
||||
|
@ -217,6 +217,23 @@ QskBoxColors QskBoxColors::mirrored( Qt::Orientations orientations ) const
|
||||
return c;
|
||||
}
|
||||
|
||||
QskBoxColors QskBoxColors::rotated() const
|
||||
{
|
||||
QskBoxColors c;
|
||||
|
||||
c.m_border[ Qsk::Left ] = m_border[ Qsk::Top ];
|
||||
c.m_border[ Qsk::Top ] = m_border[ Qsk::Right ];
|
||||
c.m_border[ Qsk::Right ] = m_border[ Qsk::Bottom ];
|
||||
c.m_border[ Qsk::Bottom ] = m_border[ Qsk::Right ];
|
||||
|
||||
c.m_fill[ Qt::TopLeftCorner ] = m_fill[ Qt::TopRightCorner ];
|
||||
c.m_fill[ Qt::TopRightCorner ] = m_fill[ Qt::BottomRightCorner ];
|
||||
c.m_fill[ Qt::BottomLeftCorner ] = m_fill[ Qt::TopLeftCorner ];
|
||||
c.m_fill[ Qt::BottomRightCorner ] = m_fill[ Qt::BottomLeftCorner ];
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
QskBoxColors QskBoxColors::interpolated( const QskBoxColors& to, qreal ratio ) const
|
||||
{
|
||||
QskBoxColors colors;
|
||||
|
@ -45,9 +45,11 @@ public:
|
||||
QColor fillColor( Qt::Corner ) const;
|
||||
|
||||
QskBoxColors interpolated( const QskBoxColors&, qreal value ) const;
|
||||
QskBoxColors mirrored( Qt::Orientations ) const;
|
||||
QskBoxColors shaded( uint alpha ) const;
|
||||
|
||||
QskBoxColors mirrored( Qt::Orientations ) const;
|
||||
QskBoxColors rotated() const;
|
||||
|
||||
static QVariant interpolate( const QskBoxColors&,
|
||||
const QskBoxColors&, qreal ratio );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user