GIMP Chat http://gimpchat.com/ |
|
Python rounded rectangle bucket fill problem http://gimpchat.com/viewtopic.php?f=9&t=17528 |
Page 1 of 1 |
Author: | vndep [ Tue Jun 25, 2019 2:45 pm ] |
Post subject: | Python rounded rectangle bucket fill problem |
In Python, I am trying to add to my background image a rounded rectangle and then fill it with green color. My latest attempt is below, which fails on the following line: pdb.gimp_image_select_round_rectangle(imageobj, 0, Sign1Xoff, Sign1Yoff, Layer1Width, Layer1Height, cornerradius) Any help / suggestions / recommendations would be appreciated. Thanks in advance! buffer = 10 cornerradius = 15 Layer1Width = 1500 Layer1Height = 500 Sign1Xoff = 100 Sign1Yoff = 100 SignLayer1 = pdb.gimp_layer_new(imageobj, Layer1Width, Layer1Height, 0, 'SignLayer', 100, 0) imageobj.add_layer(SignLayer1, 1) pdb.gimp_layer_set_offsets(SignLayer1, Sign1Xoff, Sign1Yoff) pdb.gimp_context_set_foreground(GreenColor) # THE CODE FAILS ON THE NEXT LINE pdb.gimp_image_select_round_rectangle(imageobj, 0, Sign1Xoff, Sign1Yoff, Layer1Width, Layer1Height, cornerradius) pdb.gimp_edit_bucket_fill(SignLayer1, 0, 0) |
Author: | Steve [ Tue Jun 25, 2019 3:59 pm ] |
Post subject: | Re: Python rounded rectangle bucket fill problem |
I think you have missed out the last parameter, try pdb.gimp_image_select_round_rectangle(imageobj, 0, Sign1Xoff, Sign1Yoff, Layer1Width, Layer1Height, cornerradius, cornerradius) |
Page 1 of 1 | All times are UTC - 5 hours [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |