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.ToString() }, Height={ Height.ToString() }";
52 public override int GetHashCode()
54 return new { Width, Height }.GetHashCode();
57 public override bool Equals(object obj)
59 return obj is Size && this == (Size)obj;
62 public static bool operator ==(Size lhs, Size rhs)
64 return lhs.Width == rhs.Width && lhs.Height == rhs.Height;
67 public static bool operator !=(Size lhs, Size rhs)