float lasty = tileBox.getPixYFromLatLon(pt.lat, pt.lon);

int size = culled.size();</BUG>
for (int i = 1; i < size; i++) {
<BUG>pt = culled.get(i);

float x = tileBox.getPixXFromLatLon(pt.lat, pt.lon);

float y = tileBox.getPixYFromLatLon(pt.lat, pt.lon);

if (Math.min(x, lastx) < clipR && Math.max(x, lastx) > clipL
&& Math.min(y, lasty) < clipT && Math.max(y, lasty) > clipB) {</BUG>
paint.setColor(pt.colourARGB);

if (Math.min(x, lastx) < clipR && Math.max(x, lastx) > clipL
&& Math.min(y, lasty) < clipT && Math.max(y, lasty) > clipB) {
float segment = intp & 15;
if (segment < 5) {
paint.setColor(internal ? Algorithms.getRainbowColor(((double) (i)) / ((double) size)) : Color.BLACK);
float segpiece = 5 - segment;
if (segpiece > 3)
segpiece = 3;
if (!broken) {
float sw = stroke * segpiece * scale;
paint.setStrokeWidth(sw);
