int blockEnd = endRes;
HiddenColumns hidden = av.getAlignment().getHiddenColumns();
- Iterator<int[]> regions = hidden.getBoundedVisRegionIterator(startRes,
- endRes);
+ Iterator<int[]> regions = hidden.iterator();
while (regions.hasNext())
{
int[] region = regions.next();
+ int hideStart = region[0];
+ int hideEnd = region[1];
- blockStart = region[0];
+ if (hideStart <= blockStart)
+ {
+ blockStart += (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(region[1], blockStart + screenYMax - screenY);
-
+ blockEnd = Math.min(hideStart - 1,
+ blockStart + screenYMax - screenY);
g1.translate(screenY * avcharWidth, 0);
draw(g1, blockStart, blockEnd, startSeq, endSeq, offset);
* draw the downline of the hidden column marker (ScalePanel draws the
* triangle on top) if we reached it
*/
- if (av.getShowHiddenMarkers() && blockEnd == region[1])
+ if (av.getShowHiddenMarkers() && blockEnd == hideStart - 1)
{
g1.setColor(Color.blue);
g1.drawLine((blockEnd - blockStart + 1) * avcharWidth - 1,
g1.translate(-screenY * avcharWidth, 0);
screenY += blockEnd - blockStart + 1;
+ blockStart = hideEnd + 1;
if (screenY > screenYMax)
{
return;
}
}
+
if (screenY <= screenYMax)
{
// remaining visible region to render
- blockEnd = blockStart + (endRes - startRes) - screenY;
+ blockEnd = blockStart + screenYMax - screenY;
g1.translate(screenY * avcharWidth, 0);
draw(g1, blockStart, blockEnd, startSeq, endSeq, offset);
g1.translate(-screenY * avcharWidth, 0);
}
}
-
}
// int startRes, int endRes, int startSeq, int endSeq, int x, int y,