Matthias Clasen
f7df663dea
Fix the build
...
I typoed in a2223c0884
.
2024-06-03 15:10:19 -04:00
Matthias Clasen
bf1a434d5c
Merge branch 'font-subsetting-in-node-files' into 'main'
...
Use font subsetting in serialized nodes
See merge request GNOME/gtk!7227
2024-06-03 12:47:59 +00:00
Matthias Clasen
9256b5b552
rendernode tool: Add an extract command
...
This lets one extract the data urls from a node file.
2024-06-03 08:28:21 -04:00
Matthias Clasen
a2223c0884
Drop redundant GLib version check
...
We require GLib 2.76 now.
2024-06-02 20:07:33 -04:00
Matthias Clasen
4862c3f779
Add 'only foreground' to texture utility api
...
Add an 'only_fg' argument to all our internal texture utility
api, so GtkIconTheme can find out if a symbolic png or svg uses
colors beyond the foreground or not.
This information is used in gtk_symbolic_paintable_snapshot_symbolic
to optimize rendering of such symbolic icons.
2024-04-28 23:42:02 -04:00
Christian Hergert
104a264d8b
rendernode-tool: add support for rendering to PDF
2024-04-14 22:29:52 -07:00
Matthias Clasen
34e90005af
Don't forget to unrealize the renderer
...
This causes a critical warning.
2024-03-08 20:44:42 -05:00
Matthias Clasen
c9c6b7bb2a
rendernode tool: Add a compare command
...
This command can be used to compare the rendering of a node
to a reference image. It can also be used to compare the
renderings of two nodes, or to compare two images.
2024-02-21 22:27:32 -05:00
Anders Jonsson
12e15c0ee0
tools: Add missing contraction in string
2024-02-05 00:23:29 +01:00
Matthias Clasen
50a47f55d9
Revert "rendernode-tool: Make test fonts available"
...
This reverts commit cdbfb35067
.
We can now put custom fonts into node files, so there is
no more need for this.
2024-01-16 07:04:45 -05:00
Matthias Clasen
cdbfb35067
rendernode-tool: Make test fonts available
...
We are likely to use the tool with node files from out testsuite,
which may now refer to custom test fonts, so make them available
in the same way as in the node editor.
If in doubt, you can set GTK_SOURCE_DIR to make the tool find the
fonts.
2024-01-14 16:58:05 -05:00
Benjamin Otte
8872e1cbb0
tools: Add gtk-rendernode-tool benchmark
...
A simple tool that runs gsk_renderer_render_texture() a few times with
every renderer and prints the results.
2024-01-13 17:22:57 +01:00
Benjamin Otte
c1e2ffac83
tools: Split out a function
...
There's a function now that creates a renderer by name - and allows NULL
for the default renderer
2024-01-13 17:22:57 +01:00
Matthias Clasen
d0a675ab01
gsk: Add subsurface nodes
...
Also show them in the inspector recorder, with some information.
2023-11-13 22:17:35 +01:00
Benjamin Otte
76007c4d09
rendernode-tool: Add --undecorated to show command
...
This is to get exactly just the rendernode drawn when testing, and not
any extra drawing code.
2023-10-31 00:36:27 +01:00
Matthias Clasen
c721c4d6ef
path-tool: Fix the restrict command
2023-09-21 15:36:25 -04:00
Benjamin Otte
24048dce43
render-node-tool: Actually load files properly
2023-09-15 16:34:00 +02:00
Benjamin Otte
9dfdb1b65b
rendernode-tool: Fix array size
...
Also add an assertion, so things explode properly if we forget to
update the array size when adding new nodes, instead of writing random
memory.
2023-09-07 16:19:20 +02:00
Matthias Clasen
1e8e7e0c00
path-tool: Make render match show
2023-09-03 23:47:10 +02:00
Matthias Clasen
1e9e8d24c3
path-tool: Add a --point-color option
2023-09-03 23:47:10 +02:00
Matthias Clasen
061a56d213
path-tool: Add a way to show controls
2023-08-31 03:19:25 -04:00
Matthias Clasen
3f63ba36ce
path-tool: Factor out dash parsing
...
No need to do this in two places.
2023-08-31 03:19:17 -04:00
Matthias Clasen
dcbca3f0d7
path-tool: Add a reverse command
...
It does what it says.
2023-08-28 00:27:29 -04:00
Matthias Clasen
81c8d1dd28
path-tool: Add length to info output
...
This requires GskPathMeasure.
2023-08-25 22:26:54 -04:00
Matthias Clasen
32d00ca9ed
path-tool: Add a restrict command
...
This lets you subset a path between two given lengths.
2023-08-25 22:26:54 -04:00
Matthias Clasen
25e6231a88
path: Switch back to conics
...
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.
2023-08-25 07:33:16 -04:00
Matthias Clasen
d33ed4f9ab
path: Add elliptical arcs
...
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.
2023-08-23 12:43:52 -04:00
Matthias Clasen
79e132ab7b
path-tool: Reorganize options
...
Put fill and stroke options into their own group.
This helps produce understandable --help output.
2023-08-22 09:56:43 -04:00
Matthias Clasen
03a511aab4
path-tool: Make info show statistics
...
It is somewhat interesting to know how many
contours, lines, etc. a path consists of.
2023-08-15 13:33:23 -04:00
Matthias Clasen
62176a3bd0
tools: Add gtk4-path-tool
...
This comes in handy for testing, among other things.
For now, this supports decomposing, reversing, rendering,
info and preview.
2023-08-12 16:34:19 -04:00
Benjamin Otte
3aa3816125
gsk: Add GskStrokeNode
...
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.
2023-08-07 13:02:57 -04:00
Benjamin Otte
fc4a464b47
gsk: Add GskFillNode
...
Take a rendernode as source and a GskPath and fill
the region inside the path with the source, just like
cairo_fill() would.
2023-08-06 21:01:11 -04:00
Benjamin Otte
3f16f7e0d4
rendernode-tool: Add another magic format
...
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).
2023-07-31 16:51:03 +02:00
Benjamin Otte
166777dd55
rendernode-tool: Move code
...
No functional changes yet.
2023-07-31 16:51:03 +02:00
Benjamin Otte
1f848bf9fd
rendernode-tool: Save to tiff
...
If the save filename ends in .tiff, save to tiff instead.
For now this is a sneaky autodetect feature, not sure if/how to make it
more explicit.
2023-07-28 09:06:14 +03:00
Benjamin Otte
1e75fc35c8
tools: No need for --force when specifying filename
...
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.
2023-07-22 23:30:15 +02:00
Daniel Boles
8da96b9353
tools: Replace references to GTK+ with GTK no plus
2023-07-21 12:05:25 +01:00
Matthias Clasen
601011ccc0
Add a gtk4-rendernode-tool
...
This is meant to work with serialized render nodes.
2023-07-21 06:26:11 -04:00
Matthias Clasen
411e0c5fbd
tools: Use #pragma once
...
We are trying to be consistent about this.
2023-07-20 15:18:13 -04:00
Matthias Clasen
e523d3a50e
tools: Drop unnecessary conditionals
...
We require GLib 2.76 now.
2023-07-20 15:18:13 -04:00
Matthias Clasen
ab809d1dc3
buildertool: Exit orderly
...
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
2023-07-12 15:49:11 -04:00
Chun-wei Fan
6d1537647c
tools/generate-uac-manifest.py: Fix formatting
...
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
2023-07-03 12:50:55 +08:00
Matthias Clasen
723fb6c8be
gtk4-builder-tool: Fix naming
...
We install the tool as gtk4-builder-tool, so that
is what it should call itself.
String change.
2023-06-27 07:09:04 -04:00
Matthias Clasen
33fc4d6495
buildertool: Make render an alias for screenshot
...
Its a more neutral name and will align better with
other tools.
2023-06-26 10:58:35 -04:00
Matthias Clasen
c2ba1d69a1
Rename pixbuf utils to texture utils
...
That is what this is now.
2023-05-16 22:00:08 -04:00
Matthias Clasen
847739aed7
Reduce pixbuf helpers
...
Concentrate pixbuf handling in gdkpixbufutils.c.
2023-05-16 21:56:22 -04:00
Matthias Clasen
9463e0f56c
Only build iconcache validator if it is used
2023-05-15 23:06:07 -04:00
Matthias Clasen
2f8c0b7aec
tools: Cosmetics
...
Make gtk-builder-tool screenshot be quiet unless
it had to make up a filename. And tweak --help
output a bit.
2023-05-15 08:03:20 -04:00
Matthias Clasen
63b50f48a9
Merge branch 'harmonize-would_drop' into 'main'
...
Harmonize would_drop() replacement for g_log_writer_default_would_drop()
See merge request GNOME/gtk!4935
2023-04-28 22:55:42 +00:00
Matthias Clasen
2dc17aeca9
gtk4-builder-tool: Localization fixes
...
Be consistent about marking strings for
translation. And make locatization actually
work by including gi18n-lib.h instead of gi18n.h.
2023-03-17 22:04:25 -04:00