more constructors to avoid losing alpha values
This commit is contained in:
parent
14040bf652
commit
4744d85725
@ -28,6 +28,8 @@ class QSK_EXPORT QskGradientStop
|
|||||||
public:
|
public:
|
||||||
QskGradientStop() noexcept;
|
QskGradientStop() noexcept;
|
||||||
QskGradientStop( qreal position, const QColor& ) noexcept;
|
QskGradientStop( qreal position, const QColor& ) noexcept;
|
||||||
|
QskGradientStop( qreal position, Qt::GlobalColor ) noexcept;
|
||||||
|
QskGradientStop( qreal position, QRgb ) noexcept;
|
||||||
|
|
||||||
bool operator==( const QskGradientStop& ) const noexcept;
|
bool operator==( const QskGradientStop& ) const noexcept;
|
||||||
bool operator!=( const QskGradientStop& ) const noexcept;
|
bool operator!=( const QskGradientStop& ) const noexcept;
|
||||||
@ -67,6 +69,18 @@ inline QskGradientStop::QskGradientStop(
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline QskGradientStop::QskGradientStop(
|
||||||
|
qreal position, const Qt::GlobalColor color ) noexcept
|
||||||
|
: QskGradientStop( position, QColor( color ) )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QskGradientStop::QskGradientStop(
|
||||||
|
qreal position, QRgb rgb ) noexcept
|
||||||
|
: QskGradientStop( position, QColor::fromRgba( rgb ) )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
inline qreal QskGradientStop::position() const noexcept
|
inline qreal QskGradientStop::position() const noexcept
|
||||||
{
|
{
|
||||||
return m_position;
|
return m_position;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user