Thanks for the reply Pete,

That got me a bit closer, but... try it with a stroke width of 7 and a  
-size of 2rx2r.. and you'll see the problem :)
I want the final image size to perfectly fit the outer edge of the  
stroke

I can come close using your formula slightly modified. The problem is  
that the strokewidth causes the resulting circle to be bigger than  
than the radius specifed. It seems to me that the stroke is centered  
on the circumference, so that if it is 8 pixel stroke, 4 will be  
inside the specified radius and 4 outside (not sure what happens for  
odd stroke widths!). Which means that the image size and x,y needs to  
be adjusted by half the stroke width.

...so here's an example with strokewidth 8 and radius 30.

convert -size 64x64 xc:skyblue -fill white -stroke black -strokewidth  
8 -draw "circle 32,32,60,32" /tmp/test.gif

... which comes pretty close, but the bottom and right edges of the  
image are missing a pixel of width.. so the resulting image looks  
truncated.


How can I correct for this?



Cheers,
Noel







On 21 Aug 2008, at 17:15, Pete Whatever wrote:

> Hi Noel
> A circle is specified as the coordinate of its centre and then a  
> coordinate on the circumference. So for a circle of radius "r",  
> centred at x,y you can specify it as:
>
> x,y x+r,y
>
>
> Best Wishes
> Pete
>
>
>
>
>

Lead Developer
Magnet Harlequin

T: 01895 432400
F: 01895 432444
E: [EMAIL PROTECTED]
W: http://www.magharl.co.uk

This e-mail is intended solely for the addressees named above and any  
other
use is prohibited. Access to this email by anyone else is  
unauthorised. It
may contain confidential information. If you have received this e-mail  
in
error, please contact the sender by return e-mail. We do not accept  
legal
responsibility for the contents of this message if it has reached you  
via
the internet. Any opinions expressed are those of the author and are not
necessarily endorsed by the company. Recipients are advised to apply  
their
own virus check to this message and all incoming e-mail on delivery.



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

Reply via email to