I tried to draw a circle whith the docummentation.
Draw a circle center at 500,500 whith 250 pixel radio. According to the documentation this would be the Right Way:
convert -size 1000x1000 xc:white -fill blue -draw "circle 500,500,750,750" draw_circle.png
If you look at the image you will see that is not correct, the circle that has drawn more than 250 radio pixel.
The value to be set in X2 and Y2 is the center plus the radius match the square root of 2. That is, the center plus multiply the radius by 0.7010681237. In this case the values of X2 and Y2 are :
X2=Y2=500+0.7010681237*250=676.7 that's aprox. 677 pixel
convert -size 1000x1000 xc:white -fill blue -draw "circle 500,500,677,677" draw_circle_ok.png
If you look at the resulting image you will see that the circle has a radius of 250 pixel and in this case is correct.
Thanks , imagemagick is a very good program .
Problem drawing Circles
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Problem drawing Circles
The documentation http://www.imagemagick.org/script/comma ... s.php#draw says:
You need the centre eg 500,500 and one point on the circle eg 750,500.The circle primitive makes a disk (filled) or circle (unfilled). Give the center and any point on the perimeter (boundary).
snibgo's IM pages: im.snibgo.com
Re: Problem drawing Circles
I understand. Whell that's ok, then no problem.
Thank's
Thank's