diff options
Diffstat (limited to 'src/gui/kernel/qpixelformat.h')
-rw-r--r-- | src/gui/kernel/qpixelformat.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/gui/kernel/qpixelformat.h b/src/gui/kernel/qpixelformat.h index f55c97c7c0..b7a4377a69 100644 --- a/src/gui/kernel/qpixelformat.h +++ b/src/gui/kernel/qpixelformat.h @@ -103,7 +103,8 @@ public: CMYK, HSL, HSV, - YUV + YUV, + Alpha }; enum AlphaUsage { @@ -304,6 +305,22 @@ Q_DECL_CONSTEXPR inline QPixelFormat qPixelFormatGrayscale(uchar channelSize, typeInt); } +Q_DECL_CONSTEXPR inline QPixelFormat qPixelFormatAlpha(uchar channelSize, + QPixelFormat::TypeInterpretation typeInt=QPixelFormat::UnsignedInteger) Q_DECL_NOTHROW +{ + return QPixelFormat(QPixelFormat::Alpha, + 0, + 0, + 0, + 0, + 0, + channelSize, + QPixelFormat::UsesAlpha, + QPixelFormat::AtBeginning, + QPixelFormat::NotPremultiplied, + typeInt); +} + Q_DECL_CONSTEXPR inline QPixelFormat qPixelFormatCmyk(uchar channelSize, uchar alfa=0, QPixelFormat::AlphaUsage usage=QPixelFormat::IgnoresAlpha, |