moscowbob Posted December 30, 2019 Report Share Posted December 30, 2019 Hi, I think there is an error in gdisp_colors.h file line 219 which cause anti-alias font to display incorrectly. #define GREEN_OF(c) (((c)&0x007E)>>3) should read #define GREEN_OF(c) (((c)&0x07E0)>>3) Regards Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted January 2, 2020 Report Share Posted January 2, 2020 Hello & welcome to the µGFX community! Thank you for bringing this to our attention. We'll put it on the ToDo list for checking. Could you please leave a short description (and if necessary examples) as to why you think that this is the case? Some screenshots might also be helpful if possible Link to comment Share on other sites More sharing options...
moscowbob Posted January 5, 2020 Author Report Share Posted January 5, 2020 Hi Joel, Below are the results of testing the macros against each other. PURE GREEN ============= r = 0, g = 255 b = 0 rgb565 = RGB2COLOR(r, g, b) = 0x07E0 ---------> TEST 1 - (((c) & 0x007E)>>3) ============= r1 = RED_OF(rgb565) = 0 g1 = GREEN_OF(rgb565) * = 12 b1 = BLUE_OF(rgb565) = 0 rgb565_1 = RGB2COLOR(r1, g1, b1) = 0x0060 ---------> Incorrect TEST 2 - (((c) & 0x07E0)>>3) ============ r2 = RED_OF(rgb565) = 0 g2 = GREEN_OF(rgb565) * = 252 b2 = BLUE_OF(rgb565) = 0 rgb565_2 = RGB2COLOR(r2, g2, b2) = 0x07E0 ---------> Matches pure green original Link to comment Share on other sites More sharing options...
inmarket Posted January 21, 2020 Report Share Posted January 21, 2020 I have finally had a chance to check the line in question. That line is never used - it is a comment put in for use by the documentation system doxygen. You can see the corresponding conditional compilation on line 132. The line that actually gets used is the block of macros between line 304 and 313 for true color pixel formats. So, in a proper compile it will correctly generate the color mapping. Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted January 21, 2020 Report Share Posted January 21, 2020 This was fixed in commit ff93884f71f783627f196330fd0c9f6a639bee56. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now