Thread: [Tuxpaint-devel] Stamps rotation
An award-winning drawing program for children of all ages
Brought to you by:
wkendrick
From: Pere P. i C. <per...@gm...> - 2022-09-02 00:24:48
|
Hi all, I've just commited some work to add rotation to stamps, It is not enabled by default, you must add --stamp-rotation to the command line to activate it. The rotation is just a call to rotozoom, instead the hard work has been to deal with the xor interface, and it is still not finished, the key combos like CTRL Z and others are messing with the xor interface, but the use with a mouse should be correct. Please test, Thanks Pere |
From: Bill K. <nb...@so...> - 2022-09-02 08:53:37
|
Wow, this was a pleasant surprise! I checked it out briefly; my main issue has to do with speed, but I'm not sure the best way to deal with it. (In other words, the response of the XOR outline preview can 'lag' a bit with very large stamps.) There's also a problem of the rotation being very easily tilted sideways quickly. Since the mouse remains at the center of the stamp, you need to carefully move to the right (zero degrees angle) before moving the mouse around much. With the stamps, since the mouse currently remains at the center of the shape, if you move slightly... * up -- the shape tilts counter clockwise 90 degrees * down -- the shape titles clockwise 90 degrees * left -- the shape rotates 180 degrees I think the mouse should be warped to the far right side of the vertical-center of the stamp, like the "Shapes" tool does. (It will warp to the left of a shape if you 'drag' the shape out to the left. That's not an interaction we do with stamps, though.) Also, I just noticed (how long has this happend! 8^o) that the "flip" control button is not showing any icon. (The "mirror" one shows me the "sphere + mirror" icon, as expected.) I'll see if I can address both of these. Thanks so much for this Pere! I bet we have a ticket in SourceForge that we can close, once we're happy with the feature. If we can get it working well, I'd be fine with making it a default setting, with an option to deactivate it. FYI, we'll need to remember to document it everywhere. * The feature itself + README docs + Features page of website * Option to disable + OPTIONS docs + manpage + bash shell tab completion file -bill! On Fri, Sep 02, 2022 at 02:24:24AM +0200, Pere Pujal i Carabantes wrote: > Hi all, > > I've just commited some work to add rotation to stamps, > It is not enabled by default, you must add --stamp-rotation to > the command line to activate it. > > The rotation is just a call to rotozoom, instead the hard work > has been to deal with the xor interface, and it is still not > finished, the key combos like CTRL Z and others are messing > with the xor interface, but the use with a mouse should be correct. > > Please test, > > Thanks > Pere > > > _______________________________________________ > Tuxpaint-devel mailing list > Tux...@li... > https://lists.sourceforge.net/lists/listinfo/tuxpaint-devel -- -bill! Sent from my computer |
From: Bill K. <nb...@so...> - 2022-09-02 09:14:23
|
On Fri, Sep 02, 2022 at 01:53:24AM -0700, Bill Kendrick wrote: <snip> > There's also a problem of the rotation being very > easily tilted sideways quickly. I added a mouse warp, which helps! <snip> > Also, I just noticed (how long has this happend! 8^o) > that the "flip" control button is not showing any icon. The image is very simple, graphically, so when I did some image compression (`pngout`) recently, I guess it dropped to "indexed" mode, and it seems that the SDL alpha blending trickery I use to plop icons onto buttons was failing in that situation. I'm finding others in the same situation. I'll work to mend those, too. kendrick@gambit:~/tuxpaint/tuxpaint$ find . -name "*.png" -exec file {} \; | grep "1-bit colormap" ./starters/grid_20x20.png: PNG image data, 601 x 305, 1-bit colormap, non-interlaced ./starters/chicken.png: PNG image data, 448 x 376, 1-bit colormap, non-interlaced ./starters/jigsaw_5x5.png: PNG image data, 800 x 614, 1-bit colormap, non-interlaced ./starters/grid_10x10.png: PNG image data, 602 x 306, 1-bit colormap, non-interlaced ./starters/jetplane.png: PNG image data, 448 x 376, 1-bit colormap, non-interlaced ./starters/jigsaw_3x3.png: PNG image data, 800 x 614, 1-bit colormap, non-interlaced ./flip.png: PNG image data, 40 x 30, 1-bit colormap, non-interlaced ./magic/icons/realrainbow-roygbiv.png: PNG image data, 40 x 30, 1-bit colormap, non-interlaced ./magic/icons/flip.png: PNG image data, 40 x 30, 1-bit colormap, non-interlaced ./magic/icons/silhouette.png: PNG image data, 40 x 30, 1-bit colormap, non-interlaced ./magic/icons/fisheye.png: PNG image data, 40 x 30, 1-bit colormap, non-interlaced ./magic/icons/mosaic.png: PNG image data, 40 x 30, 1-bit colormap, non-interlaced ./magic/icons/tv.png: PNG image data, 40 x 30, 1-bit colormap, non-interlaced ./magic/icons/picasso.png: PNG image data, 40 x 30, 1-bit colormap, non-interlaced ./magic/icons/stretch.png: PNG image data, 40 x 30, 1-bit colormap, non-interlaced ./data/brushes/tiny.png: PNG image data, 1 x 1, 1-bit colormap, non-interlaced ./data/brushes/square_seethru.png: PNG image data, 20 x 20, 1-bit colormap, non-interlaced ./data/brushes/rotating_dash.png: PNG image data, 5 x 10, 1-bit colormap, non-interlaced ./data/brushes/aa_round_03.png: PNG image data, 3 x 3, 1-bit colormap, non-interlaced ./data/brushes/square_24.png: PNG image data, 24 x 24, 1-bit colormap, non-interlaced ./data/brushes/square_36.png: PNG image data, 36 x 36, 1-bit colormap, non-interlaced ./data/brushes/square_12.png: PNG image data, 12 x 12, 1-bit colormap, non-interlaced ./data/brushes/square_06.png: PNG image data, 6 x 6, 1-bit colormap, non-interlaced ./data/images/shapes/square.png: PNG image data, 40 x 30, 1-bit colormap, non-interlaced ./data/images/shapes/rectangle.png: PNG image data, 40 x 30, 1-bit colormap, non-interlaced ./data/images/shapes/rectangle_f.png: PNG image data, 40 x 30, 1-bit colormap, non-interlaced ./data/images/shapes/square_f.png: PNG image data, 40 x 30, 1-bit colormap, non-interlaced -bill! |
From: Pere P. i C. <per...@gm...> - 2022-09-02 23:51:46
|
Hi Bill, thanks for the comments, El dv. 02 de 09 de 2022 a les 01:53 -0700, en/na Bill Kendrick va escriure: > Wow, this was a pleasant surprise! I checked it out > briefly; my main issue has to do with speed, but > I'm not sure the best way to deal with it. > > (In other words, the response of the XOR outline > preview can 'lag' a bit with very large stamps.) Indeed, I've tried caching the 360 degrees XORs and things speed up a lot after the cache has been created, but the first moments before the cache is created XOR still lags. We could also restrict the rotation steps to 5 or 10 degrees each, so things go smoother, and combine restrictions with cache. At the moment I don't have any code ready to show. Another idea is to discard XORs/events so there is no need to draw XORs for old positions when the mouse has moved meters. Do the SDL events have a timestamp so we can check against it? I've tried also to rotate the stamp before the scaling up step in update_stamp_xor() but I did not measure any notizable improvement > > There's also a problem of the rotation being very > easily tilted sideways quickly. Since the mouse > remains at the center of the stamp, you need to > carefully move to the right (zero degrees angle) > before moving the mouse around much. > > With the stamps, since the mouse currently remains > at the center of the shape, if you move slightly... > > * up -- the shape tilts counter clockwise 90 degrees > * down -- the shape titles clockwise 90 degrees > * left -- the shape rotates 180 degrees > > I think the mouse should be warped to the far right > side of the vertical-center of the stamp, like the > "Shapes" tool does. (It will warp to the left of > a shape if you 'drag' the shape out to the left. > That's not an interaction we do with stamps, though.) > > > Also, I just noticed (how long has this happend! 8^o) > that the "flip" control button is not showing any icon. > (The "mirror" one shows me the "sphere + mirror" icon, > as expected.) > > I'll see if I can address both of these. > > > Thanks so much for this Pere! I bet we have a ticket > in SourceForge that we can close, once we're happy > with the feature. If we can get it working well, Just from 2006 ;) https://sourceforge.net/p/tuxpaint/feature-requests/62/ > I'd be fine with making it a default setting, with an > option to deactivate it. I did not make it default because it changes the current workflow and possibly people do not expect the workflow to change. Anyway I am fine with both, default and not default. > > FYI, we'll need to remember to document it everywhere. > > * The feature itself > + README docs > + Features page of website > > * Option to disable > + OPTIONS docs > + manpage > + bash shell tab completion file I saw you did it, thanks :) Pere > > -bill! > > > On Fri, Sep 02, 2022 at 02:24:24AM +0200, Pere Pujal i Carabantes wrote: > > Hi all, > > > > I've just commited some work to add rotation to stamps, > > It is not enabled by default, you must add --stamp-rotation to > > the command line to activate it. > > > > The rotation is just a call to rotozoom, instead the hard work > > has been to deal with the xor interface, and it is still not > > finished, the key combos like CTRL Z and others are messing > > with the xor interface, but the use with a mouse should be correct. > > > > Please test, > > > > Thanks > > Pere > > > > > > _______________________________________________ > > Tuxpaint-devel mailing list > > Tux...@li... > > https://lists.sourceforge.net/lists/listinfo/tuxpaint-devel > |
From: Bill K. <nb...@so...> - 2022-09-05 08:11:08
|
On Sat, Sep 03, 2022 at 01:51:37AM +0200, Pere Pujal i Carabantes wrote: <snip> > > Thanks so much for this Pere! I bet we have a ticket > > in SourceForge that we can close, once we're happy > > with the feature. If we can get it working well, > > Just from 2006 ;) https://sourceforge.net/p/tuxpaint/feature-requests/62/ Time flies. :-Z Closed it! > > I'd be fine with making it a default setting, with an > > option to deactivate it. > > I did not make it default because it changes the current > workflow and possibly people do not expect the workflow to change. > Anyway I am fine with both, default and not default. I've made it the default. > > FYI, we'll need to remember to document it everywhere. > > > > * The feature itself > > + README docs > > + Features page of website > > > > * Option to disable > > + OPTIONS docs > > + manpage > > + bash shell tab completion file > > I saw you did it, thanks :) Actually, I had not! But I just did. I also added the feature's disabling option to Tux Paint Config. -bill! |
From: Pere P. i C. <per...@gm...> - 2022-09-11 10:01:27
|
El ds. 03 de 09 de 2022 a les 01:51 +0200, en/na Pere Pujal i Carabantes va escriure: > Hi Bill, thanks for the comments, > > El dv. 02 de 09 de 2022 a les 01:53 -0700, en/na Bill Kendrick va escriure: > > Wow, this was a pleasant surprise! I checked it out > > briefly; my main issue has to do with speed, but > > I'm not sure the best way to deal with it. > > > > (In other words, the response of the XOR outline > > preview can 'lag' a bit with very large stamps.) > > Indeed, I've tried caching the 360 degrees XORs and things > speed up a lot after the cache has been created, but the first > moments before the cache is created XOR still lags. > We could also restrict the rotation steps to 5 or 10 degrees each, > so things go smoother, and combine restrictions with cache. > > At the moment I don't have any code ready to show. > > Another idea is to discard XORs/events so there is no need to draw > XORs for old positions when the mouse has moved meters. I've finally implemented this approach, toke me some time but seems to work fine, and speeds up a lot the rendering of BIG scaled stamps. Please test Thanks Pere |
From: Bill K. <nb...@so...> - 2022-09-11 21:24:32
|
On Sun, Sep 11, 2022 at 12:01:15PM +0200, Pere Pujal i Carabantes wrote: > > Another idea is to discard XORs/events so there is no need to draw > > XORs for old positions when the mouse has moved meters. > > I've finally implemented this approach, toke me some time but seems to work fine, > and speeds up a lot the rendering of BIG scaled stamps. Yes, it's very nice on my laptop in 800x600 mode, making very large stams (e.g., of the frog, a bird, etc.) It seems to follow along for a few frames, and then 'snap' to catch up, once I stop wiggling the mouse. Specs: Lenovo Thinkpad T480s, Ubuntu 20.04.5 LTS. KDE's System Info shows: ... Kernel Version: 5.4.0-124-generic OS Type: 64-bit Processors: 8 × Intel® Core™ i5-8250U CPU @ 1.60GHz Memory: 23.3 GiB of RAM -bill! |