CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
pixel_format.h
1
2#ifndef _pixel_format_h_
3#define _pixel_format_h_
4#include "system/enum.h"
5#include "system/enum_helpers.h"
6
7namespace System { namespace Drawing { namespace Imaging {
8
9 /*
10 * In-memory pixel data formats:
11 * bits 0-7 = format index
12 * bits 8-15 = pixel size (in bits)
13 * bits 16-23 = flags
14 * bits 24-31 = reserved
15 */
17 enum class PixelFormat {
20 Indexed = 0x00010000,
22 Gdi = 0x00020000,
24 Alpha = 0x00040000,
26 PAlpha = 0x00080000,
28 Extended = 0x00100000,
30 Canonical = 0x00200000,
32 Undefined = 0,
34 DontCare = 0,
36 Format1bppIndexed = 1 | (1 << 8) | (int)Indexed | (int)Gdi,
38 Format4bppIndexed = 2 | (4 << 8) | (int)Indexed | (int)Gdi,
40 Format8bppIndexed = 3 | (8 << 8) | (int)Indexed | (int)Gdi,
42 Format16bppGrayScale = 4 | (16 << 8) | (int)Extended,
44 Format16bppRgb555 = 5 | (16 << 8) | (int)Gdi,
46 Format16bppRgb565 = 6 | (16 << 8) | (int)Gdi,
48 Format16bppArgb1555 = 7 | (16 << 8) | (int)Alpha | (int)Gdi,
50 Format24bppRgb = 8 | (24 << 8) | (int)Gdi,
52 Format32bppRgb = 9 | (32 << 8) | (int)Gdi,
54 Format32bppArgb = 10 | (32 << 8) | (int)Alpha | (int)Gdi | (int)Canonical,
57 Format32bppPArgb = 11 | (32 << 8) | (int)Alpha | (int)PAlpha | (int)Gdi,
59 Format48bppRgb = 12 | (48 << 8) | (int)Extended,
61 Format64bppArgb = 13 | (64 << 8) | (int)Alpha | (int)Canonical | (int)Extended,
64 Format64bppPArgb = 14 | (64 << 8) | (int)Alpha | (int)PAlpha | (int)Extended,
66 Format32bppCMYK = (15 | (32 << 8)),
68 Max = 16,
69 };
70
73 DECLARE_ENUM_OPERATORS(PixelFormat);
74
76 DECLARE_USING_GLOBAL_OPERATORS
78}}}
79
81DECLARE_USING_ENUM_OPERATORS(System::Drawing::Imaging);
82
85template<>
86struct EnumMetaInfo<System::Drawing::Imaging::PixelFormat>
87{
90 static ASPOSECPP_SHARED_API const std::array<std::pair<System::Drawing::Imaging::PixelFormat, const char_t*>, 24>& values()
91 {
92 static std::array<std::pair<System::Drawing::Imaging::PixelFormat, const char_t*>, 24> enum_values = {{
117 }};
118 return enum_values;
119 }
120};
121
122#endif
Definition: bitmap.h:56
PixelFormat
Specifies the color data format of a pixel.
Definition: pixel_format.h:17
@ Format48bppRgb
Specifies that the pixel format is 48 bits per pixel with 16 bits for each of red,...
@ PAlpha
Specifies that the pixel data contains pre-multipled alpha values.
@ Format32bppRgb
Specifies that the pixel format is 32 bits per pixel with 8 bits for each of red, green,...
@ Format32bppCMYK
Specifies that the pixel format is 32 bits per pixel with 8 bits for each of the cyan,...
@ DontCare
The pixel format is not specified.
@ Alpha
Specifies that the pixel data contains alpha values which are not pre-multiplied.
@ Format8bppIndexed
Specifies that pixel format is 8 bits per pixel indexed color.
@ Max
The max value of this enum.
@ Format4bppIndexed
Specifies that pixel format is 4 bits per pixel indexed color.
@ Format32bppArgb
Specifies that the pixel format is 32 bits per pixel with 8 bits for each of red, green,...
@ Format16bppRgb555
Specifies that the pixel format is 16 bits per pixel with 5 bits for each of red, green,...
@ Format64bppArgb
Specifies that the pixel format is 64 bits per pixel with 16 bits for each of red,...
@ Format16bppArgb1555
Specifies that the pixel format is 16 bits per pixel with 5 bits for each of red, green,...
@ Gdi
Specifies that the pixel data contains GDI colors.
@ Format24bppRgb
Specifies that the pixel format is 24 bits per pixel with 8 bits for each of red, green,...
@ Canonical
Specifies the pixel format of 32 bits per pixel with 24-bit color depth and an 8-bit alpha channel.
@ Indexed
Specifies that the pixel data contains color indexed values which means they are an index to colors i...
@ Format64bppPArgb
Specifies that the pixel format is 64 bits per pixel with 16 bits for each of red,...
@ Format16bppRgb565
Specifies that the pixel format is 16 bits per pixel with 5 bits for red, 6 bits for green and 5 bits...
@ Format16bppGrayScale
Specifies that the pixel format is 16 bits per pixel. The color information specifies 65536 shades of...
@ Undefined
Specifies that the pixel format is undefined.
@ Format1bppIndexed
Specifies that pixel format is 1 bit per pixel indexed color.
@ Format32bppPArgb
Specifies that the pixel format is 32 bits per pixel with 8 bits for each of red, green,...
Definition: db_command.h:9