ImageDimensions.cs 938 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #pragma warning disable CS1591
  2. #pragma warning disable SA1600
  3. namespace MediaBrowser.Model.Drawing
  4. {
  5. /// <summary>
  6. /// Struct ImageDimensions.
  7. /// </summary>
  8. public struct ImageDimensions
  9. {
  10. /// <summary>
  11. /// Gets or sets the height.
  12. /// </summary>
  13. /// <value>The height.</value>
  14. public int Height { get; set; }
  15. /// <summary>
  16. /// Gets or sets the width.
  17. /// </summary>
  18. /// <value>The width.</value>
  19. public int Width { get; set; }
  20. public bool Equals(ImageDimensions size)
  21. {
  22. return Width.Equals(size.Width) && Height.Equals(size.Height);
  23. }
  24. public override string ToString()
  25. {
  26. return string.Format("{0}-{1}", Width, Height);
  27. }
  28. public ImageDimensions(int width, int height)
  29. {
  30. Width = width;
  31. Height = height;
  32. }
  33. }
  34. }