try out graphics 2d
authoramwaterhouse <Andrew Waterhouse>
Thu, 18 Nov 2004 18:40:41 +0000 (18:40 +0000)
committeramwaterhouse <Andrew Waterhouse>
Thu, 18 Nov 2004 18:40:41 +0000 (18:40 +0000)
src/jalview/gui/IdCanvas.java

index 67fabf7..c1df12d 100755 (executable)
@@ -1,13 +1,15 @@
 package jalview.gui;\r
 \r
 import java.awt.*;\r
+import java.awt.Graphics2D.*;\r
+\r
 import javax.swing.*;\r
 import jalview.datamodel.*;\r
 import jalview.analysis.*;\r
 public class IdCanvas extends JPanel\r
 {\r
   protected Image    img;\r
-  protected Graphics gg;\r
+  protected Graphics2D gg;\r
 \r
   protected int      imgWidth;\r
   protected int      imgHeight;\r
@@ -68,7 +70,8 @@ public class IdCanvas extends JPanel
 \r
       img = createImage(imgWidth,imgHeight);\r
 \r
-      gg = img.getGraphics();\r
+\r
+      gg = (Graphics2D)img.getGraphics();\r
       gg.setColor(Color.white);\r
       gg.fillRect(0,0,imgWidth,imgHeight);\r
 \r