Re: [Tuxpaint-devel] Started the port to SDL3
An award-winning drawing program for children of all ages
Brought to you by:
wkendrick
From: Pere P. i C. <per...@gm...> - 2025-07-24 17:12:56
|
Hi Bill, and all, El dc. 16 de 07 de 2025 a les 02:13 +0200, en/na Pere Pujal i Carabantes va escriure: > El dt. 15 de 07 de 2025 a les 14:06 +0100, en/na Bill Kendrick va escriure: > > On Tue, Jul 15, 2025 at 01:53:49AM +0200, Pere Pujal i Carabantes wrote: > > > El dc. 02 de 07 de 2025 a les 10:37 +0200, en/na Pere Pujal i Carabantes va escriure: > > > > > And I would definitely want the ability to disable it for > > users who are not yet familiar/comfortable with pressure > > (i.e., an option to ignore pressure, and always be 100% opaque). > > Oh, true, currently it starts always enabled, both for size and for transparency, Added the ability to disable pressure, still needs support for command line and config. > > > Reporting pressure to Magic Tools probably makes sense, but > > I really need to sit down and think how & when, and how things > > should behave when pressure is unavailable. > > That would be also a good addition, I imagine many magic tools could benefit from it. > > > > > Still need to decide what to do when the user switches tips to the secondary one, > > > maybe hardcode it to the eraser tool? > > > > This is what I've always imagined. :) > > See ancient ticket https://sourceforge.net/p/tuxpaint/feature-requests/8/ > > > > I imagine it could just behave like Tux Paint does when holding > > the [X] key. From README: > > > > Hold the [X] key while clicking for quick access to a small sharp round > > eraser (not available when the Text or Label tools are selected, when > > you're in the process of rotating a stamp or shape, or when using an > > interactive magic tool). Release the mouse to return to your > > currently-selected tool. > > > > Of course, if pressure is enabled, then we'd want the eraser > > to behave differently depending on the pressure. Done in this way. I could not implement the idea I had in mind of fully switching to the Eraser tool when switching pen tips, I could not make SDL detect the switching until the pen were already touching the tablet, and that would be very confusing to users seeing the brush interface and getting the erase results and a sudden change of interface to the eraser one when the pen touches the tablet. I wanted to play with SDL_PenProximityEvents https://wiki.libsdl.org/SDL3/SDL_PenProximityEventbut they perform different than explained in the wiki, see https://github.com/libsdl-org/SDL/issues/12992 and I can't see any info about which pen tip is used. Also tried with SDL_PenMotionEvents https://wiki.libsdl.org/SDL3/SDL_PenMotionEvent but the _first_ time one switches the pen tips, pen_state don't show the eraser state until one touches the tablet with the eraser tip. Later switches go fine, one can detect the pen tip before it touches the tablet, but the first one would be confusing. A report of how are things now: Paint Size seems to work fine with pressure, I see a bug in transparency, the function used to blit scaled brushes changes slightly the brush color with transparency. For example the light grey c0c0c0 changes to bebebe Will see what I can do about it. Eraser Size of erasers works with pressure, transparency is not used, it fully erases to original canvas/starter/background. Maybe should be made transparency also enabled here? A small bug also present in 0.9.34 (35 also?): Ghosts xors appears when CTRL Z - CTRL R. In 0.9.34 you must move the mouse around the canvas when hitting repeteadly CTRL Z - CTRL R They appear about 1/3 of times In the sdl3 version the ghost xors appears more. Pen eraser tip Same behavior as holding X and click and drag the mouse Size works with pressure, transparency is not used. Lines Works with pressure disabled. I can't imagine how to use pressure here. Shapes Works with pressure disabled. Same as above. Magic ToDo? Stamps, text, open, etc Do not need pressure to work, assuming they are fine Command line, config ToDo Thanks for any comments Pere |