Commit graph

2130 commits

Author SHA1 Message Date
Mark Kim
5a1eca115f save/open support in ios 2021-03-23 23:50:00 -04:00
Mark Kim
444047fdce fix attempt to free non-freeable memory 2021-03-23 22:29:02 -04:00
Mark Kim
4575f184a5 ios export dir support 2021-03-23 21:15:50 -04:00
Mark Kim
c279e823b1 remove __APPLE__ code not used by __IOS__ 2021-03-22 22:19:51 -04:00
Mark Kim
39cc096ece iOS port initial commit
Known Issues
------------
- No printing support.
- No typing support using the OS virtual keyboard.  iOS needs to be signalled
  to bring up the virtual keyboard when the text tool is active.  We also may
  need to do some finagling to make IM work with the virtual keyboard.
- OS language detection doesn't work yet.
- Quitting doesn't close the app.  It just displays a black screen until it is
  force-closed.
- Need to include cross-compilation instructions.

Possible Issues
---------------
- No text display.  This is likely an issue with how pango and related
  libraries were cross-compiled rather than an issue with Tux Paint code.  From
  the error output it appears to be a font rendering issue.
- SVG integration couldn't be tested because RSVG library has not yet be
  cross-compiled successfully.
- Only tested under the iOS Simulator (and not on an actual iOS device yet.)
2021-03-21 23:01:49 -04:00
Bill Kendrick
92c993f856 Albanian Tux Paint translation update 2021-03-15 22:12:40 -07:00
Bill Kendrick
b7e2aeca34 Remove printf() debugging left in fill.c 2021-03-08 01:39:47 -08:00
Bill Kendrick
f7e9fa2870 Fill antialiasing edges; Not perfect, but improved
Probably can still improve the ratio of
{old pixel's difference to initial color to be replaced}
to {new color being flood-filled}...
2021-03-08 01:36:07 -08:00
Bill Kendrick
866d5190bf Continuing to improve fill anti-aliasing 2021-03-08 01:18:00 -08:00
Bill Kendrick
3b5a0a1586 WIP: Fill tool improvement related to antialiasing
Fill tools do a better job at filling around
antialiased edges, and apply some blending.
(Blending does not yet occur with gradient tools.)
2021-03-07 01:00:53 -08:00
Bill Kendrick
f40dc07f37 Radial gradient fill improvement
Attempting to improve fading out to edges (so the
actual effect is more obvious).
2021-03-05 18:08:19 -08:00
Bill Kendrick
6771f39908 Galician translation update 2021-03-03
h/t Miguel Bouzada
2021-03-03 22:31:00 -08:00
Bill Kendrick
76cb1c5446 Linear gradient fill mode 2021-02-20 21:35:46 -08:00
Bill Kendrick
0dfe96f291 Fill tool docs & ensuring PO translations
And also grabbing txt versions of recent fr_FR updates.
2021-02-20 20:40:58 -08:00
Bill Kendrick
058191bd04 Radial gradient fill tool added
Note: Need to add to docs.
2021-02-20 18:08:06 -08:00
Bill Kendrick
c63b86c8fa Adding sub-tool support to Fill tool
Currently only one sub-tool (Solid) shown, as no code for new
tools has been added yet.  (Plans for linear & radial gradients.)
2021-02-20 16:42:35 -08:00
Bill Kendrick
a8a4001fe9 Squelch some debugging printf() ("most ...") 2021-02-20 15:27:10 -08:00
Bill Kendrick
7cd547e746 "xorpixel()" function added to Magic Tools API 2021-02-20 15:19:40 -08:00
Bill Kendrick
852ec5a0c9 Noting that colorsrows can only be between 1 & 3 2021-02-05 18:05:25 -08:00
Bill Kendrick
85356473e4 Doc'ing new "colorsrows" option
In manpage, and (via 'tuxpaint-docs' update) in OPTIONS docs.
Also, added a bash tab-completion entry for it.
(h/t Pere for enabling the feature.)
2021-02-05 17:56:20 -08:00
Pere Pujal i Carabantes
43d4f8b494 Activating the ability to have more than one colors row.
Usefull for people with coarse input devices that need bigger buttons but got color buttons too narrow.
Just added the option, all the support code where already in place.
2021-02-05 22:14:39 +01:00
Bill Kendrick
19e5e735cc Scale brushes when rendering in buttos
Allows for larger brushes without UI bugs, but more importantly,
smaller buttons (via --buttonsize less than "48") without UI bugs.
2021-01-27 00:13:42 -08:00
Bill Kendrick
73eef80068 Avoid using HUGE font for button labels
They were rendering very large, and shorter strings were
being shrunk down less horizontally, so appearing stretched out
(and touching the edges of the button needlessly).
2021-01-26 23:33:45 -08:00
Bill Kendrick
3ebb76e7bb Mend backward logic in font picking for buttons
Was choosing largest font (and scaling down) for medium-sized
buttons, and medium font for large-sized buttons.
2021-01-26 23:10:05 -08:00
Bill Kendrick
726aa0897e Disallow window+button size cause overlap in Open
Need room for 3 buttons on left and right, with scroll-down
arrow in the middle.  (Helps both Open and Open->Slides dialogs.)
2021-01-26 23:00:27 -08:00
Bill Kendrick
4d9bd3945d Ensure buttonsize + window size sufficiently tall
Need space for 5 buttons' worth of height, for situations such as

 * Stamps
   1. up/down scroll arrows (1 button height, total)
   2. actually show some stamps
   3. left/right paging buttons
   4. flip/mirror toggles
   5. scale 'slider'

 * Label
   1. up/down scroll arrows (1 button height, total)
   2. actually show some fonts
   3. label picker button
   4. bold/italic toggles
   5. shrink/grow font size buttons
2021-01-26 22:47:36 -08:00
Pere Pujal i Carabantes
41e4e80e4b Bottom scroll button, set arrow cursor when scrolling by clicking button. 2021-01-26 23:49:54 +01:00
Bill Kendrick
39b69643bd Avoid leaving XOR outline after Eraser drag 2021-01-24 16:49:00 -08:00
Pere Pujal i Carabantes
046baeb85b Adding scroll to the erasers, mainly copying/adapting code from draw_brushes().
Also adapt the mouse cursor code.
2021-01-24 16:31:37 +01:00
Bill Kendrick
74d5311b5a BASH completion: it's --verbose-version
... not --version-verbose (per OPTIONS docs, and code itself)
2021-01-23 02:05:26 -08:00
Pere Pujal i Carabantes
3326db5f13 Tweaking stamp sizer position. 2021-01-21 00:06:50 +01:00
Bill Kendrick
d103172ee9 Abort if window + button size is a bad combo
Abort if the requested combination of window size and
button size would result in no buttons being visible in the UI.
2021-01-19 00:14:44 -08:00
Bill Kendrick
659b786fe5 Mention --buttonsize in manpage; tab completion 2021-01-18 22:00:05 -08:00
Pere Pujal i Carabantes
5946a0fa71 Better text on scaled buttons. 2021-01-18 23:38:08 +01:00
Bill Kendrick
8529786356 Doc'ing (WIP) larger-UI-buttons in CHANGES.txt
Need fuller description, updating OPTIONS, more testing
and tweaking, etc.
2021-01-18 11:40:05 -08:00
Pere Pujal i Carabantes
2faf78fd21 Merging the resize buttons work. 2021-01-18 14:32:51 +01:00
Mark Kim
7727b995c5 Minimize CPU/energy usage
We received a report of Tux Paint generating too much heat on a MacBook
Pro (15-inch, 2017 running macOS Mojave 10.14.6).  The bug report
included a screenshot of Activity Monitor's Energy Tab showing Tux Paint
having an Enegy Impact of "23.4" and Avg Energy Impact of "3.94".

Although we weren't able to reproduce the same conditions exactly, we
did observe Tux Paint having an Energy Impact level of around ~15 even
when idle on both macOS Yosemite 10.10.5 and Big Sur 11.1.  Energy
Impact leve of ~25 when in use was not uncommon, and spiked to ~55.  The
MacBook Air used for testing (11-inch, Early 2014) did not become hot
"to the touch" as was originally reported, but it did become noticibly
warm.

An investigation found the cause to be in two places:

1. Tux Paint's main loop runs fairly tightly, yielding only a minimum
   time slice to the kernel after each iteration using SDL_Delay(1)
   (1 millisecond).  This has been increasd to 10 millisecond to give
   more slice back to the kernel.  Increasing the 1ms yield to 10ms
   should be only minimally noticible as Tux Paint is primarily a human
   interaction software and human eyes perceive responses < ~100ms as
   immediate, giving us over 90ms to accomplish what we need to after
   each iteration as opposed to the previous 99ms.

2. Enabling SDL's timer subsystem (SDL_INIT_TIMER), even when not used
   actively, has a high impact on the energy impact.  Some testing
   showed the timer subsystem, though supposedly a part of SDL_Delay() and
   SDL_GetTicks(), is not required to be enabled to use those functions.
   It does require to be enabled, however, to use SDL_AddTimer() which
   is only used in Tux Paint when scrolling.  Tux Paint therefore has
   been modified to enable the timer subsystem only when scrolling
   starts and disable it when not scrolling.

The solution to #2 is not an ideal approach but it did provide a quick
solution to the user having the problem.  Issue #2 should get resolved
naturally when we upgrade to SDL2 where the timer subsystem does not
appear to have the energy impact issue.
2021-01-16 21:01:21 -05:00
Pere Pujal i Carabantes
01bfcb5846 Merge branch 'master' of ssh://git.code.sf.net/p/tuxpaint/tuxpaint 2021-01-16 01:21:50 +01:00
Bill Kendrick
c929224ae5 Galician tuxpaint update 2021-01-15
h/t Miguel Bouzada
2021-01-15 09:43:03 -08:00
Bill Kendrick
c97932606f mkdir exportdir's parent, if necessary
Tux Paint's export features will fail if the parent
of the export directory didn't exist.  e.g., using the
default (either via XDG or hard-coded fallback) of
"~/Pictures/TuxPaint/", Tux Paint could not export if
"~/Pictures/" didn't exist yet.  It will now try to
mkdir it as well.  h/t Tim Dickson

Updated OPTIONS documents to explain this.

Also, documenting --exportdir in manpage (was missing!)
2021-01-13 22:48:29 -08:00
Bill Kendrick
514af18700 PO & POT updates after new Magic tools (2020-01-11)
Also, rebuilding tuxpaint.desktop.
2021-01-11 09:04:11 -08:00
Pere Pujal i Carabantes
3fcba585d2 Merge branch 'master' of ssh://git.code.sf.net/p/tuxpaint/tuxpaint 2020-12-30 20:05:17 +01:00
Bill Kendrick
bcc233b542 Bump ver to 0.9.26; Expanded release steps
Expanded the steps for making and posting releases
(docs/RELEASE.txt).

Bumped version to 0.9.26.
2020-12-27 17:45:13 -08:00
Bill Kendrick
1c07b66c9f Bump release date; tidy HTML files 2020-12-27 00:37:23 -08:00
Pere Pujal i Carabantes
b0caacde09 Better handle of text in buttons. 2020-12-16 19:10:08 +01:00
Pere Pujal i Carabantes
bf586cae99 Merge branch 'master' of ssh://git.code.sf.net/p/tuxpaint/tuxpaint 2020-12-13 23:02:31 +01:00
Karl Ove Hufthammer
51aa484a58 Updated Norwegian Bokmål and Norwegian Nynorsk translations 2020-12-12 15:27:34 +01:00
Pere Pujal i Carabantes
f29bf895fa Forgot to scale too the erasers, doing now. 2020-12-12 00:42:13 +01:00
Pere Pujal i Carabantes
934f3aed26 Merge branch 'master' of ssh://git.code.sf.net/p/tuxpaint/tuxpaint 2020-12-11 23:53:37 +01:00
Pere Pujal i Carabantes
49d7628370 Icelandic update by Sveinn. 2020-12-11 19:07:23 +01:00