Since `parse.gperf` was added long ago, the ability to run Tux Paint
with "--fullscreen" command-line, or simply "fullscreen" in the
config. file, no longer exists.
It must be `--fullscreen=yes` (or `--fullscreen=native` as an
alternative to `--fullscreen=yes --native`). It can also accept
`--fullscreen=no` as an alternative to `--windowed`.
Updating the following places
* BASH tab completion
* `tuxpaint --help` output
* FAQ
h/t Karl for reporting
Closes https://sourceforge.net/p/tuxpaint/bugs/289/
`button_label_y_nudge`, used in `tuxpaint.c` to nudge button
label text down, was only ever used with Khmer language and is no
longer necessary (the text was actually appearing _too_ low now).
Removing that, as well the `lang_y_nudge[]` look-up table, and
use of the values (`setup_i18n()` and `set_current_language()`)
inside `i18n.c`.
Word-wrap when text is [still] >= 1.3 * button width
(rather than 1.5). h/t Karl (who suggested 1.4)
Draw button label text slightly lower (to avoid touching button
icons as often).
Use #defines for the magic multiplier numbers used here.
If the UTF-8 sequence for the Unicode Soft Hyphen ("Non-printable U+00AD")
occurs in the text to be used as the label of a button, and the label
is still too wide after any wrapping done based on either space and/or a
visible hyphen ("-", U+002D), a visible hyphen will be introduced and
the label will be wrapped.
e.g. Norwegian Nynorsk "Regnbogesyklus"
Regnboge-
syklus
(rather than all crammed on one line and impossible to read)
h/t Karl for the idea.
Closes https://sourceforge.net/p/tuxpaint/bugs/288/
e.g. Norwegian Nynorsk "ROGGBIF-regnboge" will appear as
ROGGBIF-
regnboge
rather than all crammed on one line and impossible to read.
h/t Karl for the idea. (Next up: support soft-hyphens)
For https://sourceforge.net/p/tuxpaint/bugs/288/
New API function which rolls back the Undo buffer (which is snapshotted
upon a mousedown event ahead of calling the Magic tool's `_click()`
function.) Dangerous; use sparingly!
Filled Polygon uses this to prevent partially-created (aka unfinished
aka incomplete) polygons -- the preview lines and control points -- from
being recorded and wasting space in the Undo history, or reappearing
upon Redo.
TODO - Other tools (e.g., Clone) would certainly benefit from this.
TODO - Needs more testing to help identify any bugs/issues introduced
by this!
TODO - Magic API docs need updating.
This is probably a sufficient solution that will make
https://sourceforge.net/p/tuxpaint/feature-requests/246/,
'"Overlay" surface in Magic API', unnecessary.
Rotating brushes would not draw anything if you simply
click and release with no motion in between (unless brush
spacing was set to the minimum). It will now draw the
default "up" direction of the brush in that situation.
(h/t Pere for reporting)
Implemented by using a boolean that tracks whether there has
been any motion since a click; if not, the `brush_counter` is
forced to reset (to 999), to insist on `brush_draw()` blitting
something. (It used to always ignore if a rotational brush,
to avoid accidentally drawing in the wrong direction on release.)
Added round erasers that only expose 25% of the background each
time you click and apply the eraser.
Reworked how erasers are handled in the code to make it easier
to add this.
Reworked how eraser icons are drawn in the selector on the right.
(Squares and non-fuzzy, non-transparent circles are solid;
fuzzy circles are solid in the center with a dithered edge;
transparent circles are entirely dithered.)
TODO
* Document the new eraser type
* Remove a visual artfact (XOR outline) when using Ctrl-Z to Undo
* Eraser icons turn from black to white when temporarily switching
to certain other tools (e.g., after prompts like Quit or Print,
or after using Save)
* In function ‘get_starter_template_options’:
"warning: dereferencing type-punned pointer will break strict-aliasing
rules [-Wstrict-aliasing]":
(short unsigned int *)&(opts->bkgd_color[0]), [...etc.]
* In function ‘strncpy’,
inlined from ‘safe_strncpy’ at src/tuxpaint.c:32022:9,
inlined from ‘trash’ at src/tuxpaint.c:30690:3:
"warning: ‘__builtin_strncpy’ output may be truncated copying
255 bytes from a string of length 255 [-Wstringop-truncation]":
return __builtin___strncpy_chk (__dest, __src, __len,
Novice=0, Advanced=2, so we can test "complexity >= SOME_LEVEL"
if a tool works in both Beginner and Advanced modes (vs. "<=" which
seemed backwards).
Add some print-able string names for the complexity levels.
When a Magic plugin fails to init (e.g., now the Clone tool does,
in "novice" mode), show the message as "Notice", not "Error",
and helpfully remind us of the complexity level.
Provide a "_DEFAULT" #define that tuxpaint.c can use, rather than
hard-coding "_ADVANCED", in case things change in the future.
h/t Shin-ichi for reporting seeing warnings about
warning: the comparison will always evaluate as 'true' for the address of 'sizes' will never be NULL
Magic tool ".sizes" was recently turned into an array (per-mode of the
Magic tool), but a few references forgot to account for that.
Corrected like so
e.g., from
if (magics[magic_group][cur_thing].sizes)
to
if (magics[magic_group][cur_thing].sizes[magic_modeint(magics[magic_group][cur_thing].mode)])
If RSVG is < 2.52.x, go back to using rsvg_handle_get_dimensions()
(which is deprecated these days) instead of the newer
rsvg_handle_get_intrinsic_size_in_pixels() that replaced it.
(Shin-ichi reports that function is not available on Rocky Linux 9.)
Note - I also recently replaced rsvg_handle_render_cairo() with
rsvg_handle_render_document(), but Shin-ichi didn't report problems
with that; it's been available since 2.46.
See https://sourceforge.net/p/tuxpaint/bugs/278/
When selecting a label that has a color not found in the built-ins,
we change to the color picker; however, when rendering its button,
it looked wrong and would not fit to the right size (had 48x48
hard-coder in there, still!) Instead, using `render_color_button()`
to just re-render it.
Also, dropping LOW_QUALITY_COLOR_SELECTOR which had been used by
some embedded platforms we don't seem to support any more (Nokia Maemo
and OLPC XO-1).