2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 namespace Tizen.Multimedia
22 /// Initializes a new instance of the Size with the specified values.
24 /// <param name="width">Width of the size.</param>
25 /// <param name="height">Height of the size.</param>
26 public Size(int width, int height)
33 /// Gets or sets the width of the Size.
42 /// Gets or sets the height of the Size.
50 public override string ToString() => $"Width={ Width }, Height={ Height }";
52 public override int GetHashCode()
54 return new { Width, Height }.GetHashCode();
57 public override bool Equals(object obj)
59 if ((obj is Size) == false)
65 return Width == rhs.Width && Height == rhs.Height;
68 public static bool operator ==(Size lhs, Size rhs)
70 return lhs.Equals(rhs);
73 public static bool operator !=(Size lhs, Size rhs)
75 return !lhs.Equals(rhs);