Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Apply stroke to text in Gegl?
#4
OK - just to wrap this up, I ended up writing my own operation in Gegl. Basically, I just copied the existing "text.c" operation to a new "textstroke.c" file, added "stoke_width" and "stroke_color" parameters, and used pango_cairo_layout_path() to get the text path. Once I had that, I just used cairo_stroke() to draw it.

All in all, it was pretty straightforward. Documentation on Gegl is sparse, but the operations are very readable. Getting my head around the pango (text layout) and cairo (2D vector drawing) libraries were the hardest part. I imagine doing anything serious would take more effort, but I was impressed at how easy the Gegl library was to modify.
Reply


Messages In This Thread
Apply stroke to text in Gegl? - by JasonP - 03-12-2020, 12:27 PM
RE: Apply stroke to text in Gegl? - by denzjos - 03-12-2020, 02:48 PM
RE: Apply stroke to text in Gegl? - by JasonP - 03-12-2020, 04:20 PM
RE: Apply stroke to text in Gegl? - by JasonP - 03-17-2020, 12:06 PM

Forum Jump: