public static System.Drawing.Point ToPoint(this PointF p)
{
try
{
int x = (int)p.X < 0 ? 0 : (int)p.X;
int y = (int)p.Y < 0 ? 0 : (int)p.Y;
return new System.Drawing.Point(x, y);
}
catch (Exception e)
{
Console.WriteLine(e);
}
return new System.Drawing.Point(0, 0);
}