public static bool IsNullOrEmpty(Rectangle2D rect)
{
if (rect == null)
{
return true;
}
if (rect._x == double.NegativeInfinity || rect._y == double.NegativeInfinity || rect._width == double.NegativeInfinity || rect._height == double.NegativeInfinity)
{
return true;
}
if (rect._width < 0.0 || rect._height < 0.0)
{
return true;
}
return false;
}