Commit graph

2277 commits

Author SHA1 Message Date
Bill Kendrick
be7d33fa23 Mend broken star shape fill
Was missing some array elements (but no warnings!?)
h/t Shin-ichi for catching it
2022-01-21 01:38:25 -08:00
Bill Kendrick
251259ab13 PO/POT update after adding shape + aspect ratio tip 2022-01-21 01:33:45 -08:00
Bill Kendrick
16e7cb1f59 Showing aspect ratio of shapes when stretching them
...in the Tux tips area
2022-01-21 01:33:23 -08:00
Bill Kendrick
9f5769855b PO/POT update after adding heptagon 2022-01-21 00:34:33 -08:00
Bill Kendrick
71c2404838 Added heptagon (7-sided) shape
Also, using floats more, allowing for proper heptagon support, as
well as a non-skewed starting angle for octagons (22.5 degrees).
2022-01-21 00:34:10 -08:00
Bill Kendrick
1050e74336 PO/POT refresh after adding hexagon shape tool 2022-01-21 00:02:44 -08:00
Bill Kendrick
e210f5592c Add "hexagon" to shapes tool
How'd we last so long without one!?
2022-01-21 00:01:50 -08:00
Mark Kim
c239e849cb Correct comment 2022-01-20 20:46:18 -05:00
Mark Kim
3b03467d62 On macOS use the CMD key wherever CTRL is used on other OS 2022-01-20 20:44:07 -05:00
Bill Kendrick
e8446d2902 Brush spacing controls work 2022-01-20 00:09:03 -08:00
Bill Kendrick
ccfe3bc074 FIXME about hand cursor over selector controls 2022-01-19 02:12:59 -08:00
Bill Kendrick
29eec0dcb7 Brush spacing ctrl proper position when no scrollbar
(e.g., when running in ~860px tall window with 32px buttonsize)
2022-01-19 02:04:47 -08:00
Bill Kendrick
145c35a95d Get brush selector down-scroll to grok brush spacing 2022-01-19 01:46:44 -08:00
Bill Kendrick
0b18aac985 Decided how brush spacing choice relates to spacing
Max option in the spacing widget will correspond to 2x the maximum
dimension of the brush.
2022-01-19 01:30:08 -08:00
Bill Kendrick
ce9e264713 Initial work to render brush spacing widget
Doesn't do anything yet, and click-detecting code is unaware of it
(so scrollbar click happens in the old location).  WIP! :-)
2022-01-19 00:38:03 -08:00
Bill Kendrick
176749ba9c Grok "[no]brushspacing" commandline/config option
For forthcoming feature
2022-01-19 00:29:05 -08:00
Bill Kendrick
774954f9fc Sync docs & update bash completion re: brushspacing 2022-01-19 00:00:57 -08:00
Bill Kendrick
e1a721fb9d Outline for circle-shaped erasers is now also circular
Closes https://sourceforge.net/p/tuxpaint/bugs/244/
2022-01-18 23:28:53 -08:00
dolphin6k
c67dfbc562 Fixed abnormal exit of threaded font scan which prevented enabling text/label tools on some environment such as Rocky Linux 8. 2021-12-22 22:24:53 +09:00
Bill Kendrick
ac6aee7a43 Update src/po/check_translations.sh to work again
Docs shuffled around & gettext'ing a string in Tux Paint Config.
changed, which caused it to not find things.
2021-12-02 00:28:26 -08:00
Bill Kendrick
200df10456 Albanian translation update
h/t Besnik Bleta
2021-12-01 23:52:12 -08:00
Bill Kendrick
1c61f1b7f8 Doc'ing Slovak l10n update & adding contributor
Welcome Jozef!

(Also bump project-id-version in sk.po)
2021-12-01 22:28:35 -08:00
Jose Riha
de7f0cf857 Update Slovak translation. 2021-11-30 10:30:41 +01:00
Bill Kendrick
2b9bb5e440 Bump CHNAGES date; rebuild all POT/PO 2021-11-25 01:12:48 -08: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
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
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
dolphin6k
c31e0cd504 Updated Japanese translations. 2021-11-09 23:01:19 +09: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
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
5c669730a9 Re-defined iswprint() using GetStringTypeW on windows. 2021-11-05 16:55:23 +09: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
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
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