Source for file example_02.php

Documentation is available at example_02.php

  1. <?php
  2. /**
  3. * Rotate Example #02
  4. *
  5. * This example shows how to do a custom rotate by 30 degrees, and we are
  6. * filling the blank areas left by the rotate with a nice green color.
  7. *
  8. * @filesource
  9. * @package Asido.Examples
  10. * @subpackage Asido.Examples.Rotate
  11. */
  12.  
  13. /////////////////////////////////////////////////////////////////////////////
  14.  
  15. /**
  16. * Include the main Asido class
  17. */
  18. include('./../../class.asido.php');
  19.  
  20. /**
  21. * Set the correct driver: this depends on your local environment
  22. */
  23. asido::driver('gd');
  24.  
  25. /**
  26. * Create an Asido_Image object and provide the name of the source
  27. * image, and the name with which you want to save the file
  28. */
  29. $i1 = asido::image('example.png', 'result_02.png');
  30.  
  31. /**
  32. * Rotates the image by 30 degrees
  33. */
  34. Asido::Rotate($i1, 30, Asido::Color(39, 107, 20));
  35.  
  36. /**
  37. * Save the result
  38. */
  39. $i1->save(ASIDO_OVERWRITE_ENABLED);
  40.  
  41. /////////////////////////////////////////////////////////////////////////////
  42.  
  43. ?>

Documentation generated on Mon, 09 Apr 2007 23:57:09 +0300 by phpDocumentor 1.3.0RC4