10-11-2022, 04:44 PM
(This post was last modified: 10-11-2022, 04:48 PM by programmer_ceds.)
@BugsBunnySan
I still couldn't replicate the problem until I realised that the "Resize layers" control in "Image/Canvas Size.." has to be set to "None". Having done this the problem shows when the arrow is drawn on the original layer just as you said.
What you have found is not a bug in the script, it is an obscure bug in GIMP and only seems to happen in the circumstances that you describe. The problem looks like it lies in the gimp-paintbrush-default function. It still happens in V2.99.12 (note that the script will not run in V2.99.12 unless you produce your own version that reinstates the function gimp-image-get-active-vectors)
As a work-around I have modified the script so that it always draws the arrow on a new layer but merges this layer down onto the original layer at the end if the option to draw the arrow on a new layer is not selected.
Try the updated version:
http://programmer97.byethost10.com/Files/arrow.zip
I will produce a simple script that can be used to demonstrate the problem and then submit a GIMP fault report.
Note that with the set-up that you described the drawable passed to the arrowhead drawing function has an offset of 40,40 whether the drawable is a new layer or the original layer - hence my saying that it is a problem with GIMP. If one of the methods had no offset then it would have been a problem with the script but as it is the script can't know whether or not to remove the offset.
I still couldn't replicate the problem until I realised that the "Resize layers" control in "Image/Canvas Size.." has to be set to "None". Having done this the problem shows when the arrow is drawn on the original layer just as you said.
What you have found is not a bug in the script, it is an obscure bug in GIMP and only seems to happen in the circumstances that you describe. The problem looks like it lies in the gimp-paintbrush-default function. It still happens in V2.99.12 (note that the script will not run in V2.99.12 unless you produce your own version that reinstates the function gimp-image-get-active-vectors)
As a work-around I have modified the script so that it always draws the arrow on a new layer but merges this layer down onto the original layer at the end if the option to draw the arrow on a new layer is not selected.
Try the updated version:
http://programmer97.byethost10.com/Files/arrow.zip
I will produce a simple script that can be used to demonstrate the problem and then submit a GIMP fault report.
Note that with the set-up that you described the drawable passed to the arrowhead drawing function has an offset of 40,40 whether the drawable is a new layer or the original layer - hence my saying that it is a problem with GIMP. If one of the methods had no offset then it would have been a problem with the script but as it is the script can't know whether or not to remove the offset.