start += wrappedWidthInResidues;
}
- drawWrappedDecorators(g, canvasHeight, startColumn);
+ drawWrappedDecorators(g, startColumn);
}
/**
/**
* Draws scales left, right and above (if shown), and any hidden column
- * markers, on the wrapped alignment
+ * markers, on all widths of the wrapped alignment
*
* @param g
- * @param ypos
* @param startColumn
- * @param endColumn
*/
- protected void drawWrappedDecorators(Graphics g, int canvasHeight,
- int startColumn)
+ protected void drawWrappedDecorators(Graphics g, int startColumn)
{
g.setFont(av.getFont());
g.setColor(Color.black);
g.translate(labelWidthWest, 0);
+ /*
+ * white fill region of scale above and hidden column markers
+ * (to support incremental fast paint of image)
+ */
+ g.setColor(Color.white);
+ g.fillRect(0, ypos - wrappedSpaceAboveAlignment, viewportWidth
+ * charWidth, wrappedSpaceAboveAlignment);
+ g.setColor(Color.black);
+
if (av.getScaleAboveWrapped())
{
drawNorthScale(g, startColumn, endColumn, ypos);
/*
* draw all scales (if shown) and hidden column markers
*/
- drawWrappedDecorators(gg, getHeight(), ranges.getStartRes());
+ drawWrappedDecorators(gg, ranges.getStartRes());
repaint();
} finally