Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Learn to create Python3 plugins
#7
(12-28-2021, 07:27 PM)z-uo Wrote: Thank you for each correction! I reach to create it!
Now I find that with the following commands I have the selection bounds:
Code:
selection = image.get_selection()
flag, non_empty, x1, y1, x2, y2 = selection.bounds(image)
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)?
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.

Some of this is a bit of an uphill struggle but there is satisfaction when you find the answer :-)
Reply


Messages In This Thread
Learn to create Python3 plugins - by z-uo - 12-27-2021, 09:59 AM
RE: Learn to create Python3 plugins - by z-uo - 12-27-2021, 04:12 PM
RE: Learn to create Python3 plugins - by z-uo - 12-28-2021, 11:14 AM
RE: Learn to create Python3 plugins - by z-uo - 12-28-2021, 07:27 PM
RE: Learn to create Python3 plugins - by programmer_ceds - 12-28-2021, 10:35 PM
RE: Learn to create Python3 plugins - by z-uo - 12-29-2021, 05:07 PM
RE: Learn to create Python3 plugins - by z-uo - 12-30-2021, 10:16 AM
RE: Learn to create Python3 plugins - by z-uo - 12-30-2021, 04:56 PM
RE: Learn to create Python3 plugins - by z-uo - 12-30-2021, 05:54 PM
RE: Learn to create Python3 plugins - by z-uo - 12-31-2021, 08:40 AM
RE: Learn to create Python3 plugins - by z-uo - 01-02-2022, 10:37 AM

Forum Jump: