Scanline version is working with borders!

The implementation is passing the Matlab verification script.