- final int screenYMax = endRes - startRes;
- int blockStart = startRes;
- int blockEnd = endRes;
-
- if (av.hasHiddenColumns())
- {
- HiddenColumns hidden = av.getAlignment().getHiddenColumns();
- for (int[] region : hidden.getHiddenColumnsCopy())
- {
- int hideStart = region[0];
- int hideEnd = region[1];
-
- 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(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 == hideStart - 1)
- {
- g1.setColor(Color.blue);
- g1.drawLine((blockEnd - blockStart + 1) * avcharWidth - 1,
- 0 + offset, (blockEnd - blockStart + 1) * avcharWidth
- - 1, (endSeq - startSeq + 1) * avcharHeight
- + offset);
- }