Arcs were appealing, but they have a fatal flaw: we can't
split our arcs without changing the ellipse they trace.
That could be fixed by adding an extra parameter, but then
it is no longer any better than conics.
So switch back to conics, which have the advantage that they
are used elsewhere.
Add a new curve type for elliptical arcs
and use it for rounded rectangles and circles.
We use the 'E' command to represent elliptical
arcs in serialized paths.
Take a rendernode as source and a GskPath and GskStroke,
and fill the area that is covered when stroking the path
with the given stroke parameters, like cairo_stroke() would.
Make .svg use the Cairo renderer to save to an SVG file.
It's useful when comparing rendering behavior and times with
web browsers (as long as one is aware that browsers build a full
DOM tree out of those SVGs).
If people specify the filename, they should know what they're doing.
If they don't, abort if the guessed filename already exists and insist
on the user explicitly giving it.
The validate command does need a display connection,
for better or worse. So exit in an orderly fashion
if we don't have one, instead of crashing.
Fixes: #5948
As this script is now also used in GLib, unify the formatting between
GLib and GTK. Make the formatting of the script conformant to the
Black[1] tool, as GLib requires, and add a copyright header to this
script.
[1]: https://black.readthedocs.io/en/stable/, see also
$(glibsrcroot)/.gitlab-ci/run-bash.sh
Add a new option --deprecations to the validate
command that will warn about use of deprecated types.
The list of current deprecations is unfortunately
hardcoded in the source, so this list will have to
be kept up-to-date.
Fixes: #5256
Reuse a better to read would_drop() from ./testsuite/reftests/gtk-reftest.c
in ./tools/gtk-builder-tool.c
Fixed wrong indentation in ./testsuite/reftests/gtk-reftest.c
Remove the clipping to the widget area that
GtkWidgetPaintable imposes, so we can see shadows
and other out-of-bounds rendering. This is particularly
useful for toplevel windows with client-side decorations.
The simplify and validate commands can function
without a display connection, only preview absolutely
needs one. Allow this, by using gtk_init_check().
GtkBuilder uses GMarkup, which defines a boolean attribute value as:
- yes/no
- true/false
- 1/0
The ITS file for GtkBuilder UI definitions is only using the first pair,
likely because Glade only ever used those values. GTK's own tools, though,
will typically simplify the full yes/no and true/false strings to 1 and 0,
to minimise the parsing time.
Fixes: #4596
The resource compiler in the Windows 11 SDK does not allow one to include
winuser.h directly in resource scripts (.rc) with a rather cryptic error
message, so fix generating the .rc file to embed the UAC manifest by including
windows.h with WIN32_LEAN_AND_MEAN instead.
The installed ITS rule filename is "gtk4builder.its". The .loc file
is wrongly pointing to old "gtkbuilder.its" which makes gettext fail
on systems without GTK3 installed.
Not sure we can do much with a ui file that has
<placeholder/> elements littered throughout. But
at least we can avoid crashing while trying to
convert it.
Fixes: #3781
As the program executable name has 'update' in its filename,
gtk4-update-icon-cache.exe is considered to be an installer program on 32-bit
Windows [1], which will cause the program to fail to run unless it is running
with elevated privileges (i.e. UAC).
Avoid this situation by embedding a manifest file into the final executable
that tells Windows that this is not a program that requires elevation.
Fixes issue #3632.
[1]: https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-vista/cc709628(v=ws.10)?redirectedfrom=MSDN,
under section "Installer Detection Technology"