BCGDraw.php 783 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. *--------------------------------------------------------------------
  4. *
  5. * Base class to draw images
  6. *
  7. *--------------------------------------------------------------------
  8. * Copyright (C) Jean-Sebastien Goupil
  9. * http://www.barcodephp.com
  10. */
  11. abstract class BCGDraw {
  12. protected $im;
  13. protected $filename;
  14. /**
  15. * Constructor.
  16. *
  17. * @param resource $im
  18. */
  19. protected function __construct($im) {
  20. $this->im = $im;
  21. }
  22. /**
  23. * Sets the filename.
  24. *
  25. * @param string $filename
  26. */
  27. public function setFilename($filename) {
  28. $this->filename = $filename;
  29. }
  30. /**
  31. * Method needed to draw the image based on its specification (JPG, GIF, etc.).
  32. */
  33. abstract public function draw();
  34. }
  35. ?>