Added dithering to RGBmode. Dithering is controlled by the
environment variable YGL_DITHERSIZE or shorter
YGL_DSZ. With this
variable you can specify the size of the dither matrix. The
default value is 4, leading to a 4x4 dither matrix. Valid values
range from 0 to 6. On a normal 8 bit TrueColor visual ({3,3,2}
bits {red,green,blue}) you obtain 113x113x49 = 625681 different
"colors" with YGL_DSZ=4, leading to an effective screen
depth of approx. 19 bits. The other values and the effective
screendepths are:
| 8 bit (3-3-2) | 12 bit (4-4-4) | 16 bit (6-5-5)
YGL_DSZ| # colors (bits) | # colors (bits) | # colors (bits)
-------------------------------------------------------------
0,1 | 256 ( 8 ) | 4096 (12 ) | 65536 (16 )
2 | 10933 (13.4) | 226981 (17.8) | 3953125 (21.9)
3 | 114688 (16.8) | 2515456 (21.3) | 44531200 (25.4)
4 | 625681 (19.3) | 13997521 (23.7) | 249232081 (27.9)
5 | 2354176 (21.2) | 53157376 (25.7) | 949029376 (29.8)
6 | 6976981 (22.7) |158340421 (27.2) |2831006341 (31.4)