/hg/icedtea6: 3 new changesets

dlila at icedtea.classpath.org dlila at icedtea.classpath.org
Tue Mar 1 07:20:18 PST 2011


changeset 506fae07eecd in /hg/icedtea6
details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=506fae07eecd
author: Denis Lila <dlila at redhat.com>
date: Mon Feb 28 10:08:57 2011 -0500

	Replace patch with backport: added patches/openjdk/6887494-NPE-in-
	pisces.patch removed patches/renderer-crossing.patch


changeset 3328285d9722 in /hg/icedtea6
details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=3328285d9722
author: Denis Lila <dlila at redhat.com>
date: Mon Feb 28 10:42:50 2011 -0500

	added patches/openjdk/6967434-bad-round-joins.patch added
	patches/openjdk/6967436-6967433-floating-pt-conversion.patch added
	patches/openjdk/6976265-stroke-control.patch added
	patches/piscesMakefile.patch removed patches/java2d-stroker-
	internal-close-joint.patch removed patches/java2d-stroker-internal-
	joint.patch removed patches/stroker-finish.patch


changeset 131dffed9cc9 in /hg/icedtea6
details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=131dffed9cc9
author: Denis Lila <dlila at redhat.com>
date: Mon Feb 28 10:53:21 2011 -0500

	Backport of S7016856


diffstat:

13 files changed, 5046 insertions(+), 3153 deletions(-)
ChangeLog                                                    |   25 
Makefile.am                                                  |    1 
patches/java2d-stroker-internal-close-joint.patch            |   48 
patches/java2d-stroker-internal-joint.patch                  |   49 
patches/openjdk/6887494-NPE-in-pisces.patch                  |   45 
patches/openjdk/6967434-bad-round-joins.patch                | 2496 ++++++++
patches/openjdk/6967436-6967433-floating-pt-conversion.patch | 1302 ++++
patches/openjdk/6967436-6976265-6967434-pisces.patch         | 3038 ----------
patches/openjdk/6976265-stroke-control.patch                 |  115 
patches/openjdk/7016856-pisces-performance.patch             | 1058 +++
patches/piscesMakefile.patch                                 |    5 
patches/renderer-crossing.patch                              |    7 
patches/stroker-finish.patch                                 |   10 

diffs (truncated from 16505 to 500 lines):

diff -r 7f61b6fae9da -r 131dffed9cc9 ChangeLog
--- a/ChangeLog	Sun Feb 27 20:11:15 2011 +0100
+++ b/ChangeLog	Mon Feb 28 10:53:21 2011 -0500
@@ -1,3 +1,51 @@ 2011-02-27  Xerxes Ranby  <xerxes at zafena
+2011-02-28  Denis Lila  <dlila at redhat.com>
+
+	* Makefile.am:
+	Added patch.
+	* NEWS:
+	Added backport entry.
+	* patches/openjdk/7016856-pisces-performance.patch:
+	Backport.
+
+2011-02-28  Denis Lila  <dlila at redhat.com>
+
+	* Makefile.am: Added patches
+	patches/openjdk/6967434-bad-round-joins.patch,
+	patches/openjdk/6967436-6967433-floating-pt-conversion.patch, and
+	patches/openjdk/6976265-stroke-control.patch to replace
+	patches/openjdk/6967436-6976265-6967434-pisces.patch, which
+	was removed in the previous changeset.
+	Added patches/piscesMakefile.patch to make the build work.
+	No longer applying:
+	patches/stroker-finish.patch,
+	patches/java2d-stroker-internal-joint.patch, and
+	patches/java2d-stroker-internal-close-joint.patch.
+	Applying once again:
+	patches/openjdk/6766342-AA-simple-shape-performance.patch
+	* patches/openjdk/6967434-bad-round-joins.patch
+	* patches/openjdk/6967436-6967433-floating-pt-conversion.patch
+	* patches/openjdk/6976265-stroke-control.patch
+	* patches/piscesMakefile.patch:
+	Added.
+	* patches/java2d-stroker-internal-close-joint.patch
+	* patches/java2d-stroker-internal-joint.patch
+	* patches/stroker-finish.patch:
+	Obsolete and unused. Removed.
+
+2011-02-28  Denis Lila  <dlila at redhat.com>
+
+	* Makefile.am: Replaced patches/renderer-crossing.patch with
+	patches/openjdk/6887494-NPE-in-pisces.patch.
+	No longer applying:
+	patches/openjdk/6967436-6976265-6967434-pisces.patch
+	patches/openjdk/6766342-AA-simple-shape-performance.patch
+	* patches/openjdk/6887494-NPE-in-pisces.patch:
+	Added.
+	* patches/renderer-crossing.patch:
+	Removed. Replaced by 6887494-NPE-in-pisces.patch.
+	* patches/openjdk/6967436-6976265-6967434-pisces.patch:
+	Removed. Will never be applied again.
+
 2011-02-27  Xerxes Ranby  <xerxes at zafena.se>
 
 	JamVM: Fix configure --enable-jamvm full bootstrap build.
diff -r 7f61b6fae9da -r 131dffed9cc9 Makefile.am
--- a/Makefile.am	Sun Feb 27 20:11:15 2011 +0100
+++ b/Makefile.am	Mon Feb 28 10:53:21 2011 -0500
@@ -249,8 +249,6 @@ ICEDTEA_PATCHES = \
 	patches/arch.patch \
 	patches/lc_ctype.patch \
 	patches/xjc.patch \
-	patches/renderer-crossing.patch \
-	patches/stroker-finish.patch \
 	patches/linker-libs-order.patch \
 	patches/testenv.patch \
 	patches/samejvm-safe.patch \
@@ -266,8 +264,6 @@ ICEDTEA_PATCHES = \
 	patches/jtreg-jrunscript.patch \
 	patches/network-unreachable.patch \
 	patches/dnd-filelists.patch \
-	patches/java2d-stroker-internal-joint.patch \
-	patches/java2d-stroker-internal-close-joint.patch \
 	patches/disable-cc-incompatible-sanity-checks.patch \
 	patches/explicit-target-arch.patch \
 	patches/gcc-stack-markings.patch \
@@ -293,7 +289,6 @@ ICEDTEA_PATCHES = \
 	patches/openjdk/6650759-missing_inference.patch \
 	patches/numa_on_early_glibc.patch \
 	patches/jtreg-international-fonts.patch \
-	patches/openjdk/6967436-6976265-6967434-pisces.patch \
 	patches/f14-fonts.patch \
 	patches/jtreg-T6638712-fix.patch \
 	patches/jtreg-T6650759m-fix.patch \
@@ -324,8 +319,14 @@ ICEDTEA_PATCHES = \
 	patches/jtreg-LastErrorString.patch \
 	patches/openjdk/6663040-com.sun.awt.patch \
 	patches/openjdk/6775317-non-AA-simple-shape-performance.patch \
+	patches/pr600-arm-jvm.cfg.patch \
+	patches/piscesMakefile.patch \
+	patches/openjdk/6887494-NPE-in-pisces.patch \
+	patches/openjdk/6967436-6967433-floating-pt-conversion.patch \
+	patches/openjdk/6976265-stroke-control.patch \
+	patches/openjdk/6967434-bad-round-joins.patch \
 	patches/openjdk/6766342-AA-simple-shape-performance.patch \
-	patches/pr600-arm-jvm.cfg.patch
+	patches/openjdk/7016856-pisces-performance.patch
 
 if !WITH_ALT_HSBUILD
 ICEDTEA_PATCHES += \
diff -r 7f61b6fae9da -r 131dffed9cc9 NEWS
--- a/NEWS	Sun Feb 27 20:11:15 2011 +0100
+++ b/NEWS	Mon Feb 28 10:53:21 2011 -0500
@@ -434,6 +434,7 @@ New in release 1.10 (2011-XX-XX):
   - S6444769: java/awt/Insets/WindowWithWarningTest/WindowWithWarningTest.html fails
   - S6775317: Improve performance of non-AA transformed rectangles and single wide lines in software pipelines
   - S6766342: Improve performance of Ductus rasterizer
+  - S7016856: fix dashing performance regression. Improve other rendering performance.
 * Bug fixes
   - RH661505: JPEGs with sRGB IEC61966-2.1 color profiles have wrong colors
   - PR600: HS19 upgrade broke CACAO build on ARM
diff -r 7f61b6fae9da -r 131dffed9cc9 patches/java2d-stroker-internal-close-joint.patch
--- a/patches/java2d-stroker-internal-close-joint.patch	Sun Feb 27 20:11:15 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
---- openjdk/jdk/src/share/classes/sun/java2d/pisces/Stroker.java.orig	2009-04-29 14:01:43.000000000 -0400
-+++ openjdk/jdk/src/share/classes/sun/java2d/pisces/Stroker.java	2009-04-29 14:00:03.000000000 -0400
-@@ -633,7 +633,7 @@
-         }
- 
-         emitLineTo(sx0 + mx0, sy0 + my0);
--        emitLineTo(sx0 - mx0, sy0 - my0);  // same as reverse[0], reverse[1]
-+        emitMoveTo(sx0, sy0);  // same as reverse[0], reverse[1]
- 
-         // Draw final join on the inside
-         if (ccw) {
---- /dev/null	2009-04-15 13:37:55.776002308 -0400
-+++ openjdk/jdk/test/sun/pisces/MiterInternalCloseJointTest.java	2009-04-29 13:59:31.000000000 -0400
-@@ -0,0 +1,82 @@
-+/*
-+ * Copyright 2009 Red Hat, Inc.  All Rights Reserved.
-+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-+ *
-+ * This code is free software; you can redistribute it and/or modify it
-+ * under the terms of the GNU General Public License version 2 only, as
-+ * published by the Free Software Foundation.
-+ *
-+ * This code is distributed in the hope that it will be useful, but WITHOUT
-+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-+ * version 2 for more details (a copy is included in the LICENSE file that
-+ * accompanied this code).
-+ *
-+ * You should have received a copy of the GNU General Public License version
-+ * 2 along with this work; if not, write to the Free Software Foundation,
-+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-+ */
-+
-+/*
-+  @test
-+  @summary Check that the final joint created using 
-+           generalPath.closePath() is correct
-+  @author Omair Majid <omajid at redhat.com>
-+  @run main MiterInternalCloseJointTest
-+ */
-+import java.awt.BasicStroke;
-+import java.awt.Color;
-+import java.awt.Graphics2D;
-+import java.awt.geom.GeneralPath;
-+import java.awt.image.BufferedImage;
-+
-+public class MiterInternalCloseJointTest {
-+
-+    static final int WIDTH = 200;
-+    static final int HEIGHT = 200;
-+
-+    static final int x0 = 50, y0 = 50;
-+    static final int x1 = 150, y1 = 50;
-+    static final int x2 = 100, y2 = 100;
-+
-+    private static BufferedImage createTestImage() {
-+        final BufferedImage image = new BufferedImage(WIDTH, HEIGHT,
-+                BufferedImage.TYPE_INT_BGR);
-+        Graphics2D g = image.createGraphics();
-+
-+        g.setColor(Color.BLACK);
-+        g.fillRect(0, 0, WIDTH, HEIGHT);
-+
-+        float wideStrokeWidth = 20.0f;
-+        BasicStroke wideStroke = new BasicStroke(wideStrokeWidth,
-+                BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, wideStrokeWidth);
-+        float thinStrokeWidth = 3.0f;
-+        BasicStroke thinStroke = new BasicStroke(thinStrokeWidth,
-+                BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, thinStrokeWidth);
-+
-+        g.setColor(Color.WHITE);
-+        GeneralPath path = new GeneralPath();
-+        path.moveTo(x0, y0);
-+        path.lineTo(x1, y1);
-+        path.lineTo(x2, y2);
-+        path.closePath();
-+        path.closePath();
-+        g.setStroke(thinStroke);
-+        g.draw(wideStroke.createStrokedShape(path));
-+
-+        return image;
-+    }
-+
-+    public static void main(String[] args) {
-+
-+        BufferedImage testImage = createTestImage();
-+
-+        int color = testImage.getRGB(x0,y0-5);
-+        System.out.println("Color seen: #" + Integer.toHexString(color));
-+        if (color == Color.WHITE.getRGB()) {
-+            throw new RuntimeException(
-+                    "Test Failed; did not expected to see a white line at the start of the path");
-+        }
-+
-+    }
-+}
diff -r 7f61b6fae9da -r 131dffed9cc9 patches/java2d-stroker-internal-joint.patch
--- a/patches/java2d-stroker-internal-joint.patch	Sun Feb 27 20:11:15 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
---- openjdk/jdk/src/share/classes/sun/java2d/pisces/Stroker.java.orig	2009-04-29 13:30:24.000000000 -0400
-+++ openjdk/jdk/src/share/classes/sun/java2d/pisces/Stroker.java	2009-04-29 13:31:05.000000000 -0400
-@@ -614,6 +614,8 @@
-                           ROUND_JOIN_INTERNAL_THRESHOLD);
-         }
- 
-+        emitLineTo(x0, y0, !ccw);
-+
-         emitLineTo(x0 + mx, y0 + my);
-         emitLineTo(sx0 + mx, sy0 + my);
- 
---- /dev/null	2009-04-15 13:37:55.776002308 -0400
-+++ openjdk/jdk/test/sun/pisces/MiterInternalJointTest.java	2009-04-29 13:41:30.000000000 -0400
-@@ -0,0 +1,84 @@
-+/*
-+ * Copyright 2009 Red Hat, Inc.  All Rights Reserved.
-+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-+ *
-+ * This code is free software; you can redistribute it and/or modify it
-+ * under the terms of the GNU General Public License version 2 only, as
-+ * published by the Free Software Foundation.
-+ *
-+ * This code is distributed in the hope that it will be useful, but WITHOUT
-+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-+ * version 2 for more details (a copy is included in the LICENSE file that
-+ * accompanied this code).
-+ *
-+ * You should have received a copy of the GNU General Public License version
-+ * 2 along with this work; if not, write to the Free Software Foundation,
-+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-+ */
-+
-+/*
-+  @test
-+  @summary Check that the penultimate joint created using 
-+           generalPath.closePath() is correct
-+  @author Omair Majid <omajid at redhat.com>
-+  @run main MiterInternalJointTest
-+ */
-+
-+
-+import java.awt.BasicStroke;
-+import java.awt.Color;
-+import java.awt.Graphics2D;
-+import java.awt.geom.GeneralPath;
-+import java.awt.image.BufferedImage;
-+
-+public class MiterInternalJointTest {
-+
-+    static final int WIDTH = 200;
-+    static final int HEIGHT = 200;
-+
-+    static final int x0 = 50, y0 = 50;
-+    static final int x1 = 150, y1 = 50;
-+    static final int x2 = 100, y2 = 100;
-+
-+    private static BufferedImage createTestImage() {
-+        final BufferedImage image = new BufferedImage(WIDTH, HEIGHT,
-+                BufferedImage.TYPE_INT_BGR);
-+        Graphics2D g = image.createGraphics();
-+
-+        g.setColor(Color.BLACK);
-+        g.fillRect(0, 0, WIDTH, HEIGHT);
-+
-+        float wideStrokeWidth = 20.0f;
-+        BasicStroke wideStroke = new BasicStroke(wideStrokeWidth,
-+                BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, wideStrokeWidth);
-+        float thinStrokeWidth = 3.0f;
-+        BasicStroke thinStroke = new BasicStroke(thinStrokeWidth,
-+                BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, thinStrokeWidth);
-+
-+        g.setColor(Color.WHITE);
-+        GeneralPath path = new GeneralPath();
-+        path.moveTo(x0, y0);
-+        path.lineTo(x1, y1);
-+        path.lineTo(x2, y2);
-+        path.closePath();
-+        path.closePath();
-+        g.setStroke(thinStroke);
-+        g.draw(wideStroke.createStrokedShape(path));
-+
-+        return image;
-+    }
-+
-+    public static void main(String[] args) {
-+
-+        BufferedImage testImage = createTestImage();
-+
-+        int color = testImage.getRGB(x2,y2);
-+        System.out.println("Color seen: #" + Integer.toHexString(color));
-+        if (color != Color.WHITE.getRGB()) {
-+            throw new RuntimeException(
-+                    "Test Failed; expected to see a white vertex above the bottom of the triangle");
-+        }
-+
-+    }
-+}
diff -r 7f61b6fae9da -r 131dffed9cc9 patches/openjdk/6887494-NPE-in-pisces.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/openjdk/6887494-NPE-in-pisces.patch	Mon Feb 28 10:53:21 2011 -0500
@@ -0,0 +1,90 @@
+# HG changeset patch
+# User rkennke
+# Date 1254777142 -7200
+# Node ID ccc36189f2a7615ffb798e76ba5b31d8c535dc40
+# Parent  31e68419715e0a8e88ee6005ab1d69180cfe6f44
+6887494: NPE in pisces Renderer
+Summary: Only recreate crossings array, if there actually exists one before.
+Reviewed-by: flar, tdv
+
+diff -r 31e68419715e -r ccc36189f2a7 src/share/classes/sun/java2d/pisces/Renderer.java
+--- openjdk.orig/jdk/src/share/classes/sun/java2d/pisces/Renderer.java	Fri Oct 02 10:15:12 2009 -0700
++++ openjdk/jdk/src/share/classes/sun/java2d/pisces/Renderer.java	Mon Oct 05 23:12:22 2009 +0200
+@@ -775,10 +775,12 @@
+ 
+     // Free sorting arrays if larger than maximum size
+     private void crossingListFinished() {
+-        if (crossings.length > DEFAULT_CROSSINGS_SIZE) {
++        if (crossings != null && crossings.length > DEFAULT_CROSSINGS_SIZE) {
+             crossings = new int[DEFAULT_CROSSINGS_SIZE];
+         }
+-        if (crossingIndices.length > DEFAULT_INDICES_SIZE) {
++        if (crossingIndices != null &&
++            crossingIndices.length > DEFAULT_INDICES_SIZE)
++        {
+             crossingIndices = new int[DEFAULT_INDICES_SIZE];
+         }
+     }
+diff -r 31e68419715e -r ccc36189f2a7 test/sun/java2d/pisces/Renderer/TestNPE.java
+--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
++++ openjdk/jdk/test/sun/java2d/pisces/Renderer/TestNPE.java	Mon Oct 05 23:12:22 2009 +0200
+@@ -0,0 +1,59 @@
++/*
++ * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ *
++ * This code is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 only, as
++ * published by the Free Software Foundation.
++ *
++ * This code is distributed in the hope that it will be useful, but WITHOUT
++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
++ * version 2 for more details (a copy is included in the LICENSE file that
++ * accompanied this code).
++ *
++ * You should have received a copy of the GNU General Public License version
++ * 2 along with this work; if not, write to the Free Software Foundation,
++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++ *
++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
++ * or visit www.oracle.com if you need additional information or have any
++ * questions. 
++ */
++
++/**
++ * @test
++ * @bug     6887494
++ *
++ * @summary Verifies that no NullPointerException is thrown in Pisces Renderer
++ *          under certain circumstances.
++ *
++ * @run     main TestNPE
++ */
++
++import java.awt.*;
++import java.awt.geom.*;
++import java.awt.image.BufferedImage;
++
++public class TestNPE {
++
++    private static void paint(Graphics g) {
++        Graphics2D g2d = (Graphics2D) g;
++        g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
++                             RenderingHints.VALUE_ANTIALIAS_ON);
++        g2d.setClip(0, 0, 0, 0);
++        g2d.setTransform(
++               new AffineTransform(4.0f, 0.0f, 0.0f, 4.0f, -1248.0f, -744.0f));
++        g2d.draw(new Line2D.Float(131.21428571428572f, 33.0f,
++                                  131.21428571428572f, 201.0f));
++    }
++
++    public static void main(String[] args) {
++        BufferedImage im = new BufferedImage(100, 100,
++                                             BufferedImage.TYPE_INT_ARGB);
++
++        // Trigger exception in main thread.
++        Graphics g = im.getGraphics();
++        paint(g);
++    }
++}
diff -r 7f61b6fae9da -r 131dffed9cc9 patches/openjdk/6967434-bad-round-joins.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/openjdk/6967434-bad-round-joins.patch	Mon Feb 28 10:53:21 2011 -0500
@@ -0,0 +1,4992 @@
+# HG changeset patch
+# User dlila
+# Date 1288103963 14400
+# Node ID 065e6c5a80276390345fe863724e8207e43c7b08
+# Parent  12b65e7ee3e41c8f6ba49b86dfb347dd38d84e09
+6967434: Round joins/caps of scaled up lines have poor quality.
+Summary: eliminated flattening from the rendering engine.
+Reviewed-by: flar
+
+diff -r 12b65e7ee3e4 -r 065e6c5a8027 src/share/classes/sun/java2d/pisces/Curve.java
+--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
++++ openjdk/jdk/src/share/classes/sun/java2d/pisces/Curve.java	Tue Oct 26 10:39:23 2010 -0400
+@@ -0,0 +1,294 @@
++/*
++ * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ *
++ * This code is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 only, as
++ * published by the Free Software Foundation.  Oracle designates this
++ * particular file as subject to the "Classpath" exception as provided
++ * by Oracle in the LICENSE file that accompanied this code.
++ *
++ * This code is distributed in the hope that it will be useful, but WITHOUT
++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
++ * version 2 for more details (a copy is included in the LICENSE file that
++ * accompanied this code).
++ *
++ * You should have received a copy of the GNU General Public License version
++ * 2 along with this work; if not, write to the Free Software Foundation,
++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++ *
++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
++ * or visit www.oracle.com if you need additional information or have any
++ * questions.
++ */
++
++package sun.java2d.pisces;
++
++import java.util.Iterator;
++
++class Curve {
++
++    float ax, ay, bx, by, cx, cy, dx, dy;
++    float dax, day, dbx, dby;
++
++    Curve() {
++    }
++
++    void set(float[] points, int type) {
++        switch(type) {
++        case 8:
++            set(points[0], points[1],
++                points[2], points[3],
++                points[4], points[5],
++                points[6], points[7]);
++            break;
++        case 6:
++            set(points[0], points[1],
++                points[2], points[3],
++                points[4], points[5]);
++            break;
++        default:
++            throw new InternalError("Curves can only be cubic or quadratic");
++        }
++    }
++
++    void set(float x1, float y1,
++             float x2, float y2,
++             float x3, float y3,
++             float x4, float y4)
++    {
++        ax = 3 * (x2 - x3) + x4 - x1;
++        ay = 3 * (y2 - y3) + y4 - y1;
++        bx = 3 * (x1 - 2 * x2 + x3);
++        by = 3 * (y1 - 2 * y2 + y3);
++        cx = 3 * (x2 - x1);
++        cy = 3 * (y2 - y1);
++        dx = x1;
++        dy = y1;
++        dax = 3 * ax; day = 3 * ay;
++        dbx = 2 * bx; dby = 2 * by;
++    }
++
++    void set(float x1, float y1,
++             float x2, float y2,
++             float x3, float y3)
++    {



More information about the distro-pkg-dev mailing list