(07-31-2023, 09:39 AM)mwas Wrote: Hi, I am new to this forum so if I my question is in the wrong section, well, sorry I guess!
I have a pdf form to fill like 500 times and I thought using a gimp python plugin is the way to do it. I have developed the said plugin and I can successfully fill the form except that the text layers I am adding are too sharp. Before I save the file manually, I usually use the blur tool to make the text look like it was filled with a pen. I have tried to do this in the plugin but I can't get i right. I am using the gimp.convolve() function. I guess my problem is obtaining the stroke points of the text layer. Can somebody please help me. Thanks.
It would be easier with pdb.plug_in_gauss(image, drawable, horizontal, vertical, method).
But perhaps using dark gray instead of black, or reducing the layer opacity a bit would work just as well.
If you want to stroke the convolve tool along the text path outline, two solutions:
- get the path, and get the polygon approximation of the strokes (gimp_vectors_stroke_interpolate) and then use that with convolve()
- use the path directly with gimp_drawable_edit_stroke_item() after a gimp_context_set_paint_method('gimp-convolve') (but I don't know how to set the parameters to the convolve operation, there is nothing in gimp-context-* for this).