{
pg.translate((int) pf.getImageableX(), (int) pf.getImageableY());
- rc.drawBackground(pg, rc.bgColour);
+ rc.drawBackground(pg);
rc.drawScene(pg);
if (rc.drawAxes)
{
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);
if (im.getGraphics() != null)
{
- rc.drawBackground(im.getGraphics(), Color.black);
+ rc.drawBackground(im.getGraphics());
rc.drawScene(im.getGraphics());
if (rc.drawAxes)
{
ig = img.getGraphics();
}
- drawBackground(ig, bgColour);
+ drawBackground(ig);
drawScene(ig);
if (drawAxes)
}
/**
- * Fills the background with the specified colour
+ * Fills the background with the currently configured background colour
*
* @param g
- * @param col
*/
- public void drawBackground(Graphics g, Color col)
+ public void drawBackground(Graphics g)
{
- g.setColor(col);
+ g.setColor(bgColour);
g.fillRect(0, 0, prefSize.width, prefSize.height);
}