Thanks to Anthony for the original response to
`Arrow Heads'. I found the SVG method not entirely
satisfactory and then other issues became more important.

# A specific arrow can always be drawn on an image
# by calculation of the coordinates of a rotated triangle
# of an appropriate size and then using the -draw option
# to draw it. To have to do this every time is a nuisance.

# It would be somewhat better if one could draw a standard
# arrow then use the the -rotate and -scale options to
# create the arrow required for any specific application.

# The following illustrates an incomplete approach.
# When an arrow is not drawn directly on an image, but
# is drawn as a standard arrow on its own canvas and then
# rotated and scaled before being pasted onto an image, the
# arrow canvas needs to be transparent so as not to obscure
# those parts of the image under the arrow canvas.
# The example below does not obscure the background colour,
# but it does obscure the horizontal lines drawn on the
# background.

# In addition to problems relating to transparency, the
# following also illustrates one or two other anomalies.
# One such is the region of the -region option does not
# seem to rotate around its NW corner.

# Can the following be fixed or some other method be
# used to create and work with a standard arrow?

convert -size 300x300 xc:skyblue \
        -fill yellow \
        -draw 'line 10,50 290,50' \
        -draw 'line 10,150 290,150' \
        -draw 'line 10,250 290,250' \
        -fill red -draw 'rectangle 100,100 182,250' \
        -channel A -transparent red \
     \( -region 82x150+100+100 \
        -fill black \
        -draw 'polyline 41,150 41,100 82,100 41,0 0,100 41,100' \
        -rotate 30 -scale 50x50 \) \
        -flatten arrow.gif


Damien
CMAD/Discway
634 Bell St
Preston Vic 3072
Ph: (03) 9347 8802
Fx: (03) 9484 1352

_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to