31 lines
600 B
C#
31 lines
600 B
C#
using System.Runtime.InteropServices;
|
|
|
|
namespace OBSBlur.Window;
|
|
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
public struct Point
|
|
{
|
|
public int X;
|
|
public int Y;
|
|
|
|
public Point(int x, int y)
|
|
{
|
|
this.X = x;
|
|
this.Y = y;
|
|
}
|
|
|
|
public static implicit operator System.Drawing.Point(Point p)
|
|
{
|
|
return new System.Drawing.Point(p.X, p.Y);
|
|
}
|
|
|
|
public static implicit operator Point(System.Drawing.Point p)
|
|
{
|
|
return new Point(p.X, p.Y);
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
return $"{{X={X,-7:####0}, Y={Y,-7:####0}}}";
|
|
}
|
|
} |