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

Source for file text.php

Documentation is available at text.php

  1. <?php
  2.  
  3. require_once('Image/3D.php');
  4.  
  5. $world = new Image_3D();
  6. $world->setColor(new Image_3D_Color(240, 240, 240));
  7.  
  8. $light = $world->createLight('Light', array(-20, -20, -20));
  9. $light->setColor(new Image_3D_Color(100, 100, 255));
  10.  
  11. $text = $world->createObject('text', 'Image_3D_Object_Text');
  12. $text->setColor(new Image_3D_Color(150, 150, 150));
  13. $text->transform($world->createMatrix('Rotation', array(0, 10, 0)));
  14. $text->transform($world->createMatrix('Move', array(-50, 0, 20)));
  15. $text->transform($world->createMatrix('Scale', array(3, 3, 3)));
  16.  
  17. $world->setOption(Image_3D::IMAGE_3D_OPTION_BF_CULLING, false);
  18. $world->setOption(Image_3D::IMAGE_3D_OPTION_FILLED, true);
  19.  
  20. $world->createRenderer('perspectively');
  21. $world->createDriver('GD');
  22. $world->render(400, 50, 'Image_3D_Object_Text.png');
  23.  
  24. echo $world->stats( );

Documentation generated on Mon, 11 Mar 2019 15:48:15 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.