JAL-2982 use configured background colour in PCA image export
[jalview.git] / src / jalview / gui / PCAPanel.java
index f0ba274..caa2fc2 100644 (file)
@@ -389,7 +389,7 @@ public class PCAPanel extends GPCAPanel
     {
       pg.translate((int) pf.getImageableX(), (int) pf.getImageableY());
 
-      rc.drawBackground(pg, rc.bgColour);
+      rc.drawBackground(pg);
       rc.drawScene(pg);
       if (rc.drawAxes)
       {
@@ -432,20 +432,19 @@ public class PCAPanel extends GPCAPanel
 
     ImageMaker im;
 
-    if (type == ImageMaker.TYPE.PNG)
+    switch (type)
     {
+    case PNG:
       im = new ImageMaker(this, ImageMaker.TYPE.PNG,
               "Make PNG image from PCA", width, height, null, null, null, 0,
               false);
-    }
-    else if (type == jalview.util.ImageMaker.TYPE.EPS)
-    {
+      break;
+    case EPS:
       im = new ImageMaker(this, ImageMaker.TYPE.EPS,
               "Make EPS file from PCA", width, height, null,
               this.getTitle(), null, 0, false);
-    }
-    else
-    {
+      break;
+    default:
       im = new ImageMaker(this, ImageMaker.TYPE.SVG,
               "Make SVG file from PCA", width, height, null,
               this.getTitle(), null, 0, false);
@@ -453,7 +452,7 @@ public class PCAPanel extends GPCAPanel
 
     if (im.getGraphics() != null)
     {
-      rc.drawBackground(im.getGraphics(), Color.black);
+      rc.drawBackground(im.getGraphics());
       rc.drawScene(im.getGraphics());
       if (rc.drawAxes)
       {