1 #ifndef PIXEL_FORMATS_INCLUDED 2 #define PIXEL_FORMATS_INCLUDED 3 4 #if defined(AGG_GRAY8) 5 6 #include "agg_pixfmt_gray.h" 7 #define pix_format agg::pix_format_gray8 8 typedef agg::pixfmt_gray8 pixfmt; 9 typedef agg::pixfmt_gray8_pre pixfmt_pre; 10 typedef agg::gray8 color_type; 11 12 #elif defined(AGG_GRAY16) 13 14 #include "agg_pixfmt_gray.h" 15 #define pix_format agg::pix_format_gray16 16 typedef agg::pixfmt_gray16 pixfmt; 17 typedef agg::pixfmt_gray16_pre pixfmt_pre; 18 typedef agg::gray16 color_type; 19 20 #elif defined(AGG_BGR24) 21 22 #include "agg_pixfmt_rgb.h" 23 #define pix_format agg::pix_format_bgr24 24 typedef agg::pixfmt_bgr24 pixfmt; 25 typedef agg::pixfmt_bgr24_pre pixfmt_pre; 26 #define pixfmt_gamma agg::pixfmt_bgr24_gamma 27 typedef agg::rgba8 color_type; 28 typedef agg::order_bgr component_order; 29 30 #elif defined(AGG_RGB24) 31 32 #include "agg_pixfmt_rgb.h" 33 #define pix_format agg::pix_format_rgb24 34 typedef agg::pixfmt_rgb24 pixfmt; 35 typedef agg::pixfmt_rgb24_pre pixfmt_pre; 36 #define pixfmt_gamma agg::pixfmt_rgb24_gamma 37 typedef agg::rgba8 color_type; 38 typedef agg::order_rgb component_order; 39 40 #elif defined(AGG_BGR48) 41 42 #include "agg_pixfmt_rgb.h" 43 #define pix_format agg::pix_format_bgr48 44 typedef agg::pixfmt_bgr48 pixfmt; 45 typedef agg::pixfmt_bgr48_pre pixfmt_pre; 46 #define pixfmt_gamma agg::pixfmt_bgr48_gamma 47 typedef agg::rgba16 color_type; 48 typedef agg::order_bgr component_order; 49 50 #elif defined(AGG_RGB48) 51 52 #include "agg_pixfmt_rgb.h" 53 #define pix_format agg::pix_format_rgb48 54 typedef agg::pixfmt_rgb48 pixfmt; 55 typedef agg::pixfmt_rgb48_pre pixfmt_pre; 56 #define pixfmt_gamma agg::pixfmt_rgb48_gamma 57 typedef agg::rgba16 color_type; 58 typedef agg::order_rgb component_order; 59 60 #elif defined(AGG_BGRA32) 61 62 #include "agg_pixfmt_rgba.h" 63 #define pix_format agg::pix_format_bgra32 64 typedef agg::pixfmt_bgra32 pixfmt; 65 typedef agg::pixfmt_bgra32_pre pixfmt_pre; 66 typedef agg::rgba8 color_type; 67 typedef agg::order_bgra component_order; 68 69 #elif defined(AGG_RGBA32) 70 71 #include "agg_pixfmt_rgba.h" 72 #define pix_format agg::pix_format_rgba32 73 typedef agg::pixfmt_rgba32 pixfmt; 74 typedef agg::pixfmt_rgba32_pre pixfmt_pre; 75 typedef agg::rgba8 color_type; 76 typedef agg::order_rgba component_order; 77 78 #elif defined(AGG_ARGB32) 79 80 #include "agg_pixfmt_rgba.h" 81 #define pix_format agg::pix_format_argb32 82 typedef agg::pixfmt_argb32 pixfmt; 83 typedef agg::pixfmt_argb32_pre pixfmt_pre; 84 typedef agg::rgba8 color_type; 85 typedef agg::order_argb component_order; 86 87 #elif defined(AGG_ABGR32) 88 89 #include "agg_pixfmt_rgba.h" 90 #define pix_format agg::pix_format_abgr32 91 typedef agg::pixfmt_abgr32 pixfmt; 92 typedef agg::pixfmt_abgr32_pre pixfmt_pre; 93 typedef agg::rgba8 color_type; 94 typedef agg::order_argb component_order; 95 96 #elif defined(AGG_BGRA64) 97 98 #include "agg_pixfmt_rgba.h" 99 #define pix_format agg::pix_format_bgra64 100 typedef agg::pixfmt_bgra64 pixfmt; 101 typedef agg::pixfmt_bgra64_pre pixfmt_pre; 102 typedef agg::rgba16 color_type; 103 typedef agg::order_bgra component_order; 104 105 #elif defined(AGG_RGBA64) 106 107 #include "agg_pixfmt_rgba.h" 108 #define pix_format agg::pix_format_rgba64 109 typedef agg::pixfmt_rgba64 pixfmt; 110 typedef agg::pixfmt_rgba64_pre pixfmt_pre; 111 typedef agg::rgba16 color_type; 112 typedef agg::order_rgba component_order; 113 114 #elif defined(AGG_ARGB64) 115 116 #include "agg_pixfmt_rgba.h" 117 #define pix_format agg::pix_format_argb64 118 typedef agg::pixfmt_argb64 pixfmt; 119 typedef agg::pixfmt_argb64_pre pixfmt_pre; 120 typedef agg::rgba16 color_type; 121 typedef agg::order_argb component_order; 122 123 #elif defined(AGG_ABGR64) 124 125 #include "agg_pixfmt_rgba.h" 126 #define pix_format agg::pix_format_abgr64 127 typedef agg::pixfmt_abgr64 pixfmt; 128 typedef agg::pixfmt_abgr64_pre pixfmt_pre; 129 typedef agg::rgba16 color_type; 130 typedef agg::order_argb component_order; 131 132 #elif defined(AGG_RGB565) 133 134 #include "agg_pixfmt_rgb_packed.h" 135 #define pix_format agg::pix_format_rgb565 136 typedef agg::pixfmt_rgb565 pixfmt; 137 typedef agg::pixfmt_rgb565_pre pixfmt_pre; 138 typedef agg::rgba8 color_type; 139 140 #elif defined(AGG_RGB555) 141 142 #include "agg_pixfmt_rgb_packed.h" 143 #define pix_format agg::pix_format_rgb555 144 typedef agg::pixfmt_rgb555 pixfmt; 145 typedef agg::pixfmt_rgb555_pre pixfmt_pre; 146 typedef agg::rgba8 color_type; 147 148 #elif defined(AGG_RGB_AAA) 149 150 #include "agg_pixfmt_rgb_packed.h" 151 #define pix_format agg::pix_format_rgbAAA 152 typedef agg::pixfmt_rgbAAA pixfmt; 153 typedef agg::pixfmt_rgbAAA_pre pixfmt_pre; 154 typedef agg::rgba16 color_type; 155 156 #elif defined(AGG_BGR_AAA) 157 158 #include "agg_pixfmt_rgb_packed.h" 159 #define pix_format agg::pix_format_bgrAAA 160 typedef agg::pixfmt_bgrAAA pixfmt; 161 typedef agg::pixfmt_bgrAAA_pre pixfmt_pre; 162 typedef agg::rgba16 color_type; 163 164 #elif defined(AGG_RGB_BBA) 165 166 #include "agg_pixfmt_rgb_packed.h" 167 #define pix_format agg::pix_format_rgbBBA 168 typedef agg::pixfmt_rgbBBA pixfmt; 169 typedef agg::pixfmt_rgbBBA_pre pixfmt_pre; 170 typedef agg::rgba16 color_type; 171 172 #elif defined(AGG_BGR_ABB) 173 174 #include "agg_pixfmt_rgb_packed.h" 175 #define pix_format agg::pix_format_bgrABB 176 typedef agg::pixfmt_bgrABB pixfmt; 177 typedef agg::pixfmt_bgrABB_pre pixfmt_pre; 178 typedef agg::rgba16 color_type; 179 180 #else 181 #error Please define pixel format: AGG_GRAY8, AGG_BGR24, AGG_RGB24, etc. See this file above 182 #endif 183 184 #endif 185