From: kiramt Date: Tue, 27 Jun 2017 07:12:00 +0000 (+0100) Subject: JAL-2600 vertical fast paint too X-Git-Tag: Release_2_10_3b1~183^2^2~5 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=76b5df40b2ae218a21d54b30bf726684fe660971;p=jalview.git JAL-2600 vertical fast paint too --- diff --git a/src/jalview/gui/SeqCanvas.java b/src/jalview/gui/SeqCanvas.java index e8f9c5b..fdad32b 100755 --- a/src/jalview/gui/SeqCanvas.java +++ b/src/jalview/gui/SeqCanvas.java @@ -311,8 +311,16 @@ public class SeqCanvas extends JComponent implements ViewportListenerI gg.drawImage(img, null, 0, 0); img = newimg; - transX = (er - horizontal - sr) * charWidth; - sr = er - horizontal - sr; + if (horizontal != 0) + { + transX = (er - horizontal - sr) * charWidth; + sr = er - horizontal - sr; + } + else if (vertical != 0) + { + transY = imgHeight - ((vertical + 1) * charHeight); + ss = es - vertical - ss; + } } else { @@ -1044,6 +1052,8 @@ public class SeqCanvas extends JComponent implements ViewportListenerI else if (evt.getPropertyName().equals("endseq")) { // resize + fastPaint(0, (int) evt.getNewValue() - (int) evt.getOldValue(), + true); } } }