Thread: [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: Pere P. i C. <per...@gm...> - 2023-03-16 23:41:38
|
Hi all, 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. Line and Shapes Xors are better seen. I don't think it is a stoper for release, but wanted to mention here before I forget about it, recently I got a replacement for my old phone and saw this problem. Best Pere |
From: Bill K. <nb...@so...> - 2023-03-17 09:48:50
|
On Fri, Mar 17, 2023 at 12:41:19AM +0100, Pere Pujal i Carabantes wrote: > Hi all, > > 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. Ah, drat. > Line and Shapes Xors are better seen. Hrm, interesting! > I don't think it is a stoper for release, but wanted > to mention here before I forget about it, > recently I got a replacement for my old phone > and saw this problem. There's a stiple[] array used when doing the stamp XOR, but I honestly don't understand it. I need to look at it. I'll open a ticket tomorrow. I won't call it a "showstopper" for 0.9.29, unless anyone thinks I should. -bill! |
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. |
From: Bill K. <nb...@so...> - 2023-03-22 06:26:46
|
On Fri, Mar 17, 2023 at 07:30:46AM -0400, Albert Cahalan wrote: > 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. <snip> Thanks for the description of how it works. (Funny to learn only that "8" was ever used... room for some simplification?) I went with simply making the outline thicker, and I totally cheated, but I think it looks fine and will hopefully be helpful on devices with high dot pitch (like my phone). When it decides it's worth XOR'ing a pixel, it now also does this: * If it's _NOT_ already going to XOR the adjacent pixel to the right, XOR it too * Ditto for the adjacent pixel below * Ditto for the adjacent pixel below & to the right So basically -- ASCII art coming -- if before we were doing this: #-#-#- -....# #....- -....# #-#-#- (where "#" is an XOR'd pixel, and "-" would be a XOR'd pixel, except for the stiple pattern telling us to skip it) We will now do this: #-#-#-# -#-#-#- #-...-# -#...#- #-#-#-# -#-#-#- It tries to turn what was a point before into a square (but still stipled). It looks fine to me on my laptop and my external monitors. Both are 1920x1080. The external is a 23", so about 96ppi. The laptop is 14", so almost 160ppi. Wikipedia tells me my phone (a plain (non pro) Pixel 7) has a PPI of 416. Wow, no wonder I can't see anything on it! Pere & others, how does it look to you with this change? -bill! |
From: Bill K. <nb...@so...> - 2023-03-22 06:29:45
|
On Tue, Mar 21, 2023 at 11:26:37PM -0700, Bill Kendrick wrote: <snip> > I went with simply making the outline thicker, and I totally > cheated, but I think it looks fine and will hopefully be > helpful on devices with high dot pitch (like my phone). Before/after screenshots: https://twitter.com/TuxPaintTweets/status/1638427499649712128 -bill! |
From: Albert C. <aca...@gm...> - 2023-03-22 15:16:32
|
>> I went with simply making the outline thicker, and I totally >> cheated, but I think it looks fine and will hopefully be >> helpful on devices with high dot pitch (like my phone). > > Before/after screenshots: > https://twitter.com/TuxPaintTweets/status/1638427499649712128 You may remember the RAM sizes that we used to use and the number of CPUs that we used to have when Tux Paint was started. The OLPC XO-1 B2 prototype had 64 MB of RAM. You might have started with 8 MB, which was enough for X. I have upgraded well beyond that, but not enough to view Twitter without locking up my system. I have 8 GB RAM, 4 cores, and an SSD. Granted, I have other tabs open, but still... So a non-Twitter screenshot would be very helpful. >From the description, I think there is an asymmetry, which feels really wrong. Could you go both directions evenly? Also it just isn't very much when DPI has gone up by a factor of 6. I can vaguely remember how the "8" came about. I wasn't going to use strings originally, and the original stiple pattern was 4x4. I had hex numbers. I replicated the patterns to fill something larger. Eventually I noticed that the stiple pattern appeared in the hex, so I just used that. Any digit would work, so I picked the 8. I don't think the pattern should change, except getting larger. It was well tested against the stamps. The stop sign is a notable source of trouble for other patterns. It would tend to align with the edges, making the dots disappear. You can't see it now, but at low resolution the stiple pattern actually looks really good. It's not just a grey blur. |