- im = new jalview.util.ImageMaker(this, type, imageAction,
- aDimension.getWidth(), aDimension.getHeight()
- + boarderBottomOffset, file, imageTitle,
- alignFrame, pSessionId, headless);
- Graphics graphics = im.getGraphics();
- if (av.getWrapAlignment())
+ final String imageAction, imageTitle;
+ if (type == ImageMaker.TYPE.PNG)
+ {
+ imageAction = "Create PNG image from alignment";
+ imageTitle = null;
+ }
+ else if (type == ImageMaker.TYPE.EPS)
+ {
+ imageAction = "Create EPS file from alignment";
+ imageTitle = alignFrame.getTitle();
+ }
+ else
+ {
+ imageAction = "Create SVG file from alignment";
+ imageTitle = alignFrame.getTitle();
+ }
+
+ ImageMaker im = new ImageMaker(this, type, imageAction,
+ graphicsWidth, graphicsHeight, file,
+ imageTitle, alignFrame, pSessionId, headless);
+ Graphics graphics = im.getGraphics();
+ if (graphics == null)
+ {
+ return;
+ }
+ graphics.setColor(Color.white);
+ graphics.fillRect(0, 0, graphicsWidth, graphicsHeight);
+ if (av.getWrapAlignment())
+ {
+ printWrappedAlignment(dim1.width, dim1.height + borderBottomOffset,
+ 0, graphics);
+ }
+ else
+ {
+ printUnwrapped(dim1.width, dim1.height, 0, graphics, graphics);
+ }
+
+ if (forSplitFrame)
+ {
+ /*
+ * append coding complement image
+ */
+ graphics.translate(0, dim1.height);
+ if (av.getCodingComplement().getWrapAlignment())