You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: robin
  5. * Date: 11/24/15
  6. * Time: 12:56 PM
  7. */
  8. namespace App\Http\Business\Cameras;
  9. use App\Http\DBO\CamerasDbo;
  10. use Imagine\Image\Box;
  11. use Imagine\Image\Palette\RGB;
  12. use Imagine\Image\Point;
  13. class DummyCamera extends AbstractCamera
  14. {
  15. public function __construct(CamerasDbo $camera)
  16. {
  17. parent::__construct($camera);
  18. $this->_image = $this->_imagine->open("../resources/images/dummy_camera.jpg");
  19. }
  20. public function prepareImage()
  21. {
  22. $draw = $this->_image->draw();
  23. $palette = new RGB();
  24. $radius = rand(10, 42);
  25. $draw->ellipse(new Point(42, 42), new Box($radius, $radius), $palette->color('#ff0000'));
  26. }
  27. }