From: gmungoc Date: Mon, 21 Aug 2017 14:53:18 +0000 (+0100) Subject: JAL-2609 tweaks including fully erasing scale above X-Git-Tag: Release_2_10_3b1~91^2~6^2~5 X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=commitdiff_plain;h=919cef3e2b8c066ab9fe5cbfe7f76fa54601b788 JAL-2609 tweaks including fully erasing scale above --- diff --git a/src/jalview/gui/SeqCanvas.java b/src/jalview/gui/SeqCanvas.java index 088a359..46f2d84 100755 --- a/src/jalview/gui/SeqCanvas.java +++ b/src/jalview/gui/SeqCanvas.java @@ -709,17 +709,17 @@ public class SeqCanvas extends JComponent implements ViewportListenerI drawVerticalScale(g, startColumn, endColumn, ypos, false); } - g.translate(labelWidthWest, 0); - /* * white fill region of scale above and hidden column markers * (to support incremental fast paint of image) */ g.setColor(Color.white); g.fillRect(0, ypos - wrappedSpaceAboveAlignment, viewportWidth - * charWidth, wrappedSpaceAboveAlignment); + * charWidth + labelWidthWest, wrappedSpaceAboveAlignment); g.setColor(Color.black); + g.translate(labelWidthWest, 0); + if (av.getScaleAboveWrapped()) { drawNorthScale(g, startColumn, endColumn, ypos); @@ -1456,7 +1456,7 @@ public class SeqCanvas extends JComponent implements ViewportListenerI if (lastWidthPartHeight) { - int widthsAbove = visibleWidths - 2; + int widthsAbove = Math.max(0, visibleWidths - 2); int ypos = wrappedRepeatHeightPx * widthsAbove + wrappedSpaceAboveAlignment; int endRes = ranges.getEndRes();