📄 point.cs.svn-base
字号:
using System;
namespace Aspecto.PocketFrog
{
/// <summary>
/// Summary description for Point.
/// </summary>
public class Point
{
private IntPtr uobj;
public IntPtr uObject()
{
return uobj;
}
public Point()
{
IntPtr p = PF.point_create();
if (p.ToInt32() != 0)
uobj = p;
}
public Point(IntPtr iuobj)
{
uobj = iuobj;
}
public Point(int ax, int ay)
{
IntPtr p = PF.point_createfromcoords(ax,ay);
if (p.ToInt32() != 0)
uobj = p;
}
public Point( System.Drawing.Point point )
{
IntPtr p = PF.point_createfromcoords( point.X, point.Y );
if (p.ToInt32() != 0)
uobj = p;
}
public void Set(int ax, int ay)
{
PF.point_set(uobj, ax, ay);
}
public void Translate(int dx, int dy)
{
PF.point_translate(uobj,dx,dy);
}
public static Point operator +(Point p1, Point p2)
{
IntPtr p = PF.point_opoverrideplus(p1.uObject(), p2.uObject());
if (p.ToInt32() == 0)
return null;
else
return new Point(p);
}
}
}
/*
POCKETFROGCWRAPPER_API Point* __stdcall point_create();
POCKETFROGCWRAPPER_API Point* __stdcall point_createfromcoords(int ax, int ay);
//POCKETFROGCWRAPPER_API Point* __stdcall point_create(const POINT& p);
POCKETFROGCWRAPPER_API void __stdcall point_set(Point* pPoint, int ax, int ay);
POCKETFROGCWRAPPER_API void __stdcall point_translate(Point* pPoint, int dx, int dy);
POCKETFROGCWRAPPER_API Point* __stdcall point_opoverrideplus(Point* pPoint, Point* pPointArg);
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -