SkRect.cs 482 B

1234567891011121314151617181920212223
  1. using System.Runtime.InteropServices;
  2. namespace QuestPDF.Skia;
  3. [StructLayout(LayoutKind.Sequential)]
  4. internal struct SkRect
  5. {
  6. public float Left;
  7. public float Top;
  8. public float Right;
  9. public float Bottom;
  10. public SkRect(float left, float top, float right, float bottom)
  11. {
  12. Left = left;
  13. Top = top;
  14. Right = right;
  15. Bottom = bottom;
  16. }
  17. public float Width => Right - Left;
  18. public float Height => Bottom - Top;
  19. }