Commit graph

3647 commits

Author SHA1 Message Date
Bill Kendrick
2b9bb5e440 Bump CHNAGES date; rebuild all POT/PO 2021-11-25 01:12:48 -08:00
Bill Kendrick
69315c9a73 Bump date in macos/Info.plist 2021-11-25 01:08:39 -08:00
Bill Kendrick
46447ea25b Merge branch 'master' of ssh://git.code.sf.net/p/tuxpaint/tuxpaint 2021-11-25 01:05:56 -08:00
Bill Kendrick
2468b3bfa0 Bump doc dates 2021-11-25 01:05:46 -08:00
dolphin6k
b03529397a Include system-wide config file to the installer. 2021-11-23 23:02:16 +09:00
Bill Kendrick
81fff34795 Limit check to avoid crash in flood Fill
Reported by Shin-ichi, repaired by Pere.  Thanks!
2021-11-20 20:57:55 -08:00
Bill Kendrick
e77c7766cd Fill queue is now actually a stack
Size of queue structure (which contains 3 ints, so is 12 bytes on
my Linux laptop) before & after, when filling a few sample images
when running in a 3000x2000 window:

 * a pattern i drew
   queue:   855,040
   stack:   287,744

 * mosaic
   queue:   908,288
   stack:   398,336

 * mosaic 4x via panel magic tool
   queue: 1,451,008
   stack:   734,208
2021-11-20 01:52:43 -08:00
Bill Kendrick
0431cce21f Fill debug updates
Show final queue structure size at the end.
Watching the fill blit happen is now a separate #define'd option.
2021-11-20 01:47:13 -08:00
Bill Kendrick
5cfc185d77 Globalized a ton of stuff, able to queue-ify flood fill
The queue grows ever large, and should shrink itself once
as the queue gets consumed.  In the meantime, it seems to help.

At 3000x2000, with starters/mosaic.svg cut into four via Panels
magic tool, I get a VERY complicated drawing, which no longer
causes a crash.

(It crashed for me, even after some other improvements -- globalizing
many of the unchanging args to the recursive function, calling the
progress bar animation and sound effects calls less frequently --
helped prevent crashing for me with that starter image as-is.)
2021-11-20 01:17:17 -08:00
Bill Kendrick
e06ead84c5 WIP More work on queue-based flood Fill 2021-11-20 00:14:18 -08:00
Bill Kendrick
8a9ab25151 Updated Icelandic translation
h/t Sveinn
2021-11-19 14:06:28 -08:00
Mark Kim
dffd026955 Update macOS version 2021-11-19 08:18:13 -05:00
Bill Kendrick
0b9abc9005 Forgot to mention Reflection Magic in CHANGES.txt 2021-11-19 00:50:58 -08:00
Bill Kendrick
07165fc3ae WIP More work towards span filling
Antialiased edge stuff will be hard to port over :(
2021-11-17 00:55:30 -08:00
Bill Kendrick
2f912bd5d7 WIP Prepare to retrofit fill routine w/ span fill
Add a queue and queue helper functions (disabled via #ifdef
at the moment).
2021-11-17 00:30:35 -08:00
Bill Kendrick
fcf1f66a03 Revert Fill stack explosion prevention
Not the way to do it.
2021-11-16 23:49:52 -08:00
Bill Kendrick
af8fd5b8a1 Attempts to improve rotated brushes
* Rotating brush angle is now a double, not an int
 * Don't draw once on click; require some motion
   (does not affect directional brushes, which include
   a "no movement" shape in the middle of the brush bitmap)
2021-11-16 00:13:44 -08:00
Bill Kendrick
6a52e33d35 Improve canvas update w/ rotating brushes 2021-11-15 23:57:12 -08:00
Bill Kendrick
57cea83655 Added rotating dash brush 2021-11-15 23:53:15 -08:00
Bill Kendrick
1ff75a5c0c Stop recursive flood fill at depth of 20K
Attempt to void crashing (by blowing up the stack) when doing
a flood-fill of a complicated shape on a large canvas
(e.g., `tuxpaint --3000x2000` with `starters/mosaic.svg`).
2021-11-15 20:40:26 -08:00
Bill Kendrick
b029ceeae7 Portuguese update
from Hugo Carvalho
2021-11-13 13:20:33 -08:00
Bill Kendrick
b9d3711584 Regen. README (+Twitter, -IRC, further reading groups) 2021-11-12 15:29:05 -08:00
dolphin6k
c31e0cd504 Updated Japanese translations. 2021-11-09 23:01:19 +09:00
Bill Kendrick
03b3ada567 More tools' fullscreen: update progress bar
Progress animation shown during
Emboss, Sharpen/Edge/Silhouette, Blur,

Also, play Glass Tile sound in fullscreen mode.
2021-11-08 20:46:24 -08:00
Bill Kendrick
83558f8343 Cartoon fullscreen: play sound, show progress bar 2021-11-08 20:37:19 -08:00
Bill Kendrick
cde0941509 Blocks/Chalk fullscreen; play sound, add prog bar 2021-11-08 20:33:57 -08:00
Pere Pujal i Carabantes
f32d8b4ab8 Updating Catalan angle translations to a neutral singular/plural. 2021-11-08 23:23:52 +01:00
Bill Kendrick
f65fe54a2c Going back to squelching notices re: unusable fonts
Only doing so if DEBUG set.
2021-11-08 13:21:01 -08:00
Bill Kendrick
70795bffcd Translate new angle-showing tips (Lines, Shapes)
h/t Pere for noticing they weren't appearing
2021-11-08 13:18:38 -08:00
Pere Pujal i Carabantes
b187ca9bb1 Updating Catalan. 2021-11-08 21:12:25 +01:00
Bill Kendrick
58274ed01f Refresh PO/POT after Lightning desc. typo fix 2021-11-07 20:33:03 -08:00
Bill Kendrick
50d296b393 Mend typo in Lightning magic tool's description 2021-11-07 20:32:20 -08:00
Bill Kendrick
e3c7b3b5e7 Halftone was coming out too dark
Not sure what I broke, but attempting to fix it.
2021-11-07 19:51:08 -08:00
dolphin6k
fbf206d17c Makefile: Defined platform specific install target like as other platforms.
tuxpaint.spec: Specified install target except for install-xdg.
2021-11-07 17:10:52 +09:00
dolphin6k
46dd77fdb5 Reverted to mtw(). (MultiByteToWideChar() was not safe for the labels on other versions of Windows.) 2021-11-06 01:00:18 +09:00
dolphin6k
1efedfa191 Windows Recycle Bin support seems to be stable. / Replaced mtw() with MultiByteToWideChar(). 2021-11-06 00:29:10 +09:00
dolphin6k
c217f62470 Added clean target 2021-11-05 20:09:16 +09:00
Bill Kendrick
16cc3e05b5 Merge branch 'master' of ssh://git.code.sf.net/p/tuxpaint/tuxpaint 2021-11-05 01:42:35 -07:00
Bill Kendrick
760423e84f New Magic tool: Reflection
Click to make a reflection of what's above the cursor,
below the cursor.

Click and drag down to stretch the lower reflection, or
drag up to make an reflection of the bottom of the picture
above where you clicked.

Or, drag left or right to make a reflection on the left of
what's on the right, or vice-versa.

It's not perfect, but my math skills are failing me, and it's
probably suitable.

Demo videos posted to Twitter
 * https://twitter.com/TuxPaintTweets/status/1456541738667954181
 * https://twitter.com/TuxPaintTweets/status/1456542229376294924

Closes https://sourceforge.net/p/tuxpaint/feature-requests/202/
2021-11-05 01:31:53 -07:00
dolphin6k
5c669730a9 Re-defined iswprint() using GetStringTypeW on windows. 2021-11-05 16:55:23 +09:00
Bill Kendrick
1486aa8145 Removed bad or 'see [english version]' old docs 2021-11-04 22:21:25 -07:00
Bill Kendrick
0a529cea96 Avoid crashing on config file lines lacking =
Instead, emit a warning to stdout (though really we may want to
exit cleanly, like parse.gperf does when coming across an
unrecognized option).
2021-11-04 21:30:07 -07:00
dolphin6k
bad22db0ce Removed man, importscript and bash-completion from install target for windows. 2021-11-05 13:06:15 +09:00
Bill Kendrick
307680a684 Mend unused attribute warning
Noted in a commit by Shin-ichi
2021-11-04 20:41:25 -07:00
dolphin6k
7c8f6bca80 Addressed warnings when compiling on MinGW/MSYS
Following warnings still remain so far.

src/tuxpaint.c:199:2: warning: #warning "Attempting to define strcasestr(); if errors, build with -DHAVE_STRCASESTR" [-Wcpp]
  199 | #warning "Attempting to define strcasestr(); if errors, build with -DHAVE_STRCASESTR"
      |  ^~~~~~~

src/parse.gperf: In function 'parse_one_option':
src/parse.gperf:306:45: warning: argument to 'sizeof' in 'memcpy' call is the same pointer type 'char *' as the destination; expected 'char' or an explicit length [-Wsizeof-pointer-memaccess]
  306 |   memcpy(offset+(char*)tmpcfg, &opt, sizeof(char*)); /* FIXME: This causes a warning; should it be 'sizeof(char)', or do we need to have the warning suppressed? -bjk 2021.10.14 */
      |                                             ^~~~

src/dirwalk.c: In function 'tp_ftw':
src/dirwalk.c:348:2: warning: #warning Failed to see DT_UNKNOWN [-Wcpp]
  348 | #warning Failed to see DT_UNKNOWN
      |  ^~~~~~~

src/get_fname.c: In function 'get_fname':
src/get_fname.c💯3: warning: 'dir' may be used uninitialized in this function [-Wmaybe-uninitialized]
  100 |   snprintf(f, sizeof(f),
      |   ^~~~~~~~~~~~~~~~~~~~~~
  101 |            "%s%c%s",
      |            ~~~~~~~~~
  102 |     dir, (*name) ? '/' : '\0', /* Some mkdir()'s don't like trailing slashes */
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  103 |     name);
      |     ~~~~~

magic/src/cartoon.c:178:99: warning: unused parameter 'last' [-Wunused-parameter]
  178 | static void do_cartoon(void *ptr, int which ATTRIBUTE_UNUSED, SDL_Surface * canvas, SDL_Surface * last, int x, int y)
      |                                                                                     ~~~~~~~~~~~~~~^~~~
2021-11-05 12:23:09 +09:00
Bill Kendrick
ee83ee090e Tweaks to new Frog starter 2021-11-04 19:09:31 -07:00
Bill Kendrick
3a59e67a0c Adding a "Frog" starter I got years ago
...but never noticed, because I thought it was a gallery
submission!
2021-11-04 19:05:48 -07:00
Bill Kendrick
19db5e1b4a Avoid compile-time warnings re: wchar_t comparison
When assembling UTF-8 in render_text_w() (to send to SDL_Pango),
we assumed `wchar_t` could encompass the entirety of Unicode
(up to U+10FFFF); however, on Windows `wchar_t` is only 16-bits,
meaning the test for characters <= U+FFFF was always true.

This reworks the if/elseif/else block, via some "#ifndef WIN32"
tests, to avoid this warning.

In the end, we need to replace our internal use of `wchar_t`
with something 32-bit, to allow for higher Unicode code points
(e.g., to support Emoji via the Text and Label tools).

Additonally, some work will need to be done to ensure that
text stored as Labels within saved Tux Paint images (PNGs) continued
to work correctly, and could be traded between platforms.
(Untested, but right now I assume a picture drawn on Linux where
`wchar_t` is 32-bit would break if you attempt to load it on Windows,
and possibly vice-versa?)

See https://sourceforge.net/p/tuxpaint/feature-requests/210/
2021-11-03 22:16:24 -07:00
Bill Kendrick
f46df76736 Clean up comment formatting re: UTF-8 stuff 2021-11-03 21:28:03 -07:00
Bill Kendrick
0eb9409ea5 Doc refresh after Japanese & INSTALL updates
...from Shin-ichi
2021-11-03 20:54:49 -07:00