Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
I can't figure out which values I have to use for x0,y0 x1,y1 to draw a circle of a defined size.
I often get circles that are somehow cut off.
E.g I want to draw a circle with a radius of 8 and the center at 23,30. I tried:
The method you were using to create a circle is correct. If the circle is getting cut off then something else is wrong.
Can you give an example command and the resulting image? And which version of ImageMagick are you using?
When saving the result of the above command as png-file I saw, that the resulting circle is not cut off.
Only in x: it looks like an octagon.
Anyhow. I am not sure what the x0,y0 x1,y1 values really are.
I think x0,y0 are the coordinates of rhe center of the circle.
Can x1,y1 be any point on the diameter of the circle?
When I tried your code I also created a Octogen. It only happens if I save to jpg; if I save to png its OK.
This must be due to jpg not supporting transparency.
Yes. And it is also strange that X-Windows can handle transparency when you open files with transparency (e.g png files) but not when you specify x: as filename.
There are other ways of drawing circles and even ellipses. some are center basied, other arc based, or even path basied. See IM Examples, Drawing for all the primatives and SVG path methods.