public override bool Equals(object obj)
{
if (obj is Scanline)
{
Scanline rhs = (Scanline)obj;
return x == rhs.x && y == rhs.y && length == rhs.length;
}
else
{
return false;
}
}