alpha -> opacity

This commit is contained in:
Uwe Rathmann 2022-03-27 17:54:16 +02:00
parent 3aa320f233
commit 7778baecc5
1 changed files with 6 additions and 6 deletions

View File

@ -461,19 +461,19 @@ namespace QskRgb
return ( rgb & ColorMask ) | ( ( static_cast< uint >( alpha ) & 0xffu ) << 24 ); return ( rgb & ColorMask ) | ( ( static_cast< uint >( alpha ) & 0xffu ) << 24 );
} }
inline QColor toTransparentF( const QColor& color, qreal alpha ) inline QColor toTransparentF( const QColor& color, qreal opacity )
{ {
return toTransparent( color, qRound( alpha * 255 ) ); return toTransparent( color, qRound( opacity * 255 ) );
} }
inline QColor toTransparentF( Qt::GlobalColor color, qreal alpha ) inline QColor toTransparentF( Qt::GlobalColor color, qreal opacity )
{ {
return toTransparent( QColor( color ), qRound( alpha * 255 ) ); return toTransparent( QColor( color ), qRound( opacity * 255 ) );
} }
inline constexpr QRgb toTransparentF( QRgb rgb, qreal alpha ) noexcept inline constexpr QRgb toTransparentF( QRgb rgb, qreal opacity ) noexcept
{ {
return toTransparent( rgb, qRound( alpha * 255 ) ); return toTransparent( rgb, qRound( opacity * 255 ) );
} }
QSK_EXPORT QRgb lighter( QRgb, int factor = 150 ) noexcept; QSK_EXPORT QRgb lighter( QRgb, int factor = 150 ) noexcept;