GenericBoundable.cs 839 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Drawing;
  6. #pragma warning disable
  7. namespace Svg
  8. {
  9. internal class GenericBoundable : ISvgBoundable
  10. {
  11. private RectangleF _rect;
  12. public GenericBoundable(RectangleF rect)
  13. {
  14. _rect = rect;
  15. }
  16. public GenericBoundable(float x, float y, float width, float height)
  17. {
  18. _rect = new RectangleF(x, y, width, height);
  19. }
  20. public System.Drawing.PointF Location
  21. {
  22. get { return _rect.Location; }
  23. }
  24. public System.Drawing.SizeF Size
  25. {
  26. get { return _rect.Size; }
  27. }
  28. public System.Drawing.RectangleF Bounds
  29. {
  30. get { return _rect; }
  31. }
  32. }
  33. }
  34. #pragma warning restore