- if (av.isShowAnnotation() && (endSeq == av.getAlignment().getHeight()))
- {
- // draw annotation label - need to offset for current scroll position
- int offset = -getAlabels().getScrollOffset();
- pg[G0].translate(0, offset);
- pg[G0].translate(-idWidth - 3,
- (endSeq - startSeq) * av.getCharHeight() + 3);
- getAlabels().drawComponent(pg[G0], idWidth);
- pg[G0].translate(idWidth + 3, 0);
- pg[G0].translate(0, -offset);
- if (isMultiGraphics)
- {
- // draw annotation - need to offset for current scroll position
- pg[G1].translate(0, offset);
- pg[G1].translate(-idWidth - 3,
- (endSeq - startSeq) * av.getCharHeight() + 3);
- pg[G1].translate(idWidth + 3, 0);
- getAnnotationPanel().renderer.drawComponent(getAnnotationPanel(),
- av, pg[G1], -1, startRes, endRes + 1);
- pg[G1].translate(0, -offset);
- }
- else
- {
- getAnnotationPanel().renderer.drawComponent(getAnnotationPanel(),
- av, pg[G0], -1, startRes, endRes + 1);
- pg[G0].translate(0, -offset);
- }
+ /*
+ * draw the annotations starting at
+ * (idOffset, alignmentHeight) from (0, scaleHeight)
+ */
+ alignmentGraphics.translate(alignmentGraphicsOffset,
+ alignmentDrawnHeight);
+ getAnnotationPanel().renderer.drawComponent(getAnnotationPanel(), av,
+ alignmentGraphics, -1, startRes, endRes + 1);