0% found this document useful (0 votes)
88 views3 pages

Arrow Script Notes

The arrow.scm Script-Fu GIMP script allows users to draw customizable arrows in images or new layers, with adjustable parameters such as wing length, line width, and brush thickness. It supports both straight and curved arrows, and users can modify default values by editing the script. The script can be accessed through the 'Tools' menu after creating a path for the arrow's head and tail.

Uploaded by

Hallan Dellon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
88 views3 pages

Arrow Script Notes

The arrow.scm Script-Fu GIMP script allows users to draw customizable arrows in images or new layers, with adjustable parameters such as wing length, line width, and brush thickness. It supports both straight and curved arrows, and users can modify default values by editing the script. The script can be accessed through the 'Tools' menu after creating a path for the arrow's head and tail.

Uploaded by

Hallan Dellon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Notes for the arrow.

scm Script-Fu GIMP Script

The script was originally written and posted in the GIMP Plug-in Registry by B-Ranger. The
following section of the notes and the drawing are from the original posting:

This plug-in enables GIMP to draw an arbitrary arrow into an image or a new layer. The plug-in has
default values for every parameter but is freely adjustable to one’s needs. Parameters are:
• wing length and line width freely adjustable (relative & absolute)
• the brush thickness (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 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.

The following notes are from the GIMP Plugin Registry "Draw Curved or Straight Arrows"
(http://registry.gimp.org/node/28566):

The attached Script-fu file is a modified version of B-Ranger's arrow drawing script. This version
allows arrows to follow curved paths (splines) as well as maintaining the original scripts ability to
draw straight arrows. (See http://registry.gimp.org/node/20269 for the original script)
To use the script:
1. create a single path of two points (the first point will be the one at which, by default, a single
arrow head is drawn)

Select the Path tool and ensure that "Edit Mode" is set to "Design", left-click where the head of
the arrow is to be, left-click where the tail of the arrow is to be.
2. bend the path to the desired shape by using the left mouse button to drag a point on the path if a
curved arrow is to be drawn
3. run the script by selecting "Arrow..." from the "Tools" menu
4. adjust the settings as required and draw the arrow by clicking "OK"

If you wish to adjust the parameters and redraw the arrow just use Edit/Undo or press Ctrl-Z /
Command-Z - the path will not be shown (in GIMP V2.10.24 anyway) if the "Delete path after
arrow is drawn" option was selected - the path will still be there, although not shown, and repeating
the arrow script will draw the arrow again using the (modified) parameter settings.
Paths may have more than 2 points thereby allowing for more complicated curved arrows.
When a path with more than 2 points is used to draw a double-headed arrow the end and
penultimate points at each end of the path are used to position the arrow heads.
Whilst it is not possible at the moment to post files to a GIMP Plugin Registry I have posted the file
at the following address:
http://programmer97.byethost10.com/Files/arrow.zip

Absolute Pixel Mode

When the "Length of wings type" is set to "LoW Pixels" and the "Brush thickness type" is set to
"BT Pixels" then the values set into the fields "Length of wings (LoW)" and "Brush thickness (BT)"
are used as pixel values to draw the arrow – the larger the values set into these fields the larger the
resulting arrow.

Proportional Mode

When the "Length of wings type" is set to "Path length divided by LoW value" the length of the
arrow wings is proportional to the length of the path used to define the position of the arrow – the
longer the path the longer the wings of the arrow. In this mode the length of the path in pixels is
divided by the setting of the "Length of wings (LoW)" field. The larger the setting of the "Length
of wings (LoW)" field the shorter the length of the wings. For example if the wings are to be 1/8th
of the path length the "Length of wings (LoW)" should be set to 8.

Similarly when the "Brush thickness type" is set to "Path length divided by BT value" the brush size
will be given by the path length in pixels divided by the setting of the "Brush thickness (BT)" field
– the larger the value set into this field the smaller the brush size.
Editing the default values

By default the script uses absolute pixel values for the length of the wings and the brush thickness.
In this mode all arrows drawn will have the same size heads and use the same brush size. To keep
this mode but alter the sizes just use a text editor to edit the script and change the values highlighted
in red below:

SF-ADJUSTMENT "Length of wings (LoW)" '(20.0 1 500 1 10 1 1)


SF-ADJUSTMENT "Brush thickness (BT)" '(6 1 500 1 10 0 1)

To make the script default to the mode where the arrow heads and brush thickness is proportional to
the length of the path the following lines should be edited:

SF-OPTION "Length of wings type" (list "LoW Pixels" "Path length divided by LoW value")
SF-OPTION "Brush thickness type" (list "BT Pixels" "Path length divided by BT value")
(define FACTOR_IN_ABSOLUTE_PIXELS 0)
(define FACTOR_RELATIVE_TO_PATH_LENGTH 1)

should be changed to:

SF-OPTION "Length of wings type" (list "Path length divided by LoW value" "LoW Pixels")
SF-OPTION "Brush thickness type" (list "Path length divided by BT value" "BT Pixels")
(define FACTOR_IN_ABSOLUTE_PIXELS 1)
(define FACTOR_RELATIVE_TO_PATH_LENGTH 0)

These notes last updated: 08/05/2021

You might also like