X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAlignmentPanel.java;h=f7c80005ac5fad51880231f5481cc4e4ecdb2236;hb=2a6bee646361a41a57c7a3868a966635c3d25a27;hp=85c46bd7990ad79e70789b7819c1a384f1bf710a;hpb=ad6e0dcf682399eb8b7a0ac49d3fcc63f4f991f2;p=jalview.git diff --git a/src/jalview/gui/AlignmentPanel.java b/src/jalview/gui/AlignmentPanel.java index 85c46bd..f7c8000 100644 --- a/src/jalview/gui/AlignmentPanel.java +++ b/src/jalview/gui/AlignmentPanel.java @@ -896,7 +896,7 @@ public class AlignmentPanel extends GAlignmentPanel implements } else { - return printUnwrapped(pwidth, pheight, pi, pg, pg); + return printUnwrapped(false, pwidth, pheight, pi, pg, pg); } } @@ -919,7 +919,8 @@ public class AlignmentPanel extends GAlignmentPanel implements * @return * @throws PrinterException */ - public int printUnwrapped(int pageWidth, int pageHeight, int pageIndex, + public int printUnwrapped(boolean exportSeqPanel, int pageWidth, + int pageHeight, int pageIndex, Graphics idGraphics, Graphics alignmentGraphics) throws PrinterException { @@ -995,14 +996,17 @@ public class AlignmentPanel extends GAlignmentPanel implements idGraphics.setFont(av.getFont()); idGraphics.translate(0, -scaleHeight); - /* - * draw the sequences, offset for scale height, and id width (if using a - * single graphics context), then reset to (0, scale height) - */ - alignmentGraphics.translate(alignmentGraphicsOffset, scaleHeight); - getSeqPanel().seqCanvas.drawPanelForPrinting(alignmentGraphics, startRes, - endRes, startSeq, endSeq - 1); - alignmentGraphics.translate(-alignmentGraphicsOffset, 0); + if (!exportSeqPanel) + { + /* + * draw the sequences, offset for scale height, and id width (if using a + * single graphics context), then reset to (0, scale height) + */ + alignmentGraphics.translate(alignmentGraphicsOffset, scaleHeight); + getSeqPanel().seqCanvas.drawPanelForPrinting(alignmentGraphics, + startRes, endRes, startSeq, endSeq - 1); + alignmentGraphics.translate(-alignmentGraphicsOffset, 0); + } if (av.isShowAnnotation() && (endSeq == alignmentHeight)) { @@ -1045,7 +1049,8 @@ public class AlignmentPanel extends GAlignmentPanel implements * * @throws PrinterException */ - public int printWrappedAlignment(int pageWidth, int pageHeight, int pageNumber, + public int printWrappedAlignment(int pageWidth, + int pageHeight, int pageNumber, Graphics g) throws PrinterException { getSeqPanel().seqCanvas.calculateWrappedGeometry(getWidth(), @@ -1098,7 +1103,8 @@ public class AlignmentPanel extends GAlignmentPanel implements g.translate(idWidth, 0); - getSeqPanel().seqCanvas.drawWrappedPanelForPrinting(g, pageWidth - idWidth, + getSeqPanel().seqCanvas.drawWrappedPanelForPrinting(g, + pageWidth - idWidth, totalHeight, 0); if ((pageNumber * pageHeight) < totalHeight) @@ -1151,6 +1157,13 @@ public class AlignmentPanel extends GAlignmentPanel implements void makeAlignmentImage(jalview.util.ImageMaker.TYPE type, File file) { + makeAlignmentImage(type, file, jalview.bin.Cache + .getDefault("IMAGE_EXPORT_NOSEQUENCES", false)); + } + + public void makeAlignmentImage(jalview.util.ImageMaker.TYPE type, + File file, boolean exportSeqPanel) + { int boarderBottomOffset = 5; long pSessionId = System.currentTimeMillis(); headless = (System.getProperty("java.awt.headless") != null @@ -1206,7 +1219,8 @@ public class AlignmentPanel extends GAlignmentPanel implements { if (graphics != null) { - printUnwrapped(aDimension.getWidth(), aDimension.getHeight(), 0, + printUnwrapped(exportSeqPanel, aDimension.getWidth(), + aDimension.getHeight(), 0, graphics, graphics); im.writeImage(); }