X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fappletgui%2FSeqCanvas.java;h=8ffad089b1ce96cf2dfdb16a1dec38fef46c8935;hb=8da7acff9214ddaf0e6d28e76219ab51bd38e62d;hp=3202fc44e803b1a56999cbabd7d2b827e0b71edf;hpb=019042a9f87d94260b3060cdf45ab93ca714a46d;p=jalview.git diff --git a/src/jalview/appletgui/SeqCanvas.java b/src/jalview/appletgui/SeqCanvas.java index 3202fc4..8ffad08 100755 --- a/src/jalview/appletgui/SeqCanvas.java +++ b/src/jalview/appletgui/SeqCanvas.java @@ -21,7 +21,6 @@ package jalview.appletgui; import java.awt.*; -import jalview.analysis.*; import jalview.datamodel.*; public class SeqCanvas @@ -242,7 +241,7 @@ public class SeqCanvas if (av.getWrapAlignment()) { - drawWrappedPanel(gg, getSize().width, getSize().height, av.startRes); + drawWrappedPanel(gg, imgWidth, imgHeight, av.startRes); } else { @@ -339,24 +338,16 @@ public class SeqCanvas drawNorthScale(g, startRes, endx, ypos); } - // When printing we have an extra clipped region, - // the Printable page which we need to account for here - Shape clip = g.getClip(); - if (clip == null) - { - g.setClip(0, 0, cWidth * av.charWidth, canvasHeight); - } - else - { - g.setClip(0, - (int) clip.getBounds().y, - cWidth * av.charWidth, - (int) clip.getBounds().height - ); - } - drawPanel(g, startRes, endx, 0, al.getHeight(), startRes, 0, ypos); - g.setClip(clip); + if(g.getClip()==null) + g.setClip(0, 0, cWidth * av.charWidth, canvasHeight); + + if (av.alignment.getWidth() >= av.vconsensus.size()) + { + endx = av.vconsensus.size() - 2; + } + drawPanel(g, startRes, endx, 0, al.getHeight(), startRes, 0, ypos); + g.setClip(null); g.translate( -LABEL_WEST, 0); ypos += cHeight;