Page 1 of 1

Drawing outline inside box. How are coordinates set up?

Posted: 2011-01-11T05:11:16-07:00
by aLabelMaker
I am trying to draw a box inside a canvas that measures 600x263. The size of box I am trying to draw inside measures 594x257. When I put in this code, everything is good except there is no bottom of the box. It just draws a line on the top and both sides leaving the bottom blank. How do I complete and close the box? How are the coordinates set up in IM? (X,Y)?

convert -size 600x263 xc:white -stroke black
-linewidth 3 -fill white -draw "rectangle 3,3 597,597"
cv.png

Thanks for your help. I am new to IM.

Re: Drawing outline inside box. How are coordinates set up?

Posted: 2011-01-11T05:43:45-07:00
by Bonzo
That is because your bottom line is outside the original box.

Original box is 600x263

New rectangle is 594 x 594 offset 3px from top left corner

Try 3,3 597,260

First two numbers are the start point of the box and the second two numbers are the end point. Both measured from the top left corner which is 0,0