From 3c17b49e571fc1274009671435ac47f51efab112 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Tue, 30 Aug 2005 10:34:25 +0000 Subject: [PATCH] Dont set clip if its not null --- src/jalview/appletgui/SeqCanvas.java | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/src/jalview/appletgui/SeqCanvas.java b/src/jalview/appletgui/SeqCanvas.java index 3202fc4..f0c27a3 100755 --- a/src/jalview/appletgui/SeqCanvas.java +++ b/src/jalview/appletgui/SeqCanvas.java @@ -242,7 +242,7 @@ public class SeqCanvas if (av.getWrapAlignment()) { - drawWrappedPanel(gg, getSize().width, getSize().height, av.startRes); + drawWrappedPanel(gg, imgWidth, imgHeight, av.startRes); } else { @@ -339,24 +339,13 @@ 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 - ); - } + + if(g.getClip()==null) + g.setClip(0, 0, cWidth * av.charWidth, canvasHeight); + drawPanel(g, startRes, endx, 0, al.getHeight(), startRes, 0, ypos); - g.setClip(clip); + g.setClip(null); g.translate( -LABEL_WEST, 0); ypos += cHeight; -- 1.7.10.2