I don't use script-fu so I cannot tell you the exact syntax, but in python it goes likes this:
The really important bits are gimp_context_set_stroke_method(STROKE_LINE) (so it uses the Line mode instead of painting ti the brush), and gimp_edit_stroke_vectors(layer,path) to do the actual operation. The rest may or may not be useful.
For script-fu, drop pdb. and replace the underscores with dashes (so pdb.gimp_context_set_line_miter_limit becomes gimp-context-set-line-miter-limit)
Code:
pdb.gimp_context_set_line_width(self.lineWidth)
pdb.gimp_context_set_line_cap_style(self.capStyle)
pdb.gimp_context_set_line_join_style(self.joinStyle)
pdb.gimp_context_set_line_miter_limit(float(self.miterLimit))
pdb.gimp_context_set_antialias(self.antiAlias)
pdb.gimp_context_set_stroke_method(STROKE_LINE) # requires 2.10!
pdb.gimp_edit_stroke_vectors(layer,path)
The really important bits are gimp_context_set_stroke_method(STROKE_LINE) (so it uses the Line mode instead of painting ti the brush), and gimp_edit_stroke_vectors(layer,path) to do the actual operation. The rest may or may not be useful.
For script-fu, drop pdb. and replace the underscores with dashes (so pdb.gimp_context_set_line_miter_limit becomes gimp-context-set-line-miter-limit)