On Sat, 22 Aug 2009 15:46:06 +1000 (EST) "damien dunlop" <[email protected]> wrote:
| # The following creates an arrow head with a tail. | # Benefits: looks OK, can be easily located by adjusting | # the coordinates of -region, can be easily rotated, can be | # easily scaled, tail attached to head. | # Disadvantage: To change the length of the tail, a value | # has to be changed in three places (-region, twice in polyline) | | | convert A.gif -region 82x200+50+50 \ | -draw 'polyline 0,100 82,100 41,0' \ | -draw 'polyline 39,100 39,200 43,200 43,100' \ | -rotate -30 -scale 200x200 B.gif | | # Are there better ways? | | | Damien | Certainally there are better ways. Use a SVG draw "path" with relative offsets. that is the coordinates for each line is relative to the previous coordinate. That way you don't need a -region, you only need to 'move' to the first coordinate as all the other drawing is relative. See Drawing Symbols in IM Examples http://www.imagemagick.org/Usage/draw/#symbols All you need is create fixed 'symbol' strings to insert into the draw. Another alternative is draw the symbol relative to position 0,0 and then add translates, rotates and scales before drawing the symbol. That way you can not only position but you can rotate and scale the symbol about the 0,0 point. This has NOT been examples in the above section! At least not yet. Anthony Thyssen ( System Programmer ) <[email protected]> ----------------------------------------------------------------------------- Science, technology, and biology all use the woven rope of reality. Magic, on the other hand, functions by reweaving the fabric of reality. -- Margret Weis & Tracy Hickman - "Dragon Wing" ----------------------------------------------------------------------------- Anthony's Home is his Castle http://www.cit.gu.edu.au/~anthony/ _______________________________________________ Magick-users mailing list [email protected] http://studio.imagemagick.org/mailman/listinfo/magick-users
