Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Gimp Python script to do same thing as Free Select Tool
#1
I can use the  'Free Select Tool'  to draw polygons.How do I use Gimp Python-fu to do the same thing?

Should I use this?:  pdb.gimp_edit_stroke_vectors(drawable, vectors)

If so, I don't know what to do for the vectors parameter. I tried treating it like an array of coordinates, or an array of arrays of coordinates but that does not work.  So far I have learned to create an image, open an image in a layer, copy a layer and more. I am not making good progress on polygons.
Reply
#2
You are on the wrong track, pdb.gimp_edit_stroke_vectors(drawable, vectors) is the API to "Edit>Stroke Path".

What you need is pdb.gimp_image_select_polygon(image, operation, num_segs, segs).
Reply


Forum Jump: