ImageDimensions.cs 874 B

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