| 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
GIMP 2.2 is too old
Seriously, GIMP 2.2 doesn't support some Script-FU procedures. So you should use at least GIMP 2.6.
2 B-Ranger: please change version identeficator to 2.6 (in script edit interface).
Warn about erroneous count of path points
Hi,
whilst using this plugin, I tried to draw an arrow with only one point. Naturally, this didn't work and arrow.scm painted the whole background in the selected color (or created a new, transparent layer only.)
Please include some warnings depending on the count of selected path points:
Zero to one path point: no arrow drawing possible.
Two path points: no error message.
Three or more path points: draw arrow, but though warn the user that only the first and last path points will be used as the arrow's head/tail.
Thank you for your help once again.
Best regards,
Mihai
Warn about erroneous count of path points
I'm not sure that Berengar is still supporting this script - if not I will make these changes in a few days time.
Feature-Wish:Save Settings
First of all, congratulations for this superb plugin.
It works great for me, I'm using it for writing manuals with pictures.
If the plugin save the user settings f.e. with a "save settings" button, the arrow tool would be nearly perfect.
Do you know a way to realize this?
TIA
Feature-Wish:Save Settings
I stand to be corrected but I don't know of a way to access data files (to store the settings) from Script-fu scripts.
If there is a way then this would be possible but it would not be elegant due to the way that the script sets the default values for the parameters. You could have an option box that allowed three options:
1) use the parameters from the script dialog
2) use the parameters from the script dialog and save them for next time
3) use the saved values
The problem is that you wouldn't know what the saved parameters were - the script can't (so far as I am aware) read the previous settings and display in the parameter boxes of the dialog for you to change.
If you want one or more of the parameters always set to the same value then the easiest thing to do is to edit your copy of the script file (any text editor can be used for this).
Line Width
Hi,
This is a great script. Thank you so much for creating it. I'm not a Gimp guru, so maybe this question is on the dumb side, but I do not see a way to adjust the line width. I would like to have an arrow with hard corners and a wide line, but it seems that the larger the brush stroke the softer (curvier) the arrows. Any suggestions?
Many thanks for the great work!
Works only with a brush tool
Hi,
Thank you very much for this script! I have been missing a good arrow tool very much for a long time. Moreover, the arrows that this scripts makes are really nice.
However, it was very difficult to find out how this script works. I did what you suggested: made a path and ran the script, and it did nothing. If Fill head arrow was on, a nice little head was drawn without the line of the arrow.
I never dreamed that after drawing the path I have to switch to a brush tool to get the script work as it is intended. Without the last comment, I would never found out how to use the script. Now it works, but it is pretty slow and annoying that after drawing the path, I have to choose a brush tool. If you only make one or two arrows, this may be no problem, but if you make a lot of arrows, this slows down the workflow. And I don't really see the point of it.
Anyway, the script is nice, just that it could be more straightforward.
Thanks,
Abel
Same here
Apparently, between the last updates on the script something got changed, because arrow.scm is doing the same thing with me (draws arrow head but no tail).
Brush tool problem
I have just looked at this again. If I don't have a brush type tool selected I get a 'ragged' arrow. I noticed that I get the same effect if I have a brush type tool selected with the layer mode set to dissolve. I have therefore modified the script so that it temporarily sets the brushes paint mode to Normal.
In total I added 4 extra lines of code. I added the three lines with "; 6.3.2010" in the following section:
(PreviousOpacity 100.0)
(PreviousPaintMode 0) ; 6.3.2010
)
(begin
(set! PreviousOpacity (car (gimp-context-get-opacity)))
(gimp-context-set-opacity 100.0)
(set! PreviousPaintMode (car (gimp-brushes-get-paint-mode))); 6.3.2010
(gimp-brushes-set-paint-mode NORMAL-MODE) ; 6.3.2010
; collect points for arrow-tail and draw them
(aset points 0 inPointToX) (aset points 1 inPointToY)
(aset points 2 inPointFromX) (aset points 3 inPointFromY)
and the line with "; 6.3.2010" in the following section:
(gimp-selection-none image)
))
(gimp-brushes-set-paint-mode PreviousPaintMode) ; 6.3.2010
(gimp-context-set-opacity PreviousOpacity)
(I will email the whole script to Berengar on Monday when I have his email to hand.)
Hope this helps
Works brilliantly
Thanks for the code updates, p_c. Arrow.scm is now working properly. :)
Pages