Scan-line fill algorithm