You are here

Draw arrow

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Rate this item!
Description.png47.5 KB
arrow.scm11.24 KB

Update [11/15/2009] : Added fixed brush width and double headed error, removed bug 1) one-point-paths, 2) horizontal paths
Update [11/16/2009] : Fixed image type restriction string
Update [11/19/2009] : Added feature for absolute wing length, fixed handling gray-scale images
Update [25/01/2010]: Fixed fixed opacity bug (thanks to Richard)

This plugin enables GIMP to draw an arbitrary arrow into an image or a new layer. The plugin has reasonable default values for every paramtere but is freely adjustable to ones needs. Parameters are:

  • wing length and line width freely adjustable (relative & absolute)
  • angle between arrow tail and wing
  • optional draw arrow in new layer
  • optional filled or not filled head
  • optional notch in arrow head
  • optional delete used path
  • optional draw double headed arrow

Create a path (usually <B>) with the head of the arrow (first anchor point) and the end of the tail (second anchor point). Then call the script which adds itself to the "Tools" menu (I use <AltGr+P> as the shortcut as "Pfeil" is the german word for arrow).


  • Write documentation (any one can help me with that and knows how to?)
  • Open for suggestions
  • Enable a more angularly arrow

You can also contact me via ICQ #52712314 and Jabber/XMPP

Code License: 
GIMP Version: 
Scripting Engine: 


Thank you, I added the feature to set a fixed (pixel) size for the arrow head (wing length is what I called it) as it was already existing for the line thickness. Again negative values are relative to the arrow length, positive values stand for absolute pixel values.

The line thickness of the script is not connected to the active brush. The script creates a new circle shaped brush and sets it size relative to the length of the arrow or absolute - depending on the line width parameter.
Club Mate is healthy sleep in pint bottles

This is a nice script.

I would, however, submit the following comments:
* There is no reason to limit the script to RGB* images; it should work fine -- and prove just as useful -- on grayscale and indexed images (or on layermasks and channels in an RGB image).
* I don't think the script should destroy the path; paths use very little memory (relatively) and the user may need it for other purposes.
* Personally, I would find it more intuitive if the arrow were drawn in the direction from the starting point of the path to the ending point. (This would probably mean that the script should use the last two points of the last stroke of a multi-stroke path.)


* I unlimited the script (at least I think I did so by removing the limit)
* The deletion of the path is now optional and default is off
* Now you can change the direction of the arrow, default is the old setting. I still use the two outer strokes.

Club Mate is healthy sleep in pint bottles

> * I unlimited the script (at least I think I did so by removing the limit)

It appears that in doing this, an error (most likely of the "copy-n-paste" variety) cropped up. You have substituted a "(Versionhistory:..." string where the drawable constraint string (e.g., "RGB*", "Grayscale*", etc) is expected. You want to substitute an asterisk (within quotes: "*"), indicating that any image type is acceptable.

Your script still functions with the bad string (the GIMP is apparently forgiving in this instance), however, it does fail to provide the "Repeat Arrow" and "Re-show Arrow" capabilities.

All right, thank you for that hint! I was already wondering where that nice blank line came from ;-)

Club Mate is healthy sleep in pint bottles

Error: division by zero

Windows Vista 32 bit, using GIMP 2.6.7

Apparently the script requires you to create an active layer before setting your two path points. It was the only way I could get the script to work.

I asume that this error occurred in the following to events:
1) you only have one point in your path
2) you have more then one point but the outer ones are on the same horizontal line. So their y-difference is there which I need(ed) for the calculation of the angle...

So, I fixed that error. If it occurs again I might have missed pleas update!

Club Mate is healthy sleep in pint bottles


Subscribe to Comments for "Draw arrow"