Contents
Login Register Wishes Forum About
Language Reference » Settings functions » setShadow
Help topics
Latest updates
4574d  replaceImageMapTitle
4574d  replaceImageMapValues
4574d  createFunctionSerie
4574d  setAbsicssaPosition
4574d  negateValues
Toolbox
  Download as PDF
  Print this page
  Share this page
  Create an account
  Feed the updates!
Google AdSense
setShadow - Enable / Disable shadow support

Shadow support is one key feature of the 2.0 trunk. This rendering option can globally be applied to all drawing functions. All the shadow parameters are given trough a $Format array. To learn more about this please read the Format array guide.

Only enable shadows when visually required. Using shadows will slow down the rendering speed

Calling this function
setShadow($Enabled=TRUE,$Format="");
Where :

Enabled is either TRUE if you want to activate shadows of FALSE.
Format is an array containing the drawing parameters of the arrow.


Customisation array - Tune up your shadows!

It is possible to customize the shadow rendering by playing with this array. Providing a detailled configuration is not mandatory, by default the shadow will be drawn black with an offset of (+2,+2) and a transparency of 20%.

The shadow offset can be set using X, Y.
The shadow color can be set with R, G, B.
The alpha transparency factor can be set with Alpha.


Sample script



 /* Enable shadow support */
 $myPicture->setShadow(TRUE,array("X"=>2,"Y"=>2,"R"=>0,"G"=>0,"B"=>0,"Alpha"=>20);

 /* Draw a filled circle */
 $formSettings = array("R"=>201,"G"=>230,"B"=>40,"Alpha"=>100,"Surrounding"=>30);
 $myPicture->drawFilledCircle(90,120,30,$formSettings);

 /* Draw a filled rectangle */
 $formSettings = array("R"=>231,"G"=>197,"B"=>40,"Alpha"=>100,"Surrounding"=>30);
 $myPicture->drawFilledRectangle(160,90,280,150,$formSettings);

 /* Draw a filled rectangle with rounded corners */
 $formSettings = array("R"=>231,"G"=>102,"B"=>40,"Alpha"=>100,"Surrounding"=>30);
 $myPicture->drawRoundedFilledRectangle(320,90,440,150,5,$formSettings);

This will draw various basic shapes with a shadow.
Last updated on 10/15/2009 
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,21 seconds. Wiki revision 1.37.