Files
Electron.NET/src/ElectronNET.API/API/Entities/Rectangle.cs

50 lines
1.3 KiB
C#
Raw Normal View History

2017-10-15 21:39:52 +02:00
namespace ElectronNET.API.Entities
{
/// <summary>
///
/// </summary>
/// <remarks>Up-to-date with Electron API 39.2</remarks>
2017-10-15 21:39:52 +02:00
public class Rectangle
{
/// <summary>
/// Gets or sets the x.
/// </summary>
/// <value>
/// The x.
/// </value>
2017-10-15 21:39:52 +02:00
public int X { get; set; }
/// <summary>
/// Gets or sets the y.
/// </summary>
/// <value>
/// The y.
/// </value>
2017-10-15 21:39:52 +02:00
public int Y { get; set; }
/// <summary>
/// Gets or sets the width.
/// </summary>
/// <value>
/// The width.
/// </value>
2017-10-15 21:39:52 +02:00
public int Width { get; set; }
/// <summary>
/// Gets or sets the height.
/// </summary>
/// <value>
/// The height.
/// </value>
2017-10-15 21:39:52 +02:00
public int Height { get; set; }
/// <summary>
/// Convert this <see cref="Rectangle"/> to <see cref="System.Drawing.Rectangle"/>.
/// </summary>
/// <param name="rectangle">The rectangle.</param>
public static implicit operator System.Drawing.Rectangle(Rectangle rectangle)
{
return new System.Drawing.Rectangle(rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height);
}
2017-10-15 21:39:52 +02:00
}
}