From: jprocter Date: Mon, 2 Jul 2012 07:27:48 +0000 (+0100) Subject: JAL-968 incremental - PNG/EPS output has annotation overlapping alignment when annota... X-Git-Tag: Jalview_2_9~435 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=9c00e25bfdf274009a471eba895f39e2fac4c0ac;p=jalview.git JAL-968 incremental - PNG/EPS output has annotation overlapping alignment when annotation scroll bar not at top of panel. --- diff --git a/src/jalview/gui/AlignmentPanel.java b/src/jalview/gui/AlignmentPanel.java index f5a6e1e..3d61230 100644 --- a/src/jalview/gui/AlignmentPanel.java +++ b/src/jalview/gui/AlignmentPanel.java @@ -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;