Re: [Tuxpaint-devel] Xor of stamps too fine in high resolution screens
An award-winning drawing program for children of all ages
Brought to you by:
wkendrick
From: Albert C. <aca...@gm...> - 2023-03-17 11:30:55
|
On 3/17/23, Bill Kendrick <nb...@so...> wrote: > On Fri, Mar 17, 2023 at 12:41:19AM +0100, Pere Pujal i Carabantes wrote: >> Pixels are too tiny that make hard to see the Xor, >> of course it is there and with a little of attention >> one sees it but it is hard to see. >> >> I wonder if we could make the Xor thicker so it is >> easy to see. Thicker in which way? The dots could be thicker, or the outline could be thicker, or both. > There's a stiple[] array used when doing the stamp XOR, > but I honestly don't understand it. I need to look at it. It defines the dot pattern. Oddly, only the "8" matters. I don't remember why. This is the one in use: #define STIPLE_W 5 #define STIPLE_H 5 static char stiple[] = "84210" "10842" "42108" "08421" "21084"; To make dots thicker, that must be scaled. To make the outlines thicker, something else needs to be scaled. (something about calculating the stamp outline probably) If both should be scaled, which seems likely, then perhaps that should be done together when acting on the screen, leaving the non-screen data small. To try out scaling only the dots: #define STIPLE_W 10 #define STIPLE_H 10 static char stiple[] = "8844221100" "8844221100" "1100884422" "1100884422" "4422110088" "4422110088" "0088442211" "0088442211" "2211008844" "2211008844" ; I just doubled everything, making dots 2x2 instead of 1x1. Of course this is no good for compiling a single binary to support multiple screen sizes, and again it doesn't do anything about the thickness of the stamp outline that is being XORed onto the screen. These things should scale directly with screen size, not like the stamps do. (stamps scale with the square root of the screen size in order to balance the competing desires of using larger screens for more detail and for more room to draw) There is something to be said for keeping Tux Paint small in the pixels it internally handles, then asking the GPU to upscale the whole thing. If there isn't a GPU, high resolution is unlikely. The bad combo is probably only seen with virtual machines. |