From: amwaterhouse Date: Thu, 7 Apr 2005 16:58:38 +0000 (+0000) Subject: for now, draw selection box bottom -1 X-Git-Tag: Release_2_0~466 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=8004878db16757b62ee2c35738506bc4509428cf;p=jalview.git for now, draw selection box bottom -1 --- diff --git a/src/jalview/gui/SeqCanvas.java b/src/jalview/gui/SeqCanvas.java index 5782661..caf93fc 100755 --- a/src/jalview/gui/SeqCanvas.java +++ b/src/jalview/gui/SeqCanvas.java @@ -81,8 +81,8 @@ public void fastPaint(int horizontal, int vertical) gg.translate(transX, transY); - drawPanel(gg, sr, er, ss, es, sr, ss, 0); + drawPanel(gg, sr, er, ss, es, sr, ss, 0); gg.translate( -transX, -transY); fastPaint = true; @@ -172,7 +172,6 @@ public void fastPaint(int horizontal, int vertical) public void drawPanel(Graphics g1,int x1,int x2, int y1, int y2,int startx, int starty,int offset) { - Graphics2D g = (Graphics2D)g1; g.setFont(av.getFont()); RendererI sr = av.getRenderer(); @@ -209,7 +208,7 @@ public void fastPaint(int horizontal, int vertical) ///////////////////////////// for (int i = y1 ; i < y2 ;i++) { - nextSeq = av.getAlignment().getSequenceAt(i); + nextSeq = av.alignment.getSequenceAt(i); sr.drawSequence(g, nextSeq, av.alignment.findAllGroups( nextSeq ),x1,x2, (x1 - startx) * av.charWidth, @@ -262,7 +261,7 @@ public void fastPaint(int horizontal, int vertical) if (bottom == -1 && !group.sequences.contains(av.alignment.getSequenceAt(i + 1))) - bottom = sy + av.charHeight -1; + bottom = sy + av.charHeight ; if (!inGroup) { @@ -270,6 +269,7 @@ public void fastPaint(int horizontal, int vertical) !group.sequences.contains(av.alignment.getSequenceAt(i - 1))) top = sy; + oldY = sy; inGroup = true; if (group == av.getSelectionGroup()) @@ -288,13 +288,20 @@ public void fastPaint(int horizontal, int vertical) { if (inGroup) { - g.drawLine(sx, oldY, sx, sy ); g.drawLine(sx+ex, oldY, sx+ex, sy ); + if (top != -1) + { g.drawLine(sx, top, sx + ex, top); + top =-1; + } if (bottom != -1) + { g.drawLine(sx, bottom, sx + ex, bottom); + bottom = -1; + } + inGroup = false; } @@ -305,10 +312,16 @@ public void fastPaint(int horizontal, int vertical) { if(top!=-1) - g.drawLine(sx,top, sx+ex, top); + { + g.drawLine(sx, top, sx + ex, top); + top =-1; + } if(bottom!=-1) - g.drawLine(sx,bottom, sx+ex, bottom); + { + g.drawLine(sx, bottom-1, sx + ex, bottom-1); + bottom = -1; + } sy = offset + AlignmentUtil.getPixelHeight(starty, i, av.charHeight); g.drawLine(sx, oldY, sx, sy ); g.drawLine(sx+ex, oldY, sx+ex, sy );