X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAlignmentPanel.java;h=3dfb5105fcaf77d7c3312e8b0468d3bc5af44d09;hb=a6f0678764ea06034460236c7a811bbfcad682aa;hp=a5a1affd009da3ff94e4fcf5da380d886c1dc444;hpb=ec24991b1786e17158a43f713c8ae9c4f8647393;p=jalview.git diff --git a/src/jalview/gui/AlignmentPanel.java b/src/jalview/gui/AlignmentPanel.java index a5a1aff..3dfb510 100644 --- a/src/jalview/gui/AlignmentPanel.java +++ b/src/jalview/gui/AlignmentPanel.java @@ -58,6 +58,7 @@ import jalview.datamodel.SequenceGroup; import jalview.datamodel.SequenceI; import jalview.gui.ImageExporter.ImageWriterI; import jalview.io.HTMLOutput; +import jalview.io.exceptions.ImageOutputException; import jalview.jbgui.GAlignmentPanel; import jalview.math.AlignmentDimension; import jalview.schemes.ResidueProperties; @@ -65,6 +66,7 @@ import jalview.structure.StructureSelectionManager; import jalview.util.Comparison; import jalview.util.ImageMaker; import jalview.util.MessageManager; +import jalview.util.imagemaker.BitmapImageSizing; import jalview.viewmodel.ViewportListenerI; import jalview.viewmodel.ViewportRanges; @@ -1173,9 +1175,10 @@ public class AlignmentPanel extends GAlignmentPanel implements return (w > 0 ? w : calculateIdWidth().width); } - void makeAlignmentImage(ImageMaker.TYPE type, File file, String renderer) + void makeAlignmentImage(ImageMaker.TYPE type, File file, String renderer) throws ImageOutputException { - makeAlignmentImage(type, file, renderer, 0.0f, 0, 0); + makeAlignmentImage(type, file, renderer, + BitmapImageSizing.nullBitmapImageSizing()); } /** @@ -1188,7 +1191,7 @@ public class AlignmentPanel extends GAlignmentPanel implements * @param bitmapscale */ void makeAlignmentImage(ImageMaker.TYPE type, File file, String renderer, - float bitmapscale, int bitmapwidth, int bitmapheight) + BitmapImageSizing userBis) throws ImageOutputException { final int borderBottomOffset = 5; @@ -1219,7 +1222,7 @@ public class AlignmentPanel extends GAlignmentPanel implements int imageHeight = aDimension.getHeight() + borderBottomOffset; String of = MessageManager.getString("label.alignment"); exporter.doExport(file, this, imageWidth, imageHeight, of, renderer, - bitmapscale, bitmapwidth, bitmapheight); + userBis); } /** @@ -1263,7 +1266,7 @@ public class AlignmentPanel extends GAlignmentPanel implements } - public void makePNGImageMap(File imgMapFile, String imageName) + public void makePNGImageMap(File imgMapFile, String imageName) throws ImageOutputException { // /////ONLY WORKS WITH NON WRAPPED ALIGNMENTS // //////////////////////////////////////////// @@ -1388,7 +1391,7 @@ public class AlignmentPanel extends GAlignmentPanel implements } catch (Exception ex) { - ex.printStackTrace(); + throw new ImageOutputException("couldn't write ImageMap due to unexpected error",ex); } } // /////////END OF IMAGE MAP