You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jellyfin/MediaBrowser.Model/Drawing/ImageDimensions.cs

47 lines
1.0 KiB

#pragma warning disable CS1591
#pragma warning disable SA1600
using System.Globalization;
6 years ago
namespace MediaBrowser.Model.Drawing
{
/// <summary>
/// Struct ImageDimensions.
6 years ago
/// </summary>
public readonly struct ImageDimensions
6 years ago
{
public ImageDimensions(int width, int height)
{
Width = width;
Height = height;
}
6 years ago
/// <summary>
/// Gets the height.
6 years ago
/// </summary>
/// <value>The height.</value>
public int Height { get; }
6 years ago
/// <summary>
/// Gets the width.
6 years ago
/// </summary>
/// <value>The width.</value>
public int Width { get; }
6 years ago
public bool Equals(ImageDimensions size)
6 years ago
{
return Width.Equals(size.Width) && Height.Equals(size.Height);
}
/// <inheritdoc />
6 years ago
public override string ToString()
{
return string.Format(
CultureInfo.InvariantCulture,
"{0}-{1}",
Width,
Height);
6 years ago
}
}
}