*/
package jalview.gui;
+import static jalview.util.ImageMaker.TYPE.EPS;
+import static jalview.util.ImageMaker.TYPE.PNG;
+import static jalview.util.ImageMaker.TYPE.SVG;
+
import jalview.analysis.AnnotationSorter;
import jalview.api.AlignViewportI;
import jalview.api.AlignmentViewPanel;
alignmentDrawnHeight);
getAnnotationPanel().renderer.drawComponent(getAnnotationPanel(), av,
alignmentGraphics, -1, startRes, endRes + 1);
+
+ /*
+ * reset to left margin
+ */
+ alignmentGraphics.translate(-alignmentGraphicsOffset, 0);
}
return Printable.PAGE_EXISTS;
+ borderBottomOffset;
final int graphicsWidth = Math.max(dim1.width, dim2.width);
- 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();
- }
+ final String dialogTitle = MessageManager
+ .formatMessage("label.make_alignment_image", type.getName());
+ String imageTitle = type == PNG ? null : alignFrame.getTitle();
- ImageMaker im = new ImageMaker(this, type, imageAction,
+ ImageMaker im = new ImageMaker(this, type, dialogTitle,
graphicsWidth, graphicsHeight, file,
imageTitle, alignFrame, pSessionId, headless);
Graphics graphics = im.getGraphics();
* append coding complement image
*/
graphics.translate(0, dim1.height);
+ boolean test = true;
+ if (test)
+ {
+ graphics.setColor(Color.red);
+ graphics.drawString("Hello world", 0, 0);
+ graphics.setColor(Color.black);
+ }
if (av.getCodingComplement().getWrapAlignment())
{
comp.printWrappedAlignment(dim2.width,
*/
public void makeEPS(File epsFile, boolean forSplitFrame)
{
- makeAlignmentImage(ImageMaker.TYPE.EPS, epsFile, forSplitFrame);
+ makeAlignmentImage(EPS, epsFile, forSplitFrame);
}
/**
*/
public void makePNG(File pngFile, boolean forSplitFrame)
{
- makeAlignmentImage(ImageMaker.TYPE.PNG, pngFile, forSplitFrame);
+ makeAlignmentImage(PNG, pngFile, forSplitFrame);
}
/**
*/
public void makeSVG(File svgFile, boolean forSplitFrame)
{
- makeAlignmentImage(ImageMaker.TYPE.SVG, svgFile, forSplitFrame);
+ makeAlignmentImage(SVG, svgFile, forSplitFrame);
}
public void makePNGImageMap(File imgMapFile, String imageName)