From 76b5df40b2ae218a21d54b30bf726684fe660971 Mon Sep 17 00:00:00 2001 From: kiramt Date: Tue, 27 Jun 2017 08:12:00 +0100 Subject: [PATCH] JAL-2600 vertical fast paint too --- src/jalview/gui/SeqCanvas.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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); } } } -- 1.7.10.2