10-08-2022, 08:18 PM
(This post was last modified: 10-08-2022, 08:19 PM by BugsBunnySan.)
(10-08-2022, 07:20 PM)programmer_ceds Wrote:(10-07-2022, 09:42 PM)BugsBunnySan Wrote: Hi!
I think I found a bug in this script (which is otherwise pretty awesome ):
I've attached an image that shows an arrow with the problem and one where it's fixed and looks good: ...
I think that I have followed the steps that you list above (with GIMP V2.10.32 and the version of arrow.scm dated 29/7/2021) and the arrow seems to be drawn correctly in both steps 4 and 6. I don't get an extraneous arrow head as a result of step 4.
What are the sizes of the original Arrows layer and the new canvas size? Also rough coordinates for the two points of the path?
I found what causes it more precisely, as I moved the existing content in the Image->Canvas Size resizing tool (to center it). Sorry, I forgot to mention this in my original post!
Also, if the Arrows layer (created in step 2) is moved about inside the canvas after Image->Canvas Size, that causes the arrowhead to not be drawn where the path ends as well.
If the Arrows layer is not moved from the origin (top left corner of the image), even though it is still smaller than the canvas size, then the arrowhead is in the right position, so maybe the issue is with the layer being offset from the image origin? I tested this just now, and if I move the Arrows layer, e.g., 60 pixels to the right, the arrowhead will also be offset 60 pixels to the right from where the path ends, so my guess is, the Arrows layer offset is added twice to the arrowhead position somehow...
Oh, also, to answer your question: the original Arrows layer (and image) I created as 640x640 in the example, then resized to 720x720 and I then moved the Arrows layer to approximately the middle of the image. (In the image I was working on when I noticed the bug, it was different sizes, which I've since changed further, but it was something like 3k to 4k resolution I think.)