Login Register Wishes Forum About
Language Reference » Drawing functions » drawCircle
Help topics
Latest updates
4600d  replaceImageMapTitle
4600d  replaceImageMapValues
4600d  createFunctionSerie
4600d  setAbsicssaPosition
4600d  negateValues
  Download as PDF
  Print this page
  Share this page
  Create an account
  Feed the updates!
Google AdSense
drawCircle - Circles

This function allows you to draw circles. It is possible to tune the rendering by playing with the $Format array. To learn more about this please read the Format array guide. This functions are supporting anti-alias and shadows.

Calling this function
Where :

X1,Y1 are the center coordinate of the circle.
Width is the width of the circle.
Height is the heightof the circle.
Format is an array containing the drawing parameters.

This function can draw an ellipse by using different values for width and height.

Customisation array - Tune up your circle!

It is possible to customize the circle rendering by playing with this array. Providing a detailled configuration is not mandatory, by default the circles will be drawn black with no transparency.

The border color can be set with R, G, B.
The alpha transparency factor can be set with Alpha.
You can draw dashed lines using the Ticks parameter.

Sample script

 /* Left circles with different alpha transparency */
 $myPicture->drawCircle(180,125,50,50, array("R"=>213,"G"=>226,"B"=>0,"Alpha"=>40));

 /* Active shadow support */

 /* Right circles */
 $CircleSettings = array("R"=>209,"G"=>31,"B"=>27,"Alpha"=>100);
 $myPicture->drawCircle(480,60,20,20,$CircleSettings );

 $CircleSettings = array("R"=>209,"G"=>125,"B"=>27,"Alpha"=>100);
 $myPicture->drawCircle(480,100,30,20,$CircleSettings );

 $CircleSettings = array("R"=>209,"G"=>198,"B"=>27,"Alpha"=>100,"Ticks"=>4);
 $myPicture->drawCircle(480,140,40,20,$CircleSettings );

 $CircleSettings = array("R"=>134,"G"=>209,"B"=>27,"Alpha"=>100,"Ticks"=>4);
 $myPicture->drawCircle(480,180,50,20,$CircleSettings );

This will draw some transparency test on the left side of the picture and 4 colored boxes on the right. Shadow support is enabled on a (+1,+1) basis.
Last updated on 11/05/2009 
by Jean-Damien 
Linked resources
Community comments
  No comments have been posted yet.
© Copyrights
Components used on this web site : Famfamfam icons has been made by Mark James, Rounded corners lite has been coded by Cameron Cooke and Tim Hutchison, SyntaxHighlighter has been written by Alex Gorbatchev. pChart and this web site have been created by Jean-Damien POGOLOTTI. This documentation contains 185 pages and 56 comments. 415 users have registered. This page has been rendered in 0,01 seconds. Wiki revision 1.37.