gtk4-path-tool(1)

πŸ’– gtk4-path-tool β€” the GskPath utility, bestie edition πŸ’–

okay so welcome to gtk4-path-tool, a lil command-line bestie from the GTK commands crew that does stuff to paths. yes, like paths paths. sit down, get comfy, we're gonna slay this πŸ¦‹


✨ SYNOPSIS ✨

gtk4-path-tool <COMMAND> [OPTIONS...] <PATH>

gtk4-path-tool decompose [OPTIONS...] <PATH>
gtk4-path-tool show [OPTIONS...] <PATH>...
gtk4-path-tool render [OPTIONS...] <PATH>...
gtk4-path-tool reverse [OPTIONS...] <PATH>
gtk4-path-tool info [OPTIONS...] <PATH>

🌸 DESCRIPTION 🌸

so like, gtk4-path-tool can do a whole bunch of different tasks on paths. it's giving multitasking icon πŸ’…

and the paths? they're written in SVG syntax, as strings like this:

"M 100 100 C 100 200 200 200 200 100 Z"

✨ now here's the lil trick you need to know: if you wanna read a path from a file, you use a filename that starts with a . or a /. and if you wanna read a path from stdin, you just use -. that's it. that's the whole vibe.


πŸ‘‘ COMMANDS πŸ‘‘

πŸŽ€ Decomposing

the decompose command approximates the path with one made of simpler elements. and if you run it with no options at all, the curves get approximated by line segments. lowkey a glow-down but in the cute way.

  • --allow-quad β€” let quadratic BΓ©zier curves be used in the generated path πŸ™ˆ
  • --allow-cubic β€” let cubic BΓ©zier curves be used in the generated path
  • --allow-conic β€” let conic BΓ©zier curves be used in the generated path

πŸ¦‹ Showing

the show command pops your path up in a window so you can actually look at it. the interior of the path is filled (yes queen). and the window has some interactive key bindings so you can play with it:

  • + / - change the zoom level πŸ”
  • p toggles display of points
  • c toggles display of controls
  • i toggles display of intersections
  • f changes the fill rule

and here are the options:

  • --fill β€” fill the path (this is the default, no need to do the most πŸ’…)
  • --stroke β€” stroke the path instead of filling it
  • --points β€” show points on the path
  • --controls β€” show control points
  • --intersections β€” if you give two paths, show their intersections. if you give one path, show its self-intersections. very ✨meta✨ of it.
  • --fill-rule=VALUE β€” the fill rule used to figure out what areas are inside the path. possible values are winding or even-odd. default is winding.
  • --fg-color=COLOR β€” the color used to fill the interior of the path or to stroke the path. if you don't specify, black is used.
  • --bg-color=COLOR β€” the color used to render the background behind the path. if you don't specify, white is used.
  • --point-color=COLOR β€” the color used to render the points. if you don't specify, red is used.
  • --intersection-color=COLOR β€” the color used to render intersections. if you don't specify, green is used.
  • --line-width=VALUE β€” the line width to use for the stroke. VALUE must be a positive number. default line width is 1.
  • --line-cap=VALUE β€” the cap style to use at line ends. possible values are butt, round or square. see the SVG specification for the details on these styles. default cap style is butt.
  • --line-join=VALUE β€” the join style to use at line joins. possible values are miter, miter-clip, round, bevel or arcs. see the SVG specification for the details on these styles. default join style is miter.
  • --miter-limit=VALUE β€” the limit at which to clip miters at line joins. default value is 4.
  • --dashes=VALUE β€” the dash pattern to use for this stroke. a dash pattern is a comma-separated list of alternating non-negative numbers, and each number is the length of alternate "on" and "off" portions of the stroke. if the dash pattern is empty, dashing is disabled, which is the default. see the SVG specification for the details on dashing.
  • --dash-offset=VALUE β€” the offset into the dash pattern where dashing should begin. default value is 0.
  • --zoom=NUMBER β€” set the zoom level to the given number (between 1 and 20).

🌈 Rendering

the render command renders the given path as a PNG image. it's giving "I'm a file now." πŸ’…

  • --fill β€” fill the path (this is the default)
  • --stroke β€” stroke the path instead of filling it
  • --points β€” show points on the path
  • --controls β€” show control points
  • --intersections β€” if you give two paths, show their intersections. if you give one path, show its self-intersections.
  • --fill-rule=VALUE β€” the fill rule used to figure out what areas are inside the path. possible values are winding or even-odd. default is winding.
  • --fg-color=COLOR β€” the color used to fill the interior of the path or to stroke the path. if you don't specify, black is used.
  • --bg-color=COLOR β€” the color used to render the background behind the path. if you don't specify, white is used.
  • --point-color=COLOR β€” the color used to render the points. if you don't specify, red is used.
  • --intersection-color=COLOR β€” the color used to render intersections. if you don't specify, green is used.
  • --output-file=FILE β€” the file to save the PNG image to. if you don't specify, "path.png" is used. ✨
  • --line-width=VALUE β€” the line width to use for the stroke. VALUE must be a positive number. default line width is 1.
  • --line-cap=VALUE β€” the cap style to use at line ends. possible values are butt, round or square. see the SVG specification for the details on these styles. default cap style is butt.
  • --line-join=VALUE β€” the join style to use at line joins. possible values are miter, miter-clip, round, bevel or arcs. see the SVG specification for the details on these styles. default join style is miter.
  • --miter-limit=VALUE β€” the limit at which to clip miters at line joins. default value is 4.
  • --dashes=VALUE β€” the dash pattern to use for this stroke. a dash pattern is a comma-separated list of alternating non-negative numbers, and each number is the length of alternate "on" and "off" portions of the stroke. if the dash pattern is empty, dashing is disabled, which is the default. see the SVG specification for the details on dashing.
  • --dash-offset=VALUE β€” the offset into the dash pattern where dashing should begin. default value is 0.
  • --zoom=NUMBER β€” set the zoom level to the given number (between 1 and 20).

πŸ’œ Reversing

the reverse command changes the direction of the path. and the resulting path starts where the original path ends. it walked in, did a 180, and left. iconic behavior honestly πŸ’…


🧚 Info

the info command shows various information about the given path β€” like its bounding box and such. she's nosy and we love her for it 🫢


🌟 REFERENCES 🌟


and that's the whole page, bestie!! this lil manual lives in the GTK section as gtk4-path-tool(1) β€” go forth and render some absolutely stunning paths, no cap πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from
  • ubuntu stonking: libgtk-4-bin 4.24.1+ds-1 Β· LGPL-2.0-or-later AND LGPL-2.1-or-later AND sun-permissive AND lcs-telegraphics-permissive AND X11R5-permissive AND MIT AND BSD-3-clause-Google AND Apache-2.0 AND CC0-1.0 AND ZPL-2.1
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms