| Attachment | Size |
|---|---|
| 47.5 KB | |
| 11.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:

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:
You can also contact me via ICQ #52712314 and Jabber/XMPP Hoffmann.P@jabber.ccc.de
Comments
Pleased to hear that it works for you too
This removes a niggle from a script that i find very useful.
I have noticed this morning that the gimp-brushes-set-paint-mode and its companion get function are deprecated and should be replaced by the gimp-context-set-paint-mode and gimp-context-get-paint-mode functions respectively (the script still seems to work in exactly the same way).
Opacity
I am using the default settings for the script with the foreground colour set to white.
The filled in centres of the arrow-heads always appear to be at 100% opacity.
If the selected tool is the paths tool, the select by colour tool, the rectangular selection tool .... (i.e. a non-drawing tool) then the remainder of the arrow appears at less than 100% opacity.
If the selected tool is the brush, pencil, eraser ... all parts of the arrow appear to be 100% opaque.
Update 22.1.2010
The problem is caused by the context opacity not being set to 100% - what controls the context opacity at the GUI level?
Fixed
Bug Fixed :-)
Club Mate is healthy sleep in pint bottles
Great plugin
Thank you for this plugin. For me advanced arrow tool was the killer feature of Paint.NET. I hope one day this plugin will be as powerful. Very promising as for something less than 1 month old. :)
The arrow is always straight line and does not really follow the path spline.
The parameter to control thickness is very counter-intuitive. Human readable thickness number (preferably always positive) and better documentation would be nice.
I see that it is a problem
I see that it is a problem to want to offer the possibility to use relative and absolute values at once, I will have to think about a good solution. I should probably add more drop-down boxes that enable the user to decide how he wants his arrows.
I my self stumbled across the length-dependent thickness when I wanted to draw to arrows with different length into my image. Maybe the script should be redone as a plugin...
I will add the drawing of splines and not-one-line-arrows to the todo-list. Are there any more features in Paint.NET that should be included?
---
Club Mate is healthy sleep in pint bottles
Curvy arrows
count me in as someone else who wants curvy, spline-hugging arrows. Badly enough, as it is, that I started thinking about how to do it. The hardest part, I think, is how the arrow head should be drawn. I see three ways to do it:
1a: stick to straight lines for the arrow head, and orient it so that the tangent to the arrow body at the arrow tip bisects the arrow head.
1b: stick to straight lines for the arrow head, and orient it so that the arrow body intersects it at the midpoint of the base of the arrow head.
2: use curved lines for the arrow head (basically, by rotating the spline by appropriate angles (and truncating it) and (for the base of the arrow head) moving the rotated spline so it intersects the other 2 forming the arrow head in the appropriate positions.
1a and 1b are reasonably straightforward (maybe more so for 1b, because it doesn't require figuring out that tangent), but will look ugly, or at least weird, if the arrow body is very curvy (in extreme cases, the body may stick out one side of the arrow head. On the flip side, 2 would require more work (maybe significantly so) to create the boundary of the arrowhead, but I think it's worth the effort.
What do you think? Is there something I missed? (Either another way to do it or a pro or con of one or more of 1a, 1b, and 2?)
arrow head size
Hi, great script, works well. I just have one problem, the fact that the arrow head size is always relative to the size of the length of the arrow. I would like to be able to draw a set of arrows of different length, but with the same head size. as it is now if I want to draw a long arrow the head ends up being quite large, at a minimum of 1/5th the size of the arrow length.
A small other thing I don't quite understand how the line thickness in the scrip is related to line thickness of brushes. In a figure I was working on arrow thickness of 2 seemed to correspond to brush size 5-6 pixels.
Cheers, thanks for this.
Re: arrow head size
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
Nice!
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.)
Re: Nice!
Thanks!
* 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
Pages