- jalview.util.ImageMaker im;
- final String imageAction, imageTitle;
- if (type == jalview.util.ImageMaker.TYPE.PNG)
- {
- imageAction = "Create PNG image from alignment";
- imageTitle = null;
- }
- else if (type == jalview.util.ImageMaker.TYPE.EPS)
- {
- imageAction = "Create EPS file from alignment";
- imageTitle = alignFrame.getTitle();
- }
- else
- {
- imageAction = "Create SVG file from alignment";
- imageTitle = alignFrame.getTitle();
- }
-
- im = new jalview.util.ImageMaker(this, type, imageAction,
- aDimension.width, aDimension.height + borderBottomOffset,
- file,
- imageTitle, alignFrame, pSessionId, headless);
- Graphics graphics = im.getGraphics();
- if (graphics != null)
- {
- if (av.getWrapAlignment())
- {
- printWrappedAlignment(aDimension.width,
- aDimension.height + borderBottomOffset, 0,
- graphics);
- }
- else
- {
- printUnwrapped(aDimension.width, aDimension.height, 0,
- graphics, graphics);
- }
+ AlignmentPanel comp = ((AlignViewport) av.getCodingComplement())
+ .getAlignPanel();
+ dim2 = comp.getAlignmentDimension();
+ }
+ final int graphicsHeight = dim1.height + dim2.height;
+ final int graphicsWidth = Math.max(dim1.width, dim2.width);