Commit graph

3608 commits

Author SHA1 Message Date
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
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
dolphin6k
6145fb8bc2 Addressed some compile time warnings. 2021-11-03 22:04:24 +09:00
dolphin6k
0cb079acb0 win32_trash.c: converted newline from <CR><LF> to <LF> 2021-11-03 20:51:25 +09:00
dolphin6k
2a6b55e3c2 "Move to recycle bin" for Windows is now ready for the tests. 2021-10-31 17:18:16 +09:00
dolphin6k
f9efb48450 win32_trash() to work correctly on various version of windows.
Careful tests are still required.
2021-10-31 15:49:55 +09:00
dolphin6k
b667aa7d79 win32_trash() is still quite unstable. 2021-10-31 02:34:24 +09:00
dolphin6k
e9f31ac4ce Updated Japanese translations. 2021-10-30 18:51:54 +09:00
Bill Kendrick
5ffbd4082c Docs: Mentioning Windows trash/recycle bin support 2021-10-29 16:27:01 -07:00
Bill Kendrick
022e7cd4eb Remove FIXME re: Windows trash support
...since Shin-ichi is adding it :)
2021-10-29 16:25:09 -07:00
dolphin6k
8d23668589 UNLINK_ONLY macro to work correctly for windows. 2021-10-30 07:34:30 +09:00
dolphin6k
87ed5bc991 tweak for win32_trash() 2021-10-29 23:37:19 +09:00
Bill Kendrick
adc181e3ec More debugging in dirwalk & fonts 2021-10-28 22:52:06 -07:00
Bill Kendrick
0701eeae74 Portuguese translation update
From Hugo Carvalho
2021-10-28 10:01:02 -07:00
Bill Kendrick
32d3ac4ce2 Icelandic translation update
From Sveinn í Felli
2021-10-28 09:38:37 -07:00
Bill Kendrick
14f9605cca Merge branch 'master' of ssh://git.code.sf.net/p/tuxpaint/tuxpaint 2021-10-28 09:37:41 -07:00
Bill Kendrick
311452acbd Doc'ing Windows Recycle Bin (Trash) support
...committed by Shin-ichi.

Also, re-arrange and re-group some CHANGES.txt changelog items.
2021-10-28 09:36:15 -07:00
dolphin6k
61ce0798d9 Initial implimentation of win32_trash() 2021-10-28 22:47:32 +09:00
Bill Kendrick
75d209e3f1 PO/POT update, adding Cartoon full-image mode desc 2021-10-27 22:57:30 -07:00
Bill Kendrick
2e231b5adc switchout/switchin when changing Magic groups
Also, doc'ing Cartoon full-image mode
2021-10-27 22:56:29 -07:00
Bill Kendrick
a68ff27e84 Cartoon can apply effect to entire image
This is now how the effect starts; painting now simply exposes
the effect (to avoid artifacts that occurred when you'd paint
different directions).
2021-10-27 22:52:02 -07:00
Bill Kendrick
27b89d0dba Blocks/Chalk: Full-image descriptive text 2021-10-27 22:24:13 -07:00
Bill Kendrick
3fad8fc75b Blocks & Chalk can now affect entire image at once 2021-10-27 22:18:09 -07:00
Bill Kendrick
832d812c4a Syncing docs after adding angle measurement info 2021-10-27 21:57:19 -07:00
Bill Kendrick
05f7f4bec4 Icelandic translation updates
From Sveinn í Felli
2021-10-26 23:41:18 -07:00
Bill Kendrick
d9596af63f Pausing SDL_ttf -> SDL_pango project for now 2021-10-26 23:25:21 -07:00
Bill Kendrick
59920d3ce9 More debug output when TuxPaint_Font_OpenFont ends
Also, avoid unused var. declaration when FORKED_FONTS is disabled.
2021-10-26 23:08:47 -07:00
Bill Kendrick
10fbd32977 dirwalk: Enable stderr output re: unloadbale fonts 2021-10-26 23:07:48 -07:00
Bill Kendrick
173b813a04 Hacking on TuxPaint_Font_OpenFont
More DEBUG output.  Looking into having SDL_ttf open a font,
get its name, and then see whether SDL_Pango can load it.
(If not, fall back to SDL_ttf.)

That code is not working, and "#if 0"'d out, for the moment.
2021-10-26 22:49:46 -07:00
Bill Kendrick
8d9ddebcd1 Always echo to stderr if cannot TTF_OpenFont a TTF 2021-10-26 22:17:28 -07:00
Bill Kendrick
b0e5051d14 Portuguese translation update
From Hugo Carvalho
2021-10-26 10:33:13 -07:00
Bill Kendrick
9935255e64 Doc'ing _nl_locale_name() & mysetenv() changes 2021-10-26 09:56:19 -07:00
dolphin6k
4e7346c8d9 Fixed crash bug regarding locale detection on 64bit windows build. 2021-10-26 23:16:04 +09:00
Bill Kendrick
af1bd0850e Lines/Shapes: Display angles in Tux tip text
When drawing lines or rotating a shape, the angle of rotation
is shown (in the instructions at the bottom).
2021-10-25 23:23:28 -07:00
Bill Kendrick
1bee12246e Protect mysetenv() fron any NULL string pointers
...such as those we seem to be receiving from _nl_locale_name()
on 64-bit Windows under newer MinGW/MSYS (see big thread on
tuxpaint-devel with reports from Shin-ichi).
2021-10-25 22:11:32 -07:00
Pere Pujal i Carabantes
9c010ffd40 Updating Catalan translation. 2021-10-24 12:37:34 +02:00
Pere Pujal i Carabantes
5500b45ec8 Exposing Stretch strings to translations. 2021-10-24 12:32:37 +02:00
Bill Kendrick
b8317f74e0 extern char*[] from sounds.h to new sounds.c
Move the list of Tux Paint's internal sound effect filenames
from "sounds.h" to a new "sounds.c" (that compiles to "sounds.o").
2021-10-24 01:20:07 -07:00
Bill Kendrick
5f9ff7e97d Address tons of warnings in magic/src/lightning.c 2021-10-24 01:15:46 -07:00
Bill Kendrick
d27c21bf2a Mend compiler warnings in magic/src/halftone.c 2021-10-24 01:07:29 -07:00
Bill Kendrick
94943d9fdd Mend a NEW warning in src/fill.c 2021-10-24 01:04:47 -07:00