mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-06-03 17:08:08 -04:00
No & is a bit faster here
This commit is contained in:
parent
26b796f67d
commit
35e64c44d8
@ -23,7 +23,7 @@ public:
|
|||||||
quint8 g;
|
quint8 g;
|
||||||
quint8 b;
|
quint8 b;
|
||||||
|
|
||||||
static RGB from(const QRgb &color)
|
static RGB from(const QRgb color)
|
||||||
{
|
{
|
||||||
RGB c;
|
RGB c;
|
||||||
c.r = qRed(color);
|
c.r = qRed(color);
|
||||||
@ -169,7 +169,7 @@ static QDataStream &operator>>(QDataStream &s, PCXHEADER &ph)
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
static QDataStream &operator<<(QDataStream &s, const RGB &rgb)
|
static QDataStream &operator<<(QDataStream &s, const RGB rgb)
|
||||||
{
|
{
|
||||||
s << rgb.r << rgb.g << rgb.b;
|
s << rgb.r << rgb.g << rgb.b;
|
||||||
|
|
||||||
|
@ -276,7 +276,7 @@ const XCFImageFormat::LayerModes XCFImageFormat::layer_modes[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
//! Change a QRgb value's alpha only.
|
//! Change a QRgb value's alpha only.
|
||||||
inline QRgb qRgba(const QRgb &rgb, int a)
|
inline QRgb qRgba(const QRgb rgb, int a)
|
||||||
{
|
{
|
||||||
return ((a & 0xff) << 24 | (rgb & RGB_MASK));
|
return ((a & 0xff) << 24 | (rgb & RGB_MASK));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user