Back to the snippets index

Draw using ellipse ( Anthony 17/6/2008 )

Use Ellipse to draw a partial ellipse centered at the given point with the x-axis and y-axis radius and start and end of arc in degrees.

IM code:

<?php  
$cmd 
" -size 200x200 xc:none -stroke black -strokewidth 1 "
"-fill pink -draw \"ellipse 100,100 62,94 0,360 \" ".
" -fill red -draw \"ellipse 100,120 25,38 45,135\" ".
" -fill white -draw \"ellipse 75,75 19,28 0,360\" ".
" -draw \"ellipse 125,75 19,28 0,360\" ".
"-fill blue -draw \"ellipse 75,75 10,14 0,360\" ".
"-draw \"ellipse 125,75 10,14 0,360\" "
exec("convert $cmd output.png"); 
?> 

Image to go with Draw using ellipse example code
Draw concentric circles
Draw polyline
Draw rectangle
Draw using ellipse