Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PyGimp;Change color;Bucket fill selected
#2
What you want is:

Code:
➤> pdb.gimp_image_select_rectangle(img, CHANNEL_OP_REPLACE, gPosX+pX, gPosY+pY, wid, hig)
➤> pdb.gimp_drawable_edit_fill(draw,FILL_FOREGROUND)

To recap the various fill options, you can/should currently use:
  • gimp_drawable_edit_bucket_fill: simple standard bucket-fill with "similar colors", abides to both color and selection (standard GUI tool is either color or selection). Most parameters are in the gimp_context_* functions.
  • gimp_drawable_edit_fill: fill selection on drawable (simpler form of bucket-fill)
  • gimp_drawable_fill: fill whole drawable regardless of selection (used for initialization)
The gimp.Drawable.fill() method that you use is really a cover for gimp_drawable_fill, so not what you want here.

Avoid using gimp_edit_bucket_fill, gimp_edit_bucket_fill_full, gimp_drawable_edit_fill, and gimp_bucket_fill that are deprecated.
Reply


Messages In This Thread
RE: PyGimp;Change color;Bucket fill selected - by Ofnuts - 03-15-2020, 09:32 AM

Forum Jump: