From: amwaterhouse Date: Tue, 18 Apr 2006 13:17:20 +0000 (+0000) Subject: -1 from east scale, wrapped alignment X-Git-Tag: Release_2_08_1~40 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=b9c2f4b60cd997cc03ab560cbf211331b3658968;p=jalview.git -1 from east scale, wrapped alignment --- diff --git a/src/jalview/appletgui/SeqCanvas.java b/src/jalview/appletgui/SeqCanvas.java index f6ef577..c5b4324 100755 --- a/src/jalview/appletgui/SeqCanvas.java +++ b/src/jalview/appletgui/SeqCanvas.java @@ -141,7 +141,7 @@ public class SeqCanvas continue; } - value = av.alignment.getSequenceAt(i).findPosition(index); + value = seq.findPosition(index); break; } if (value != -1) @@ -366,7 +366,7 @@ public class SeqCanvas while ((ypos <= canvasHeight) && (startRes < av.alignment.getWidth())) { - endx = startRes + cWidth; + endx = startRes + cWidth -1; if (endx > al.getWidth()) { @@ -407,7 +407,7 @@ public class SeqCanvas if(annotations==null) annotations = new AnnotationPanel(av); - annotations.drawComponent( g, startRes, endx ); + annotations.drawComponent( g, startRes, endx+1 ); g.translate(0, -cHeight - ypos-4); } g.translate(-LABEL_WEST, 0); diff --git a/src/jalview/gui/SeqCanvas.java b/src/jalview/gui/SeqCanvas.java index 99447a4..d9f7ebb 100755 --- a/src/jalview/gui/SeqCanvas.java +++ b/src/jalview/gui/SeqCanvas.java @@ -180,15 +180,14 @@ public class SeqCanvas extends JComponent if(av.hasHiddenColumns) endx = av.getColumnSelection().adjustForHiddenColumns(endx); + SequenceI seq; // EAST SCALE for (int i = 0; i < av.alignment.getHeight(); i++) { - SequenceI seq = av.alignment.getSequenceAt(i); + seq = av.alignment.getSequenceAt(i); int index = endx; int value = -1; - - while (index > startx) { if (jalview.util.Comparison.isGap(seq.getCharAt(index))) @@ -198,7 +197,7 @@ public class SeqCanvas extends JComponent continue; } - value = av.alignment.getSequenceAt(i).findPosition(index); + value = seq.findPosition(index); break; } @@ -441,7 +440,7 @@ public class SeqCanvas extends JComponent while ((ypos <= canvasHeight) && (startRes < av.alignment.getWidth())) { - endx = startRes + cWidth; + endx = startRes + cWidth -1; if (endx > al.getWidth()) { @@ -492,7 +491,7 @@ public class SeqCanvas extends JComponent if(annotations==null) annotations = new AnnotationPanel(av); - annotations.drawComponent( (Graphics2D) g, startRes, endx); + annotations.drawComponent( (Graphics2D) g, startRes, endx+1); g.translate(0, -cHeight - ypos); } g.setClip(clip);