ofc_sugar.php 824 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. /**
  3. * Sugar: to make stars easier sometimes
  4. */
  5. class s_star extends star
  6. {
  7. /**
  8. * I use this wrapper for default dot types,
  9. * it just makes the code easier to read.
  10. */
  11. function s_star($colour, $size)
  12. {
  13. parent::star();
  14. $this->colour($colour)->size($size);
  15. }
  16. }
  17. class s_box extends anchor
  18. {
  19. /**
  20. * I use this wrapper for default dot types,
  21. * it just makes the code easier to read.
  22. */
  23. function s_box($colour, $size)
  24. {
  25. parent::anchor();
  26. $this->colour($colour)->size($size)->rotation(45)->sides(4);
  27. }
  28. }
  29. class s_hollow_dot extends hollow_dot
  30. {
  31. /**
  32. * I use this wrapper for default dot types,
  33. * it just makes the code easier to read.
  34. */
  35. function s_hollow_dot($colour, $size)
  36. {
  37. parent::hollow_dot();
  38. $this->colour($colour)->size($size);
  39. }
  40. }