Bounds.cs 861 B

12345678910111213141516171819202122232425262728293031323334
  1. //Apache2, 2017-present, WinterDev
  2. //Apache2, 2014-2016, Samuel Carlsson, WinterDev
  3. namespace Typography.OpenFont
  4. {
  5. /// <summary>
  6. /// original glyph bounds
  7. /// </summary>
  8. public readonly struct Bounds
  9. {
  10. //TODO: will be changed to => public readonly struct Bounds
  11. public static readonly Bounds Zero = new Bounds(0, 0, 0, 0);
  12. public Bounds(short xmin, short ymin, short xmax, short ymax)
  13. {
  14. XMin = xmin;
  15. YMin = ymin;
  16. XMax = xmax;
  17. YMax = ymax;
  18. }
  19. public short XMin { get; }
  20. public short YMin { get; }
  21. public short XMax { get; }
  22. public short YMax { get; }
  23. #if DEBUG
  24. public override string ToString()
  25. {
  26. return "(" + XMin + "," + YMin + "," + XMax + "," + YMax + ")";
  27. }
  28. #endif
  29. }
  30. }