Page 1 of 1

Drawing with subpixel resolution.

Posted: Mon May 03, 2021 5:27 pm
by rascalito
Hello!

This is not a question, just a remark which may help those who are trying to make smooth
drawings on a screen.
The following picture shows the difference of drawing with subpixel resolution. The blue curve has
been made with pixel resolution. This means that all the drawing commands are sent with coordinates
truncated to multiples of 16. It's not easy to spot in a picture, but it's obvious on the real screen.
You may however notice that the blue curve is a little bit shaky, as it had been drawn after drinking
too much coffee. The yellow curve uses non truncated coordinates, which makes it look extremely
smooth.

Anyway, I need truncated coordinates so the touch event correspond to the icons, buttons, etc, but
when it comes to smooth drawing, there is no other choice than using full coordinates.

Have fun!

SubPixel.png
SubPixel.png (1.19 MiB) Viewed 18156 times