changed line variants to use Rectangle2D instead of just Rectangle