Dont set clip if its not null
authoramwaterhouse <Andrew Waterhouse>
Tue, 30 Aug 2005 10:34:25 +0000 (10:34 +0000)
committeramwaterhouse <Andrew Waterhouse>
Tue, 30 Aug 2005 10:34:25 +0000 (10:34 +0000)
src/jalview/appletgui/SeqCanvas.java

index 3202fc4..f0c27a3 100755 (executable)
@@ -242,7 +242,7 @@ public class SeqCanvas
 \r
     if (av.getWrapAlignment())\r
     {\r
-      drawWrappedPanel(gg, getSize().width, getSize().height, av.startRes);\r
+      drawWrappedPanel(gg, imgWidth, imgHeight, av.startRes);\r
     }\r
     else\r
     {\r
@@ -339,24 +339,13 @@ public class SeqCanvas
         drawNorthScale(g, startRes, endx, ypos);\r
       }\r
 \r
-      // When printing we have an extra clipped region,\r
-      // the Printable page which we need to account for here\r
-      Shape clip = g.getClip();\r
-      if (clip == null)\r
-      {\r
-        g.setClip(0, 0, cWidth * av.charWidth, canvasHeight);\r
-      }\r
-      else\r
-      {\r
-        g.setClip(0,\r
-                  (int) clip.getBounds().y,\r
-                  cWidth * av.charWidth,\r
-                  (int) clip.getBounds().height\r
-            );\r
-      }\r
+\r
+     if(g.getClip()==null)\r
+       g.setClip(0, 0, cWidth * av.charWidth, canvasHeight);\r
+\r
 \r
       drawPanel(g, startRes, endx, 0, al.getHeight(), startRes, 0, ypos);\r
-      g.setClip(clip);\r
+      g.setClip(null);\r
       g.translate( -LABEL_WEST, 0);\r
 \r
       ypos += cHeight;\r