[Tuxpaint-devel] Some recent improvements
An award-winning drawing program for children of all ages
Brought to you by:
wkendrick
|
From: Bill K. <nb...@so...> - 2022-01-26 10:04:01
|
Yesterday I updated the onscreen keyboard code to not simply support two button sizes -- full-sized (e.g., 48x48 default) or half-sized (so 24x24, if default). Right now it still uses the full-sized buttons as the max-size, but if that'd be too large to fit (max 90% width of canvas x max 50% height of canvas), it will now scale them to fit better into that area. (Buttons will aim for square, though, to avoid strange aspect ratios.) Here are before/after screenshots you can see over on Twitter: https://twitter.com/TuxPaintTweets/status/1485897507901083654 Today, I updated the code that renders a stamp whenever you click to apply it to the canvas. First off, rather than tint, and then scale, it will now scale and then tint. (Imagine a full-size high res. SVG, which is then being scaled down to a fraction of its size... let's spend less time doing expensive tinting by doing it on the small version.) And more importantly, I now _cache_ the stamp in its current scale/size and color. This means you can take a large complicated stamp, that would be going through the "tint, then scale, then copy to canvas" process _every time you clicked_, and now it only needs to do "tint & scale" once, and you can copy it to the canvas many times without wasting as many CPU cycles. Also today, I added a new keyboard shortcut for quickly accessing the "color selector" feature that Pere added a few years back -- the one which allows you to pick a color directly from the canvas. This feature is normally access via the second-to-last color palette entry, which has a "pipette" icon. Accessing the feature via the button brings up a small prompt that covers the color palette, and has a "Back" button to abort, and return to what you were doing. Move the mouse over the canvas and click-and-release to select a color. When using it the shortcut way, hold [Control] on the keyboard while clicking within the canvas. The color prompt appears at the bottom (but without the "Back" button). Hold onto the mouse, if you need to move around to pick a specific pixel's color. When you release, the color will be chosen. (If you release _outside_ the canvas, it will abort, and your previous color choice will remain.) Here's a short video comparing the standard & keyboard shortcut methods on Twitter: https://twitter.com/TuxPaintTweets/status/1486266865785606144/ As usual, I appreciate it when you test things out and catch any bugs I may have introduced! For those who want to see the code changes, they're easily accessed over at SourceForge: https://sourceforge.net/p/tuxpaint/activity/ Thanks in advance, and enjoy! -- -bill! Sent from my computer |