Contents
Login Register Wishes Forum About
Language Reference » Drawing functions » drawFromGIF
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
drawFromGIF - Add pictures to your charts

This function allows you to add GIF pictures to your charts. If you turn on shadow support before calling this function, the merged picture will be drawn with the specified shadow parameters.

Calling this function
drawFromGIF($X,$Y,$FileName);
Where :

X,Y are the coordinate where will be drawn the top left corner of the picture.
FileName is the path to the picture file.

It is recommended to use PNG files when you want to include pictures into your charts. This is the only real portable format that can handle alpha channels, thus the pictures will look crystal clear.


Sample script



 /* Turn off shadow */
 $myPicture->setShadow(FALSE);
 $myPicture->drawFromPNG(180,50,"resources/computer.gif");

 /* Enable shadow */
 $myPicture->setShadow(TRUE,array("X"=>2,"Y"=>2,"R"=>0,"G"=>0,"B"=>0,"Alpha"=>20)); 
 $myPicture->drawFromPNG(400,50,"resources/computer.gif");

This will draw two pictures, the first one with only transparency channel included in the GIF file and the second one with the internal pChart shadow algorithm.
Last updated on 10/15/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,19 seconds. Wiki revision 1.37.