diff options
author | Robert Schuster <theBohemian@gmx.net> | 2009-01-06 12:20:19 +0000 |
---|---|---|
committer | Robert Schuster <theBohemian@gmx.net> | 2009-01-06 12:20:19 +0000 |
commit | 025e33eb7b47679fa2e5faf37db3ce19ef0f1ed1 (patch) | |
tree | a8612d81868626882d8a44bb0a6698b70b8ddfce /gnu/java | |
parent | 7b19c767526c8ec42ba75bb3bd5c96ad91e18e3b (diff) | |
download | classpath-025e33eb7b47679fa2e5faf37db3ce19ef0f1ed1.tar.gz |
Fixes PR #34991
2009-01-05 Robert Schuster <robertschuster@fsfe.org>
* gnu/java/awt/peer/gtk/CairoGraphics2D.java:
(drawPolyline): Rewritten.
Diffstat (limited to 'gnu/java')
-rw-r--r-- | gnu/java/awt/peer/gtk/CairoGraphics2D.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gnu/java/awt/peer/gtk/CairoGraphics2D.java b/gnu/java/awt/peer/gtk/CairoGraphics2D.java index fcd3f6acd..d1ad2d38c 100644 --- a/gnu/java/awt/peer/gtk/CairoGraphics2D.java +++ b/gnu/java/awt/peer/gtk/CairoGraphics2D.java @@ -1246,7 +1246,9 @@ public abstract class CairoGraphics2D extends Graphics2D 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 +2173,4 @@ public abstract class CairoGraphics2D extends Graphics2D return new Rectangle2D.Double(minX, minY, (maxX - minX), (maxY - minY)); } -}
\ No newline at end of file +} |