Login Register Wishes Forum About
Language Reference » Misc functions » drawAreaMirror
Help topics
Latest updates
4669d  replaceImageMapTitle
4669d  replaceImageMapValues
4669d  createFunctionSerie
4669d  setAbsicssaPosition
4669d  negateValues
  Download as PDF
  Print this page
  Share this page
  Create an account
  Feed the updates!
Google AdSense
drawAreaMirror - Mirror one part of the picture

This function allows you to mirror one part of the picture to do some nice looking reflexion effects on your charts.

Calling this function
Where :

X,Y are the zone starting positiong.
Width is the width of the zone to mirror.
Height is the heightof the zone to mirror.
Format is an array containing the additional parameters.

Customisation array - Enhance rendering!

It is possible to customize the way your mirrir area will be rendered by playing with this array. Providing a detailled configuration is not mandatory.

You can specify the starting alpha value with StartAlpha. (default is 80)
You can specify the ending alpha value with EndAlpha. (default is 0)[/

Sample script

 /* pChart library inclusions */ 

 /* Create and populate the pData object */ 
 $MyData = new pData();   
 $MyData->addPoints(array(150,220,300,250,420,200,300,200,100),"Server A"); 
 $MyData->addPoints(array(140,0,340,300,320,300,200,100,50),"Server B"); 

 /* Create the pChart object */ 
 $myPicture = new pImage(700,230,$MyData); 

 /* Turn of Antialiasing */ 
 $myPicture->Antialias = FALSE; 

 /* Add a border to the picture */ 

 /* Set the default font */ 
 /* Define the chart area */ 

 /* Draw the scale */ 
 $scaleSettings = array("GridR"=>200,"GridG"=>200,"GridB"=>200,"DrawSubTicks"=>TRUE,"CycleBackground"=>TRUE);

 /* Write the chart legend */ 
 /* Turn on shadow computing */  
 /* Draw the chart */ 
 $settings = array("Surrounding"=>-30,"InnerSurrounding"=>30,"Interleave"=>0); 

 /* Draw the bottom black area */ 

 /* Do the mirror effect */ 

 /* Draw the horizon line */ 

 /* Render the picture (choose the best way) */ 

This will print 45.
Last updated on 09/09/2011 
by Jean-Damien 
Linked resources
  There is no linked topic yet.
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.