You are here

Draw arrow

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Rate this item!
AttachmentSize
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

Usage:
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).

ToDo:

  • 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 Hoffmann.P@jabber.ccc.de

Code License: 
GIMP Version: 
Scripting Engine: 

Comments

> * 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 s.th. pleas update!

Club Mate is healthy sleep in pint bottles

Pages

Subscribe to Comments for &quot;Draw arrow&quot;