int screenY = 0;
final int screenYMax = endRes - startRes;
int blockStart = startRes;
- int blockEnd = endRes;
+ int blockEnd = endRes; // equals blockStart + screenYMax - screenY;
HiddenColumns hidden = av.getAlignment().getHiddenColumns();
Iterator<int[]> regions = hidden.iterator();
if (hideStart <= blockStart)
{
blockStart += (hideEnd - hideStart) + 1;
+ blockEnd += (hideEnd - hideStart) + 1;
continue;
}
* draw up to just before the next hidden region, or the end of
* the visible region, whichever comes first
*/
- blockEnd = Math.min(hideStart - 1,
- blockStart + screenYMax - screenY);
+ blockEnd = Math.min(blockEnd, hideStart - 1);
g1.translate(screenY * avcharWidth, 0);
draw(g1, blockStart, blockEnd, startSeq, endSeq, offset);
g1.translate(-screenY * avcharWidth, 0);
screenY += blockEnd - blockStart + 1;
blockStart = hideEnd + 1;
+ blockEnd = blockStart + screenYMax - screenY;
if (screenY > screenYMax)
{
if (screenY <= screenYMax)
{
// remaining visible region to render
- blockEnd = blockStart + screenYMax - screenY;
g1.translate(screenY * avcharWidth, 0);
draw(g1, blockStart, blockEnd, startSeq, endSeq, offset);
-
g1.translate(-screenY * avcharWidth, 0);
}
}