JAL-629 Fix --tempfac. Hide non-working --notempfac. Add --scale, --width, --height...
[jalview.git] / src / jalview / gui / ImageExporter.java
index 657601e..785d206 100644 (file)
@@ -105,11 +105,12 @@ public class ImageExporter
   public void doExport(File file, Component parent, int width, int height,
           String imageSource)
   {
-    doExport(file, parent, width, height, imageSource, null);
+    doExport(file, parent, width, height, imageSource, null, 0.0f, 0, 0);
   }
 
   public void doExport(File file, Component parent, int width, int height,
-          String imageSource, String renderer)
+          String imageSource, String renderer, float bitmapscale,
+          int bitmapwidth, int bitmapheight)
   {
     final long messageId = System.currentTimeMillis();
     setStatus(
@@ -165,7 +166,7 @@ public class ImageExporter
       final File chosenFile = file;
       Callable<Void> okAction = () -> {
         exportImage(chosenFile, !textSelected.get(), width, height,
-                messageId);
+                messageId, bitmapscale, bitmapwidth, bitmapheight);
         return null;
       };
       LineartOptions epsOption = new LineartOptions(TYPE.EPS.getName(),
@@ -191,7 +192,8 @@ public class ImageExporter
        * character rendering not required, or preference already set 
        * - just do the export
        */
-      exportImage(file, !textSelected.get(), width, height, messageId);
+      exportImage(file, !textSelected.get(), width, height, messageId,
+              bitmapscale, bitmapwidth, bitmapheight);
     }
   }
 
@@ -207,7 +209,8 @@ public class ImageExporter
    * @param messageId
    */
   protected void exportImage(File chosenFile, boolean asLineart, int width,
-          int height, long messageId)
+          int height, long messageId, float bitmapscale, int bitmapwidth,
+          int bitmapheight)
   {
     String type = imageType.getName();
     try
@@ -217,7 +220,7 @@ public class ImageExporter
       // "status.exporting_alignment_as_x_file", type),
       // messageId);
       ImageMaker im = new ImageMaker(imageType, width, height, chosenFile,
-              title, asLineart);
+              title, asLineart, bitmapscale, bitmapwidth, bitmapheight);
       imageWriter.exportImage(im.getGraphics());
       im.writeImage();
       setStatus(