jellyfin/MediaBrowser.Model/Drawing/ImageDimensions.cs

37 lines
874 B
C#
Raw Normal View History

2018-12-27 23:27:57 +00:00
namespace MediaBrowser.Model.Drawing
{
/// <summary>
/// Struct ImageDimensions
2018-12-27 23:27:57 +00:00
/// </summary>
public struct ImageDimensions
2018-12-27 23:27:57 +00:00
{
/// <summary>
/// Gets or sets the height.
/// </summary>
/// <value>The height.</value>
public int Height { get; set; }
2018-12-27 23:27:57 +00:00
/// <summary>
/// Gets or sets the width.
/// </summary>
/// <value>The width.</value>
public int Width { get; set; }
2018-12-27 23:27:57 +00:00
public bool Equals(ImageDimensions size)
2018-12-27 23:27:57 +00:00
{
return Width.Equals(size.Width) && Height.Equals(size.Height);
}
public override string ToString()
{
return string.Format("{0}-{1}", Width, Height);
}
public ImageDimensions(int width, int height)
2018-12-27 23:27:57 +00:00
{
Width = width;
Height = height;
2018-12-27 23:27:57 +00:00
}
}
}