- // now check if cursor is within range for x values
- if (cursorX >= startx && cursorX <= endx)
- {
- // get a new image of the correct size
- cursorImage = setupImage();
- Graphics2D g = (Graphics2D) cursorImage.getGraphics();
-
- // get the character the cursor is drawn at
- SequenceI seq = av.getAlignment().getSequenceAt(cursorY);
- char s = seq.getCharAt(cursorX);
-
- seqRdr.drawCursor(g, s,
- xoffset + (cursorX - startx) * av.getCharWidth(),
- yoffset + (cursorY - startSeq) * av.getCharHeight());
- g.dispose();
+ // now check if cursor is within range for x values
+ if (cursor_xpos >= startx && cursor_xpos <= endx)
+ {
+ // get the character the cursor is drawn at
+ SequenceI seq = av.getAlignment().getSequenceAt(cursorY);
+ char s = seq.getCharAt(cursorX);
+
+ seqRdr.drawCursor(g, s,
+ xoffset + (cursor_xpos - startx) * av.getCharWidth(),
+ yoffset + (cursor_ypos - startSeq) * av.getCharHeight());
+ }