Commit graph

2703 commits

Author SHA1 Message Date
dolphin6k
c27469aa8b Updated Japanese 2023-02-25 12:29:19 +09:00
Bill Kendrick
3fc76953d6 [WIP] Shaped fill tool
Similar to radial gradient, but follows the shape of the object).
(Based on https://github.com/mattdesl/image-sdf
by Matt DesLauriers (https://www.mattdesl.com/), MIT License)
2023-02-24 02:18:42 -08:00
Bill Kendrick
b2b04b4aab Update POT/PO after 3D Glasses / Color Sep. split 2023-02-22 21:01:53 -08:00
Bill Kendrick
94df556ecd Update POT/PO to grab Color Sep. name & descr. 2023-02-21 23:08:31 -08:00
Bill Kendrick
1277ad5cf6 More tweaks to Stamp rotation step
Locking to 0-degrees when mouse is within a UI-button-sized
square centered around the stamp's center (h/t Pere for the idea).

Change mouse pointer to 'hand' when in the center (so at the start
of the rotation step), and to the 'circle arrow' rotation symbol
when actually rotating.

WIP (disabled for now) Drawing a XOR'd line out of the stamp's
center to the mouse, to show the angle you're rotating at.
(Needs more work to avoid leaving residuals on the screen.)
2023-02-20 23:04:29 -08:00
Bill Kendrick
94eed500f9 Stamp rotation step OFF by default 2023-02-19 01:43:19 -08:00
Bill Kendrick
ee05855d50 Utilize stamp rotation control button! 2023-02-18 21:34:33 -08:00
Bill Kendrick
40e96b06b1 Merge branch 'master' of ssh://git.code.sf.net/p/tuxpaint/tuxpaint 2023-02-18 21:15:17 -08:00
Bill Kendrick
7a4ebb7795 Button for stamp rotation
(WIP)
2023-02-18 21:14:51 -08:00
dolphin6k
23b6dd3102 Updated Japanese 2023-02-19 11:38:46 +09:00
Bill Kendrick
06935cd9b6 Stamp rotation button: Make way 2023-02-18 17:22:22 -08:00
Bill Kendrick
97616a6852 Update POT/PO to grab updated stamp rotation tool tip 2023-02-18 14:25:17 -08:00
Bill Kendrick
95cc093b80 Joystick button can be config'd to activate Fill tool
https://sourceforge.net/p/tuxpaint/feature-requests/199/
2023-02-18 14:17:55 -08:00
Bill Kendrick
a4020ef8c5 Adding "rotate" icon to be used with Stamps tool
(WIP)
2023-02-18 14:08:38 -08:00
Bill Kendrick
1627e5a801 Stamp rotation: Show degrees as Tux tool tip 2023-02-18 14:01:21 -08:00
Bill Kendrick
6fd0517f1e Modifying stamp rotation process: easier 0 degree
Rotation off of zero (0) degrees only occurs when dragging outside
the bounding box (rectangle around the width/height) of the stamp.

No longer warping mouse to the right of the stamp, to cause it to
default to zero degrees.  (The mouse being at the center of the
stamp now causes this, per the above change.)

Motivation - Placing stamps on mobile (touchscreen) was difficult
and non-intuitive.  Now, you can at least double-tap the same
spot on the screen to position, and then place (without rotation)
the stamp.  It's still not perfect, and I think a UI option to
enable/disable stamp rotation (leaving it off by default) is needed.
2023-02-18 12:14:16 -08:00
Bill Kendrick
ed6e3da74f Change most printfs to DEBUG_PRINTF()
Avoids need to wrap tons of things in #ifdef DEBUG ... #endif
2023-02-16 01:08:41 -08:00
Bill Kendrick
eaeebdc7a6 Starter scale option support; set some options 2023-02-16 00:29:51 -08:00
Bill Kendrick
7e99b05510 Clean up more "unused variable" warnings 2023-02-12 13:25:59 -08:00
Bill Kendrick
17eb62e554 Template/Starter options: Ability to specify gravity
e.g. if the aspect ratio of the template/starter is wider than
that of the canvas, and "autoscale=vertical" (or "=both")
is specified, before it would chop the top and bottom of the
image off, displaying the vertical center of it on the canvas.
Now you can ask it to gravitate towards the top or bottom, if they
have content that's of higher significance than the opposite side.

h/t Pere & Albert for the suggestion.

TODO - Document, set some suitable defaults for images we ship.
2023-02-12 10:39:58 -08:00
Bill Kendrick
03c57cc721 More WIP starter/template scaling
Need to actually scale, if we have no background.
2023-02-10 02:08:14 -08:00
Bill Kendrick
9b93805ef6 [WIP] Starter/Template scale/smear/bkgd color options
Now possible to set scaling and smearing options for
each starter or template image.  A ".dat" file can be
created which describes whether it's okay to scale and crop
the image's top/bottom and/or left/right, and if not both,
whether to smear the sides of the starter/template to the
edges of the canvas (the prior behavior, and the default),
or use a specific solid color background.

Once finished, will close
https://sourceforge.net/p/tuxpaint/feature-requests/190/

Still to do:
 + Document
 + Remove debugging printf()s (change to DEBUG_PRINTF()?)
 + Add files for starters & templates that ship with Tux Paint
 + Test!
2023-02-10 01:58:49 -08:00
dolphin6k
254fe65b20 Updated Japanese for new magic tools 2023-02-04 12:24:40 +09:00
Pere Pujal i Carabantes
851ff2c884 Updating Catalan. 2023-01-30 13:41:19 +01:00
Bill Kendrick
034cbf5b5a Refresh POT/PO for Circles, Rays, Fur magic tools 2023-01-29 21:55:29 -08:00
dolphin6k
0f27735ce7 Updated Japanese translations 2023-01-28 14:48:45 +09:00
Bill Kendrick
34de8311db Zoom/Perspective: Support background color changes
When in the middle of adjusting a drawing with Zoom or Perspective,
you could change the color.  However, the background would not
relfect this until you further adjusted the zoom/perspective.

Now, a color change causes the background to update immediately.

This involved updating the Tux Paint Magic API to send more
arguments to each Magic tool's "XYZ_set_color()" function,
which means a bump in the API version.

(Forthcoming, all other Magic tools will have their set_color()
functions updated.)
2023-01-25 02:12:57 -08:00
Bill Kendrick
bf7e8897d6 Remove unfinished "Label" text on New or Open
Text from unfinished "Label" tool input would appear after
creating a New image or Opening an existing one.  Mended.
Closes https://sourceforge.net/p/tuxpaint/bugs/246/

Mostly by Pere.
2023-01-23 22:04:00 -08:00
Pere Pujal i Carabantes
32dc277133 Updating Catalan 2023-01-21 23:44:31 +01:00
Bill Kendrick
3ba15f7b70 Update POT/PO after adding Maze magic tool strings 2023-01-21 03:06:00 -08:00
Bill Kendrick
51c270b519 Avoid window larger than sole display size is capable of
If only one display is available, when running in windowed mode
and asking for Tux Paint to appear in a width and/or height larger
than the display's dimensions, Tux Paint will fall back to
the maximum(s) the display is capable of.

e.g., on my laptop with 1920x1080, running "tuxpaint --2048x2048"
will fall back to 1920x1080 (and display a warning to stdout).
However, if I have my external monitor (also 1920x1080) attached,
it will happily open a 2048x2048 window.  Not perfect, but an
improvement.

Closes https://sourceforge.net/p/tuxpaint/feature-requests/113/
2023-01-19 00:56:07 -08:00
Bill Kendrick
949438e2fb Bring back support for SDL_VIDEO_WINDOW_POS envvar
SDL1.2 supported "SDL_VIDEO_WINDOW_POS" environment variable,
but SDL2 does not; so reimplemented it ourselves. (See ENVARS docs.)
2023-01-19 00:18:52 -08:00
Bill Kendrick
bdbc8898ac POT/PO update after adding Rivulet magic 2023-01-16 17:28:51 -08:00
Bill Kendrick
b373ac8808 WIP - Crop whitespace from label text for better fit
For example, when using a font like OpenDyslexia which has a very
large line spacing, the text gets shrunk since the overall bitmap
is too big for the space on the buttons (compared to the contents).

Cropping the whitespace will allow the text to remain larger.

WIP - The method of cropping isn't great.  Text with descenders
appear higher than text without, causing terrible alignment.
So for now, the new `crop_surface()` code is not being used.

Also, replace some "#ifdef DEBUG printf(...) #endif" with
a simple "DEBUG_PRINTF(...)".  And other minor tweaks.
2023-01-11 01:56:11 -08:00
Bill Kendrick
65852f2534 Corrected 'keep aspect ration' option in zoom()
Scaling of button labels often caused them to stretch wider
than they should have.  (e.g., "tuxpaint --1024x768 --buttonsize=78")
2023-01-11 00:46:31 -08:00
Bill Kendrick
8df7650f82 Credit Bulgarian translation update 2023-01-07 01:22:29 -08:00
Vankata453
e37943abfe Update Bulgarian translation 2023-01-06 18:54:58 +02:00
Bill Kendrick
d132f96075 Changing default UI font to DejaVu Sans
Per discussion over in
https://sourceforge.net/p/tuxpaint/mailman/tuxpaint-devel/thread/CADZCvhDRn174fTc0e3K6Qxa8pHjXCvwmUr9p3frdzh7YksiS7A@mail.gmail.com/
2023-01-06 00:59:56 -08:00
dolphin6k
bea8ba8111 Updated Japanese translations 2023-01-04 18:41:34 +09:00
Bill Kendrick
35dbd40bf6 Disallow Ctrl-Z in certain situations
Closes https://sourceforge.net/p/tuxpaint/bugs/239/
2023-01-03 22:30:45 -08:00
Bill Kendrick
ff10b021b7 Googly Eyes: Forgot to gettext() the sizes
h/t Pere
2023-01-02 12:00:44 -08:00
Pere Pujal i Carabantes
eeb5eee443 Updating Catalan. 2022-12-29 23:29:10 +01:00
dolphin6k
7d8125a866 Updated Japanese translations 2022-12-29 15:08:05 +09:00
Bill Kendrick
7a1c90031c Disabling anniversary confetti animation on title screen 2022-12-28 21:03:39 -08:00
Bill Kendrick
9674a05e63 Continued WIP: Googly Eyes
Needs sound effect, an icon, and boundary-limiting to keep the
pupil inside the background.
2022-12-24 11:47:35 -08:00
Bill Kendrick
b4f63f17ff POT/PO rebuild & RELEASE change re: appdata file
(org.tuxpaint.Tuxpaint.appdata.xml.in)
2022-12-24 11:16:30 -08:00
Bill Kendrick
c13c6e1dcb Fill: Paint & Radial; bounds check for touched[]
Avoid reading outside of the bounds of the `touched[]` array,
to help prevent crashes.

h/t Miyagi Andel for reporting,
Shin-ichi TOYAMA for pinpointing the issue,
and Pere Pujal i Carabantes for providing a solution

Closes https://sourceforge.net/p/tuxpaint/bugs/269
2022-12-23 00:08:52 -08:00
dolphin6k
2c6c50205c Added 'yen' to the spare string for font scoring.
Also made unneccessary translations blank for unused scoring strings.
2022-12-22 23:07:48 +09:00
Bill Kendrick
4534fe56de De-translated "<N>spare-Nx" strings when used literally (pt 2)
Missed `gd.po`
2022-12-21 01:58:41 -08:00
Bill Kendrick
0257d37b27 De-translated "<N>spare-Nx" strings when used literally
These strings have been around a long time, and are only now
being utilized.  Their purpose is for translators to provide
some characters which their language uses, so Tux Paint can
score fonts (and raise them to the top of the list in the
Text and Label tools) higher when they support those characters.

Many translators either left the strings as-is (e.g., "<9>spare-9b"),
or translated them literally (e.g., "<9>yedek-9b" & "<1>додаткова-1a"),
so removed those (replacing with `msgstr ""`).
2022-12-21 01:48:08 -08:00