Page 1 of 1
How to create simply arrow - second edition
Posted: 2012-11-12T11:38:52-07:00
by rozowykubek
Hey
preface&task number 1
To be honest my lecturer gave me weird task in exchange for possibility to leave his classes without any consequences (i am college student and in december i want to go abroad for a month ) it has to be ImageMagick whose i did not know until yesterday
Task 1 - completed
Re: How to create simply arrow by using common command promp
Posted: 2012-11-12T11:47:04-07:00
by Bonzo
You can draw multiple lines one after the other and you know where the end of the horizontal line is.
Re: How to create simply arrow by using common command promp
Posted: 2012-11-12T11:48:09-07:00
by glennrp
Why not simply draw 3 lines?
Re: How to create simply arrow by using common command promp
Posted: 2012-11-12T12:19:08-07:00
by rozowykubek
i was so absorbed with understanding commands et cetera that i did not think about such brilliant solution
Re: How to create simply arrow - second edition
Posted: 2012-11-16T15:47:19-07:00
by rozowykubek
With your briliant and trival at the same time solution
i was able to survive face to face encounter with my lecturer, but he gone further and gave me another, more complicated arrow quest. If I understood him correctly i have to make "arrow head" pattern which I could generate on the end of earlier created line. I Assume it has to look similar to example down below
Question is, is it possible to do it without using of external application like Bash for example ? and if, with which command should I get closer ?
He ( lecturer ) was talking something about "stroke" and making arrowhead by using just command prompt -.-
Thank you for any tips
arrow_head="l -15,-5 +5,+5 -5,+5 +15,-5 z"
convert -size 100x60 xc: -draw 'line 10,30 80,30' \
-draw "stroke blue fill skyblue
path 'M 80,30 $arrow_head' " \
arrow_horizontal.gif
Re: How to create simply arrow - second edition
Posted: 2012-11-16T17:15:15-07:00
by fmw42
Re: How to create simply arrow - second edition
Posted: 2012-11-17T00:40:05-07:00
by rozowykubek
ok, finally I made it in bash and it looks like this:
#!/bin/bash
echo 'rysujemy glowe strzalki'
arrow_head="path 'M 0,0 l -15,-5 +5,+5 -5,+5 +15,-5 z'"
convert test.jpeg -draw 'line 40,100 200,180' \
-draw "stroke blue fill skyblue
translate 200,180 rotate -45 $arrow_head' " \
test_arrow.jpeg
echo 'narysowana'
Is that possible to do the same but in semi-automatic way without using every time "rotate" command ?
I would like "arrow head" following after the main line but I do not see something like this in examples
Re: How to create simply arrow - second edition
Posted: 2012-11-19T05:41:01-07:00
by whugemann
Strange arrow head that you are drawing here ... I'm not sure what you mean by the arrow head following the main line, but what I would rather do is to define the entire arrow as one polygon object and then place it in its entirety by using translate (and possibly rotate) before drawing that object.