alignmentDrawnHeight);
updateLayout();
getAnnotationPanel().renderer.drawComponent(getAnnotationPanel(), av,
- alignmentGraphics, -1, startRes, endRes + 1);
+ alignmentGraphics, -1, startRes, endRes + 1, true);
}
return Printable.PAGE_EXISTS;
AlignViewportI av, Graphics g, int activeRow, int startRes,
int endRes)
{
+ return drawComponent(annotPanel, av, g, activeRow, startRes, endRes,
+ false);
+ }
+
+ public boolean drawComponent(AwtRenderPanelI annotPanel,
+ AlignViewportI av, Graphics g, int activeRow, int startRes,
+ int endRes, boolean forExport)
+ {
if (g instanceof EpsGraphics2D || g instanceof SVGGraphics2D)
{
this.setVectorRendering(true);
// This removes artifacts from text when side scrolling
// (particularly in wrap format), but can result in clipped
// characters until a full paint is drawn.
- g2dCopy.setClip(0, (int) yPos - charHeight, imgWidth - 1,
+ // If we're in an image export, set the clip width to be the
+ // entire width of the annotation.
+
+ int clipWidth = forExport
+ ? row_annotations.length * charWidth - 1
+ : imgWidth - 1;
+ g2dCopy.setClip(0, (int) yPos - charHeight, clipWidth,
charHeight);
/*
* translate to drawing position _before_ applying any scaling