From 416b11342497ccc6f86cabfd5ae2a608f402ce9c Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Thu, 24 Mar 2005 08:52:23 +0000 Subject: [PATCH] fix printing error --- src/jalview/gui/AlignmentPanel.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/jalview/gui/AlignmentPanel.java b/src/jalview/gui/AlignmentPanel.java index 506fb09..d8131b4 100755 --- a/src/jalview/gui/AlignmentPanel.java +++ b/src/jalview/gui/AlignmentPanel.java @@ -381,7 +381,7 @@ public class AlignmentPanel extends GAlignmentPanel implements AdjustmentListene public int printUnwrapped(Graphics pg, int pwidth, int pheight, int pi) throws PrinterException { - int idWidth = calculateIdWidth().width; + int idWidth = calculateIdWidth().width + 4; pg.setColor(Color.white); @@ -414,10 +414,10 @@ public class AlignmentPanel extends GAlignmentPanel implements AdjustmentListene //////////////// //draw Scale - pg.translate(30,0); + pg.translate(idWidth,0); scalePanel.drawScale(pg, startRes, endRes, pwidth-idWidth); - pg.translate(-30, 30); + pg.translate(-idWidth, 30); //////////////// // Draw the ids Color currentColor=null; @@ -451,7 +451,7 @@ public class AlignmentPanel extends GAlignmentPanel implements AdjustmentListene } // draw main sequence panel - pg.translate(idWidth+4,0); + pg.translate(idWidth,0); pg.setClip(0,0,pwidth-idWidth, pheight); seqPanel.seqCanvas.drawPanel(pg,startRes,endRes,startSeq,endSeq,startRes,startSeq,0); @@ -462,7 +462,7 @@ public class AlignmentPanel extends GAlignmentPanel implements AdjustmentListene public int printWrappedAlignment(Graphics pg, int pwidth, int pheight, int pi) throws PrinterException { - int idWidth = calculateIdWidth().width; + int idWidth = calculateIdWidth().width+4; if( seqPanel.seqCanvas.getWidth() < pwidth-idWidth) pwidth = seqPanel.seqCanvas.getWidth() + idWidth; @@ -509,7 +509,7 @@ public class AlignmentPanel extends GAlignmentPanel implements AdjustmentListene } // draw main sequence panel - pg.translate(idWidth+4,0); + pg.translate(idWidth,0); seqPanel.seqCanvas.drawWrappedPanel(pg, pwidth-idWidth, pheight, pi*noChunksOnPage*chunkWidth); -- 1.7.10.2