mirror of
https://github.com/greenshot/greenshot
synced 2025-08-21 05:53:27 -07:00
A bit of refactoring to be able to find some issue...
This commit is contained in:
parent
bef29df3db
commit
42cd533862
308 changed files with 2705 additions and 2454 deletions
37
GreenshotPlugin/UnmanagedHelpers/Structs/POINT.cs
Normal file
37
GreenshotPlugin/UnmanagedHelpers/Structs/POINT.cs
Normal file
|
@ -0,0 +1,37 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace GreenshotPlugin.UnmanagedHelpers.Structs
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential), Serializable()]
|
||||
public struct POINT {
|
||||
public int X;
|
||||
public int Y;
|
||||
|
||||
public POINT(int x, int y) {
|
||||
X = x;
|
||||
Y = y;
|
||||
}
|
||||
public POINT(Point point) {
|
||||
X = point.X;
|
||||
Y = point.Y;
|
||||
}
|
||||
|
||||
public static implicit operator Point(POINT p) {
|
||||
return new Point(p.X, p.Y);
|
||||
}
|
||||
|
||||
public static implicit operator POINT(Point p) {
|
||||
return new POINT(p.X, p.Y);
|
||||
}
|
||||
|
||||
public Point ToPoint() {
|
||||
return new Point(X, Y);
|
||||
}
|
||||
|
||||
public override string ToString() {
|
||||
return X + "," + Y;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue