+ 3;
/*
- * draw the Scale at horizontal offset, then reset to origin
+ * draw the Scale at horizontal offset, then reset to top left (0, 0)
*/
alignmentGraphics.translate(alignmentGraphicsOffset, 0);
getScalePanel().drawScale(alignmentGraphics, startRes, endRes,
/*
* Draw the sequence ids, offset for scale height,
- * then reset to origin
+ * then reset to top left (0, 0)
*/
idGraphics.translate(0, scaleHeight);
idGraphics.setFont(getIdPanel().getIdCanvas().getIdfont());
/*
* draw the sequences, offset for scale height, and id width (if using a
- * single graphics context), then reset to origin + scale height
+ * single graphics context), then reset to (0, scale height)
*/
alignmentGraphics.translate(alignmentGraphicsOffset, scaleHeight);
getSeqPanel().seqCanvas.drawPanel(alignmentGraphics, startRes, endRes,
if (av.isShowAnnotation() && (endSeq == alignmentHeight))
{
/*
- * draw annotation labels, offset for current scroll position
- * then reset to origin + scale height
+ * draw annotation labels; drawComponent() translates by
+ * getScrollOffset(), so compensate for that first;
+ * then reset to (0, scale height)
*/
- int offset = -getAlabels().getScrollOffset();
- idGraphics.translate(0, offset + alignmentDrawnHeight);
+ int offset = getAlabels().getScrollOffset();
+ idGraphics.translate(0, -offset);
+ idGraphics.translate(0, alignmentDrawnHeight);
getAlabels().drawComponent(idGraphics, idWidth);
- idGraphics.translate(0, -offset - alignmentDrawnHeight);
+ idGraphics.translate(0, -alignmentDrawnHeight);
/*
- * draw the annotations
+ * draw the annotations starting at
+ * (idOffset, alignmentHeight) from (0, scaleHeight)
*/
alignmentGraphics.translate(alignmentGraphicsOffset, alignmentDrawnHeight);
getAnnotationPanel().renderer.drawComponent(getAnnotationPanel(), av,