12-28-2021, 10:35 PM
(12-28-2021, 07:27 PM)z-uo Wrote: Thank you for each correction! I reach to create it!You could use gimp-drawable-edit-fill() - with all of the functions from the GIMP PDB you can call them in the way that I called gimp-image-get-item-position() in the code fragment in my previous post - there may be neater ways to do this for some functions but, as you are finding out, the documentation is somewhat limited. In case you don't know - you can find details on all of the PDB functions in GIMP by going to "Filters/Development/Python-Fu/Python Console/Browse". Type in something related to what you are looking for (for example Layer) and you will all of the functions that contain that word.
Now I find that with the following commands I have the selection bounds:
But how to fill that selection with the PP color (or SF color or White or any color)? Where I can find documentation for the instructions (I only found this that is for python2)?Code:
selection = image.get_selection()
flag, non_empty, x1, y1, x2, y2 = selection.bounds(image)
Some of this is a bit of an uphill struggle but there is satisfaction when you find the answer :-)