[Pixman] Strange looking text in 'dither_factor_bayer_8'
John Emmas
john at creativepost.co.uk
Thu Jun 6 14:41:24 UTC 2019
MSVC is complaining about a new function called 'dither_factor_bayer_8'
(in pixman/pixman-bits-image.c). The relevant code looks like this:-
m = ((y & 0b001) << 5) | ((x & 0b001) << 4) |
((y & 0b010) << 2) | ((x & 0b010) << 1) |
((y & 0b100) >> 1) | ((x & 0b100) >> 2);
It's complaining about the symbols like '0b001' and '0b100' etc. Are
these intended to be hex numbers? In other words, should the code have
looked like this?
m = ((y & 0xb001) << 5) | ((x & 0xb001) << 4) |
((y & 0xb010) << 2) | ((x & 0xb010) << 1) |
((y & 0xb100) >> 1) | ((x & 0xb100) >> 2);
Or are they maybe some other numerical format? Thanks,
John
More information about the Pixman
mailing list