185 var savedColor = gfx.getColor |
185 var savedColor = gfx.getColor |
186 var e = prover.document.getNextCommandContaining(fromCurrent(start)) |
186 var e = prover.document.getNextCommandContaining(fromCurrent(start)) |
187 |
187 |
188 //Encolor Phase |
188 //Encolor Phase |
189 while (e != null && toCurrent(e.start) < end) { |
189 while (e != null && toCurrent(e.start) < end) { |
190 val begin = Math.max(start, toCurrent(e.start)) |
190 val begin = start max toCurrent(e.start) |
191 val finish = Math.min(end - 1, toCurrent(e.stop)) |
191 val finish = end - 1 min toCurrent(e.stop) |
192 encolor(gfx, y, fm.getHeight, begin, finish, chooseColor(e)) |
192 encolor(gfx, y, fm.getHeight, begin, finish, chooseColor(e)) |
193 // paint details of command |
193 // paint details of command |
194 var dy = 0 |
194 var dy = 0 |
195 for(status <- e.statuses){ |
195 for(status <- e.statuses){ |
196 dy += 1 |
196 dy += 1 |
197 val begin = Math.max(start, toCurrent(status.start + e.start)) |
197 val begin = toCurrent(status.start + e.start) |
198 val finish = Math.min(end - 1, toCurrent(status.stop + e.start)) |
198 val finish = toCurrent(status.stop + e.start) |
199 encolor(gfx, y + dy, fm.getHeight - dy, begin, finish, chooseColor(status.kind)) |
199 if(finish > start && begin < end) |
|
200 encolor(gfx, y + dy, fm.getHeight - dy, begin max start, finish min end, chooseColor(status.kind)) |
200 } |
201 } |
201 e = e.next |
202 e = e.next |
202 } |
203 } |
203 |
204 |
204 gfx.setColor(savedColor) |
205 gfx.setColor(savedColor) |