summaryrefslogtreecommitdiff
path: root/packages/classpath/classpath-0.97.2/drawpolyline.patch
blob: 407f9913068b22344f8fb4ed6472e3fc433a8c74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Index: gnu/java/awt/peer/gtk/CairoGraphics2D.java
===================================================================
RCS file: /sources/classpath/classpath/gnu/java/awt/peer/gtk/CairoGraphics2D.java,v
retrieving revision 1.73
diff -u -r1.73 CairoGraphics2D.java
--- gnu/java/awt/peer/gtk/CairoGraphics2D.java	8 Feb 2008 22:17:39 -0000	1.73
+++ gnu/java/awt/peer/gtk/CairoGraphics2D.java	14 Oct 2008 06:50:57 -0000
@@ -1246,7 +1246,10 @@
 
   public void drawPolyline(int[] xPoints, int[] yPoints, int nPoints)
   {
-    draw(new Polygon(xPoints, yPoints, nPoints));
+		for (int i = 1; i < nPoints; i++)
+	  	draw(new Line2D.Double(
+						xPoints[i - 1], yPoints[i - 1],
+						xPoints[i], yPoints[i]));
   }
 
   public void drawOval(int x, int y, int width, int height)
@@ -2171,4 +2174,4 @@
     
     return new Rectangle2D.Double(minX, minY, (maxX - minX), (maxY - minY));
   }
-}
\ No newline at end of file
+}