Module: wine Branch: master Commit: af8721f41b3c102b17b836aba697a16be1640053 URL: http://source.winehq.org/git/wine.git/?a=commit;h=af8721f41b3c102b17b836aba6...
Author: Dmitry Timoshkov dmitry@baikal.ru Date: Thu Jul 19 15:45:10 2012 +0900
include: Add some useful helpers to check various pixel format properties.
---
include/gdipluspixelformats.h | 25 +++++++++++++++++++++++++ 1 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/include/gdipluspixelformats.h b/include/gdipluspixelformats.h index 27843a2..acfc25f 100644 --- a/include/gdipluspixelformats.h +++ b/include/gdipluspixelformats.h @@ -49,6 +49,31 @@ typedef INT PixelFormat; #define PixelFormat32bppCMYK (15 | (32 << 8)) #define PixelFormatMax 16
+static inline BOOL IsIndexedPixelFormat(PixelFormat format) +{ + return (format & PixelFormatIndexed) ? TRUE : FALSE; +} + +static inline BOOL IsAlphaPixelFormat(PixelFormat format) +{ + return (format & PixelFormatAlpha) ? TRUE : FALSE; +} + +static inline BOOL IsCanonicalPixelFormat(PixelFormat format) +{ + return (format & PixelFormatCanonical) ? TRUE : FALSE; +} + +static inline BOOL IsExtendedPixelFormat(PixelFormat format) +{ + return (format & PixelFormatExtended) ? TRUE : FALSE; +} + +static inline UINT GetPixelFormatSize(PixelFormat format) +{ + return (format >> 8) & 0xff; +} + #ifdef __cplusplus
struct ColorPalette