AirScout/AeroWizard/AeroWizard/Native/SIZE.cs

27 wiersze
519 B
C#
Czysty Zwykły widok Historia

2019-03-19 21:09:03 +00:00
using System.Drawing;
using System.Runtime.InteropServices;
namespace Vanara.Interop
{
internal static partial class NativeMethods
{
[StructLayout(LayoutKind.Sequential)]
public struct SIZE
{
public int width;
public int height;
public SIZE(int w, int h)
{
width = w; height = h;
}
public Size ToSize() => this;
public static implicit operator Size(SIZE s) => new Size(s.width, s.height);
public static implicit operator SIZE(Size s) => new SIZE(s.Width, s.Height);
}
}
}