Label.php 787 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. namespace smusatov\bzb2u;
  3. class Label
  4. {
  5. protected int $width;
  6. protected int $height;
  7. protected int $gap;
  8. public function __construct(int $width, int $height, int $gap)
  9. {
  10. $this->width = $width;
  11. $this->height = $height;
  12. $this->gap = $gap;
  13. }
  14. public function getWidth(): int
  15. {
  16. return $this->width;
  17. }
  18. public function getWidthDots(): int
  19. {
  20. return $this->width * 8;
  21. }
  22. public function getHeight(): int
  23. {
  24. return $this->height;
  25. }
  26. public function getHeightDots(): int
  27. {
  28. return $this->height * 8;
  29. }
  30. public function getGap(): int
  31. {
  32. return $this->gap;
  33. }
  34. public function getGapDots(): int
  35. {
  36. return $this->gap * 8;
  37. }
  38. }