aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/Drawing/ImageDimensions.cs
blob: e7805ac494cdaef726f98b58c60681a7efe528b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
namespace MediaBrowser.Model.Drawing
{
    /// <summary>
    /// Struct ImageDimensions
    /// </summary>
    public struct ImageDimensions
    {
        /// <summary>
        /// Gets or sets the height.
        /// </summary>
        /// <value>The height.</value>
        public int Height { get; set; }

        /// <summary>
        /// Gets or sets the width.
        /// </summary>
        /// <value>The width.</value>
        public int Width { get; set; }

        public bool Equals(ImageDimensions size)
        {
            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)
        {
            Width = width;
            Height = height;
        }
    }
}