191 COMP_PREFIX ## G, COMP_PREFIX ## B) 192 193 #define Extract4ByteArgbCompsAndAlphaFromArgb(pixel, COMP_PREFIX) \ 194 Extract3ByteRgbCompsAndAlphaFromArgb(pixel, COMP_PREFIX) 195 196 #define Extract1ByteGrayCompsAndAlphaFromArgb(pixel, COMP_PREFIX) \ 197 do { \ 198 int r, g, b; \ 199 ExtractIntDcmComponents1234(pixel, COMP_PREFIX ## A, r, g, b); \ 200 COMP_PREFIX ## G = ComposeByteGrayFrom3ByteRgb(r, g, b); \ 201 } while (0) 202 203 #define Extract1ShortGrayCompsAndAlphaFromArgb(pixel, COMP_PREFIX) \ 204 do { \ 205 int r, g, b; \ 206 ExtractIntDcmComponents1234(pixel, COMP_PREFIX ## A, r, g, b); \ 207 COMP_PREFIX ## G = ComposeUshortGrayFrom3ByteRgb(r, g, b); \ 208 COMP_PREFIX ## A = (COMP_PREFIX ## A << 8) + COMP_PREFIX ## A; \ 209 } while (0) 210 211 #endif /* IntArgb_h_Included */ | 191 COMP_PREFIX ## G, COMP_PREFIX ## B) 192 193 #define Extract4ByteArgbCompsAndAlphaFromArgb(pixel, COMP_PREFIX) \ 194 Extract3ByteRgbCompsAndAlphaFromArgb(pixel, COMP_PREFIX) 195 196 #define Extract1ByteGrayCompsAndAlphaFromArgb(pixel, COMP_PREFIX) \ 197 do { \ 198 int r, g, b; \ 199 ExtractIntDcmComponents1234(pixel, COMP_PREFIX ## A, r, g, b); \ 200 COMP_PREFIX ## G = ComposeByteGrayFrom3ByteRgb(r, g, b); \ 201 } while (0) 202 203 #define Extract1ShortGrayCompsAndAlphaFromArgb(pixel, COMP_PREFIX) \ 204 do { \ 205 int r, g, b; \ 206 ExtractIntDcmComponents1234(pixel, COMP_PREFIX ## A, r, g, b); \ 207 COMP_PREFIX ## G = ComposeUshortGrayFrom3ByteRgb(r, g, b); \ 208 COMP_PREFIX ## A = (COMP_PREFIX ## A << 8) + COMP_PREFIX ## A; \ 209 } while (0) 210 211 /* 212 * DeclareAndInit ## TYPE ## SrcOverDstBlendFactor 213 * Declares and initializes the appropriate blend factor to be used for 214 * blending destination color components with source color. 215 */ 216 #define DeclareAndInitIntArgbSrcOverDstBlendFactor(dF, dA, PREFIX) \ 217 jint PREFIX = dA; 218 219 #endif /* IntArgb_h_Included */ |