JAL-629 Add --renderer arg/subval for vector output and fixed annotation renderer...
[jalview.git] / src / jalview / gui / ImageExporter.java
index d849ba2..657601e 100644 (file)
@@ -105,6 +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);
+  }
+
+  public void doExport(File file, Component parent, int width, int height,
+          String imageSource, String renderer)
+  {
     final long messageId = System.currentTimeMillis();
     setStatus(
             MessageManager.formatMessage(
@@ -142,9 +148,10 @@ public class ImageExporter
      * for this as EPS_RENDERING / SVG_RENDERING
      * Always set to Text for JalviewJS as Lineart (glyph fonts) not available
      */
-    String renderStyle = Cache.getDefault(
-            imageType.getName() + "_RENDERING",
-            LineartOptions.PROMPT_EACH_TIME);
+    String renderStyle = renderer == null
+            ? Cache.getDefault(imageType.getName() + "_RENDERING",
+                    LineartOptions.PROMPT_EACH_TIME)
+            : renderer;
     if (Platform.isJS())
     {
       renderStyle = "Text";