03-15-2020, 07:08 AM
Hi. Trying to change the color of the bucket fill function in python gimp, but due to my inexperience with python and the structure between gimp and python i have not been successful.
Information im looking for is:
How to swap the pre-selected colors
How to set new color
How to fill and selected area
How to select and area
All of which needs to take place in pyGimp
The bellow code is what i have so far, but the result is what i expect.
Expected result should be an grid (almost like a chess board) where pyGimp color individual squares in one of the two colors (foreground and background)
#Select and square
pdb.gimp_rect_select(img, gPosX+pX, gPosY+pY, wid, hig, CHANNEL_OP_REPLACE, False, 0.0)
#Fill the square
draw.fill(FILL_FOREGROUND)
Information im looking for is:
How to swap the pre-selected colors
How to set new color
How to fill and selected area
How to select and area
All of which needs to take place in pyGimp
The bellow code is what i have so far, but the result is what i expect.
Expected result should be an grid (almost like a chess board) where pyGimp color individual squares in one of the two colors (foreground and background)
#Select and square
pdb.gimp_rect_select(img, gPosX+pX, gPosY+pY, wid, hig, CHANNEL_OP_REPLACE, False, 0.0)
#Fill the square
draw.fill(FILL_FOREGROUND)