You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
when computing pixel color in twr_gfx_draw_fill_rectangle_dithering() function, following code is used:
uint32_td_color=color& (1 << (dx+4*dy));
This produces either zero or some positive number in range [1…32768]. This will work fine with monochromatic implementations considering any positive value to be black, but it will break any implementation expecting real color value (for multicolor displays). There is another drawback, which will not allow to choose dithering color.
My suggestion is to fix this function to consistently produce color value of "0" or "1", for example:
Hi,
when computing pixel color in
twr_gfx_draw_fill_rectangle_dithering()
function, following code is used:This produces either zero or some positive number in range [1…32768]. This will work fine with monochromatic implementations considering any positive value to be black, but it will break any implementation expecting real color value (for multicolor displays). There is another drawback, which will not allow to choose dithering color.
My suggestion is to fix this function to consistently produce color value of "0" or "1", for example:
And to introduce another function to allow for multicolor dithering:
The text was updated successfully, but these errors were encountered: