// System.err.println("sorting: " + sl.size());
Transition [] segs = new Transition[sl.size()*2];
Iterator iter = sl.iterator();
int i=0;
while (iter.hasNext()) {
Segment seg = (Segment)iter.next();
segs[i++] = new Transition(seg.minX(), true);
segs[i++] = new Transition(seg.maxX(), false);
// System.err.println("Seg: " + seg.minX() + ", " + seg.maxX());
}
Arrays.sort(segs, TransitionComp.COMP);
validRanges = new ArrayList();