JAL-968 incremental - PNG/EPS output has annotation overlapping alignment when annota...
authorjprocter <jprocter@compbio.dundee.ac.uk>
Mon, 2 Jul 2012 07:27:48 +0000 (08:27 +0100)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Mon, 2 Jul 2012 07:27:48 +0000 (08:27 +0100)
src/jalview/gui/AlignmentPanel.java

index f5a6e1e..3d61230 100644 (file)
@@ -920,10 +920,14 @@ public class AlignmentPanel extends GAlignmentPanel implements
 
     if (av.showAnnotation && (endSeq == av.getAlignment().getHeight()))
     {
+      // draw annotation - need to offset for current scroll position
+      int offset=-alabels.scrollOffset;
+      pg.translate(0, offset);
       pg.translate(-idWidth - 3, (endSeq - startSeq) * av.charHeight + 3);
       alabels.drawComponent((Graphics2D) pg, idWidth);
       pg.translate(idWidth + 3, 0);
       annotationPanel.renderer.drawComponent(annotationPanel, av, (Graphics2D) pg, -1, startRes, endRes + 1);
+      pg.translate(0, -offset);
     }
 
     return Printable.PAGE_EXISTS;