ModuleInterface.php 491 B

123456789101112131415161718
  1. <?php
  2. declare(strict_types = 1);
  3. namespace BaconQrCode\Renderer\Module;
  4. use BaconQrCode\Encoder\ByteMatrix;
  5. use BaconQrCode\Renderer\Path\Path;
  6. /**
  7. * Interface describing how modules should be rendered.
  8. *
  9. * A module always receives a byte matrix (with values either being 1 or 0). It returns a path, where the origin
  10. * coordinate (0, 0) equals the top left corner of the first matrix value.
  11. */
  12. interface ModuleInterface
  13. {
  14. public function createPath(ByteMatrix $matrix) : Path;
  15. }