From: kiramt Date: Tue, 10 Oct 2017 13:30:43 +0000 (+0100) Subject: JAL-2690attemptedmerge seems to work X-Git-Tag: Release_2_10_3b1~91^2~7 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=612e5d088076c3db73608deddfa1da02c1c5c5dc;p=jalview.git JAL-2690attemptedmerge seems to work --- diff --git a/src/jalview/gui/SeqCanvas.java b/src/jalview/gui/SeqCanvas.java index 8ad094f..70ac11f 100755 --- a/src/jalview/gui/SeqCanvas.java +++ b/src/jalview/gui/SeqCanvas.java @@ -527,6 +527,9 @@ public class SeqCanvas extends JComponent implements ViewportListenerI { BufferedImage lcimg = null; + int charWidth = av.getCharWidth(); + int charHeight = av.getCharHeight(); + int width = getWidth(); int height = getHeight(); @@ -772,7 +775,7 @@ public class SeqCanvas extends JComponent implements ViewportListenerI */ int xOffset = labelWidthWest + ((startColumn - ranges.getStartRes()) % viewportWidth) - * charWidth; + * charWidth; g.translate(xOffset, 0); // When printing we have an extra clipped region, @@ -785,8 +788,8 @@ public class SeqCanvas extends JComponent implements ViewportListenerI } else { - g.setClip(0, (int) clip.getBounds().getY(), viewportWidth * charWidth, - (int) clip.getBounds().getHeight()); + g.setClip(0, (int) clip.getBounds().getY(), + viewportWidth * charWidth, (int) clip.getBounds().getHeight()); } /* @@ -859,9 +862,8 @@ public class SeqCanvas extends JComponent implements ViewportListenerI * (to support incremental fast paint of image) */ g.setColor(Color.white); - g.fillRect(0, ypos - wrappedSpaceAboveAlignment, - viewportWidth * charWidth + labelWidthWest, - wrappedSpaceAboveAlignment); + g.fillRect(0, ypos - wrappedSpaceAboveAlignment, viewportWidth + * charWidth + labelWidthWest, wrappedSpaceAboveAlignment); g.setColor(Color.black); g.translate(labelWidthWest, 0); @@ -928,6 +930,9 @@ public class SeqCanvas extends JComponent implements ViewportListenerI int canvasWidth, int canvasHeight, int startRes) { + int charHeight = av.getCharHeight(); + int charWidth = av.getCharWidth(); + // height gap above each panel int hgap = charHeight; if (av.getScaleAboveWrapped())