X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Frenderer%2FAnnotationRenderer.java;h=d943d3932fb4de3f980151e09b09bc4b0c0f82ae;hb=refs%2Fheads%2Ffeature%2FJAL-4274_configurable_bitmap_export_preferences;hp=ea5439341d465727fd52de0e896a604f50c6206f;hpb=03bc8848382795bda548083f0bc3202dfe6a9b8b;p=jalview.git diff --git a/src/jalview/renderer/AnnotationRenderer.java b/src/jalview/renderer/AnnotationRenderer.java index ea54393..d943d39 100644 --- a/src/jalview/renderer/AnnotationRenderer.java +++ b/src/jalview/renderer/AnnotationRenderer.java @@ -304,7 +304,7 @@ public class AnnotationRenderer } // draw arrow body unsetAntialias(g); - fillRect(g, x1 - 1, y + 4 + iconOffset, x2 - x1 + 1, 6); + fillRect(g, x1, y + 4 + iconOffset, x2 - x1, 6); } // public void updateFromAnnotationPanel(FontMetrics annotFM, AlignViewportI @@ -622,6 +622,9 @@ public class AnnotationRenderer // first pass sets up state for drawing continuation from left-hand // column // of startRes + + // flag used for vector rendition + this.glyphLineDrawn = false; x = (startRes == 0) ? 0 : -1; while (x < endRes - startRes) { @@ -1204,13 +1207,7 @@ public class AnnotationRenderer } unsetAntialias(g); g.setColor(GLYPHLINE_COLOR); - g.fillRect(lastSSX, y + 6 + iconOffset, (x * charWidth) - lastSSX - 1, - 2); - if (!isVectorRendition()) - { - g.drawRect(lastSSX, y + 6 + iconOffset, (x * charWidth) - lastSSX - 1, - 2); - } + g.fillRect(lastSSX, y + 6 + iconOffset, (x * charWidth) - lastSSX, 2); } void drawSheetAnnot(Graphics g, Annotation[] row, @@ -1226,7 +1223,7 @@ public class AnnotationRenderer g.setColor(SHEET_COLOUR); fillRect(g, lastSSX, y + 4 + iconOffset, - (x * charWidth) - lastSSX - 4, isVectorRendition() ? 6 : 7); + (x * charWidth) - lastSSX - 4, 6); fillPolygon(g, new int[] { (x * charWidth) - 6, (x * charWidth) - 6, @@ -1239,8 +1236,8 @@ public class AnnotationRenderer else { g.setColor(SHEET_COLOUR); - fillRect(g, lastSSX, y + 4 + iconOffset, x * charWidth - lastSSX, - isVectorRendition() ? 6 : 7); + fillRect(g, lastSSX, y + 4 + iconOffset, (x * charWidth) - lastSSX, + 6); } } @@ -1308,8 +1305,8 @@ public class AnnotationRenderer if (rightEnd) { - fillArc(g, (x * charWidth) - charWidth - 1, y + 3 + iconOffset, - charWidth, 8, 270, 180); + fillArc(g, ((x - 1) * charWidth), y + 3 + iconOffset, charWidth, 8, + 270, 180); x2 -= charWidth / 2; } @@ -1834,14 +1831,8 @@ public class AnnotationRenderer private void fillPolygon(Graphics g, int[] xpoints, int[] ypoints, int n) { - unsetAntialias(g); + setAntialias(g); g.fillPolygon(xpoints, ypoints, n); - if (!isVectorRendition()) - { - setAntialias(g); - g.fillPolygon(xpoints, ypoints, n); - g.drawPolygon(xpoints, ypoints, n); - } } /* @@ -1852,13 +1843,8 @@ public class AnnotationRenderer private void fillRect(Graphics g, int a, int b, int c, int d) { + unsetAntialias(g); g.fillRect(a, b, c, d); - /* - if (false && !isVectorRendition() && drawRect) - { - g.drawRect(a, b, c, d); - } - */ } private void fillRoundRect(Graphics g, int a, int b, int c, int d, int e, @@ -1866,20 +1852,12 @@ public class AnnotationRenderer { setAntialias(g); g.fillRoundRect(a, b, c, d, e, f); - if (!isVectorRendition()) - { - g.drawRoundRect(a, b, c, d, e, f); - } } private void fillArc(Graphics g, int a, int b, int c, int d, int e, int f) { setAntialias(g); g.fillArc(a, b, c, d, e, f); - if (!isVectorRendition()) - { - g.drawArc(a, b, c, d, e, f); - } } private void drawLine(Graphics g, Stroke s, int a, int b, int c, int d)