Login Register Wishes Forum About
Language Reference » Settings functions » setShadow
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
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
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 */

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

 /* Draw a filled rectangle */
 $formSettings = array("R"=>231,"G"=>197,"B"=>40,"Alpha"=>100,"Surrounding"=>30);

 /* Draw a filled rectangle with rounded corners */
 $formSettings = array("R"=>231,"G"=>102,"B"=>40,"Alpha"=>100,"Surrounding"=>30);

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,01 seconds. Wiki revision 1.37.