Image_Tools
[ class tree: Image_Tools ] [ index: Image_Tools ] [ all elements ]

Source for file marquee.php

Documentation is available at marquee.php

  1. <?php
  2. /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker */
  3. // CVS: $Id: marquee.php,v 1.1 2005/10/02 17:53:00 firman Exp $
  4.  
  5. /**
  6.  * Load Image_Tools marquee tool
  7.  */
  8. require_once 'Image/Tools.php';
  9.  
  10. // Create destination image when masked sample image will be draw.
  11. $filename 'images/master.png';
  12. $destImage imagecreatefrompng($filename);
  13.  
  14. // Sets sample image, x position and y position.
  15. $options = array(
  16.     'image'     => $destImage,
  17.     'sample'    => 'images/pear.png',
  18.     'x'         => 10,
  19.     'y'         => 10
  20. );
  21.  
  22. // Create new Image_Tools_Marquee object instance
  23. $toolMarquee =Image_Tools::factory('marquee'$options);
  24. if (PEAR::isError($toolMarquee)) {
  25.     die($toolMarquee->toString());
  26. }
  27.  
  28. // Sets rectangle marquee
  29. $toolMarquee->setRectangleMarquee(10104040);
  30.  
  31. // Apply marquee to the image and send it to browser
  32. $err $toolMarquee->display();
  33. if (PEAR::isError($err)) {
  34.     die($err->toString());
  35. }
  36.  
  37. /*
  38.  * Local variables:
  39.  * mode: php
  40.  * tab-width: 4
  41.  * c-basic-offset: 4
  42.  * c-hanging-comment-ender-p: nil
  43.  * End:
  44.  */
  45. ?>

Documentation generated on Thu, 23 Nov 2006 18:00:05 -0500 by phpDocumentor 1.3.0. PEAR Logo Copyright © PHP Group 2004.