X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Frenderer%2FAnnotationRenderer.java;h=b5dac0d50f95fb5daf98ac5379724f0bea3d6697;hb=3fdc889794e3566af57628f0b6a308eb23886f96;hp=24fbb2645c0225e7fe90853e06983f10c7061cc3;hpb=427b5193ff4e96cf2a28cf72c1857a1ab5250201;p=jalview.git diff --git a/src/jalview/renderer/AnnotationRenderer.java b/src/jalview/renderer/AnnotationRenderer.java index 24fbb26..b5dac0d 100644 --- a/src/jalview/renderer/AnnotationRenderer.java +++ b/src/jalview/renderer/AnnotationRenderer.java @@ -175,7 +175,6 @@ public class AnnotationRenderer int x, int y, int iconOffset, int startRes, int column, boolean validRes, boolean validEnd) { - g.setColor(STEM_COLOUR); int sCol = (lastSSX / charWidth) + hiddenColumns.visibleToAbsoluteColumn(startRes); int x1 = lastSSX; @@ -185,11 +184,19 @@ public class AnnotationRenderer : row_annotations[column - 1].secondaryStructure; boolean diffupstream = sCol == 0 || row_annotations[sCol - 1] == null - || dc != row_annotations[sCol - 1].secondaryStructure; + || dc != row_annotations[sCol - 1].secondaryStructure + || !validEnd; boolean diffdownstream = !validRes || !validEnd || row_annotations[column] == null || dc != row_annotations[column].secondaryStructure; + if (diffupstream || diffdownstream) + { + // draw glyphline under arrow + drawGlyphLine(g, lastSSX, x, y, iconOffset); + } + g.setColor(STEM_COLOUR); + if (column > 0 && Rna.isClosingParenthesis(dc)) { if (diffupstream) @@ -202,7 +209,8 @@ public class AnnotationRenderer */ fillPolygon(g, new int[] { lastSSX + 5, lastSSX + 5, lastSSX }, new int[] - { y + iconOffset, y + 14 + iconOffset, y + 8 + iconOffset }, + { y + iconOffset + 1, y + 13 + iconOffset, + y + 7 + iconOffset }, 3); x1 += 5; } @@ -220,9 +228,10 @@ public class AnnotationRenderer * if annotation ending with an opeing base pair half of the stem, * display a forward arrow */ - fillPolygon(g, new int[] { x2 - 5, x2 - 5, x2 }, + fillPolygon(g, new int[] { x2 - 6, x2 - 6, x2 - 1 }, new int[] - { y + iconOffset, y + 14 + iconOffset, y + 8 + iconOffset }, + { y + iconOffset + 1, y + 13 + iconOffset, + y + 7 + iconOffset }, 3); x2 -= 5; } @@ -232,7 +241,8 @@ public class AnnotationRenderer } } // draw arrow body - fillRect(g, x1, y + 4 + iconOffset, x2 - x1, 7); + unsetAntialias(g); + fillRect(g, x1, y + 4 + iconOffset, x2 - x1, 6); } void drawNotCanonicalAnnot(Graphics g, Color nonCanColor, @@ -251,7 +261,8 @@ public class AnnotationRenderer : row_annotations[column - 1].displayCharacter; boolean diffupstream = sCol == 0 || row_annotations[sCol - 1] == null - || !dc.equals(row_annotations[sCol - 1].displayCharacter); + || !dc.equals(row_annotations[sCol - 1].displayCharacter) + || !validEnd; boolean diffdownstream = !validRes || !validEnd || row_annotations[column] == null || !dc.equals(row_annotations[column].displayCharacter); @@ -1267,7 +1278,6 @@ public class AnnotationRenderer } else { - // g.setColor(Color.orange); fillRoundRect(g, lastSSX, y + 3 + iconOffset, x2 - x1 - ofs, 8, 0, 0); } @@ -1278,7 +1288,6 @@ public class AnnotationRenderer } else { - // g.setColor(Color.magenta); fillRoundRect(g, lastSSX + ofs, y + 3 + iconOffset, x2 - x1 - ofs, 8, 0, 0); }