Reimplemented scanline to ignore points outside the screen.