changeset in /hg/icedtea: 2008-03-04 Lillian Angel <langel at red...

Lillian Angel langel at redhat.com
Thu May 29 14:11:09 PDT 2008


changeset 81e5f42991d2 in /hg/icedtea
details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=81e5f42991d2
description:
	2008-03-04  Lillian Angel  <langel at redhat.com>

	        * rt/gnu/*: Removed.
	        * Makefile.am: Removed icedtea-paths.patch.
	        * Makefile.in: Regenerated.
	        * patches/icedtea-paths.patch: Removed.

diffstat:

23 files changed, 7 insertions(+), 3966 deletions(-)
ChangeLog                                        |    7 
Makefile.am                                      |    1 
Makefile.in                                      |    1 
patches/icedtea-paths.patch                      |  646 ----------------------
rt/gnu/java/awt/BitMaskExtent.java               |   79 --
rt/gnu/java/awt/Buffers.java                     |  225 -------
rt/gnu/java/awt/CubicSegment.java                |  184 ------
rt/gnu/java/awt/LineSegment.java                 |  118 ----
rt/gnu/java/awt/QuadSegment.java                 |  264 --------
rt/gnu/java/awt/Segment.java                     |  158 -----
rt/gnu/java/awt/color/CieXyzConverter.java       |   73 --
rt/gnu/java/awt/color/ClutProfileConverter.java  |  152 -----
rt/gnu/java/awt/color/ColorLookUpTable.java      |  429 --------------
rt/gnu/java/awt/color/ColorSpaceConverter.java   |   69 --
rt/gnu/java/awt/color/GrayProfileConverter.java  |  137 ----
rt/gnu/java/awt/color/GrayScaleConverter.java    |  110 ---
rt/gnu/java/awt/color/LinearRGBConverter.java    |  152 -----
rt/gnu/java/awt/color/ProfileHeader.java         |  398 -------------
rt/gnu/java/awt/color/PyccConverter.java         |   72 --
rt/gnu/java/awt/color/RgbProfileConverter.java   |  244 --------
rt/gnu/java/awt/color/SrgbConverter.java         |  152 -----
rt/gnu/java/awt/color/TagEntry.java              |  125 ----
rt/gnu/java/awt/color/ToneReproductionCurve.java |  177 ------

diffs (truncated from 4080 to 500 lines):

diff -r 148c8310a27c -r 81e5f42991d2 ChangeLog
--- a/ChangeLog	Tue Mar 04 16:30:11 2008 -0500
+++ b/ChangeLog	Tue Mar 04 21:54:12 2008 -0500
@@ -1,3 +1,10 @@ 2008-03-04  Lillian Angel  <langel at redha
+2008-03-04  Lillian Angel  <langel at redhat.com>
+
+	* rt/gnu/*: Removed.
+	* Makefile.am: Removed icedtea-paths.patch.
+	* Makefile.in: Regenerated.
+	* patches/icedtea-paths.patch: Removed.
+
 2008-03-04  Lillian Angel  <langel at redhat.com>
 
 	* rt/com/sun/image/codec/jpeg/*: Removed unneeded plugs.
diff -r 148c8310a27c -r 81e5f42991d2 Makefile.am
--- a/Makefile.am	Tue Mar 04 16:30:11 2008 -0500
+++ b/Makefile.am	Tue Mar 04 21:54:12 2008 -0500
@@ -213,7 +213,6 @@ ICEDTEA_PATCHES = \
 	patches/icedtea-version.patch \
 	patches/icedtea-text-relocations.patch \
 	patches/icedtea-graphics.patch \
-	patches/icedtea-paths.patch \
 	patches/icedtea-debuginfo.patch \
 	patches/icedtea-ssl.patch \
 	patches/icedtea-license-headers.patch \
diff -r 148c8310a27c -r 81e5f42991d2 Makefile.in
--- a/Makefile.in	Tue Mar 04 16:30:11 2008 -0500
+++ b/Makefile.in	Tue Mar 04 21:54:12 2008 -0500
@@ -341,7 +341,6 @@ ICEDTEA_PATCHES = \
 	patches/icedtea-version.patch \
 	patches/icedtea-text-relocations.patch \
 	patches/icedtea-graphics.patch \
-	patches/icedtea-paths.patch \
 	patches/icedtea-debuginfo.patch \
 	patches/icedtea-ssl.patch \
 	patches/icedtea-license-headers.patch \
diff -r 148c8310a27c -r 81e5f42991d2 patches/icedtea-paths.patch
--- a/patches/icedtea-paths.patch	Tue Mar 04 16:30:11 2008 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,646 +0,0 @@
-diff -urN openjdk.orig/jdk/src/share/classes/java/awt/BasicStroke.java openjdk/jdk/src/share/classes/java/awt/BasicStroke.java
---- openjdk.orig/jdk/src/share/classes/java/awt/BasicStroke.java	2007-10-12 04:02:07.000000000 -0400
-+++ openjdk/jdk/src/share/classes/java/awt/BasicStroke.java	2007-10-16 22:13:51.000000000 -0400
-@@ -1,5 +1,7 @@
- /*
-  * Copyright 1997-2007 Sun Microsystems, Inc.  All Rights Reserved.
-+ * Portions Copyright (C) 2002, 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
-+ *  see below for license notice.
-  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-  *
-  * This code is free software; you can redistribute it and/or modify it
-@@ -25,6 +27,17 @@
- 
- package java.awt;
- 
-+import gnu.java.awt.CubicSegment;
-+import gnu.java.awt.LineSegment;
-+import gnu.java.awt.QuadSegment;
-+import gnu.java.awt.Segment;
-+
-+import java.awt.geom.FlatteningPathIterator;
-+import java.awt.geom.GeneralPath;
-+import java.awt.geom.PathIterator;
-+import java.awt.geom.Point2D;
-+import java.util.Arrays;
-+
- /**
-  * The <code>BasicStroke</code> class defines a basic set of rendering
-  * attributes for the outlines of graphics primitives, which are rendered
-@@ -156,6 +169,8 @@
-     float dash[];
-     float dash_phase;
- 
-+    private Segment start, end;
-+
-     /**
-      * Constructs a new <code>BasicStroke</code> with the specified
-      * attributes.
-@@ -291,10 +307,12 @@
-      * @return the <code>Shape</code> of the stroked outline.
-      */
-     public Shape createStrokedShape(Shape s) {
--        sun.java2d.pipe.RenderingEngine re =
--            sun.java2d.pipe.RenderingEngine.getInstance();
--        return re.createStrokedShape(s, width, cap, join, miterlimit,
--                                     dash, dash_phase);
-+        PathIterator pi = s.getPathIterator(null);
-+
-+        if( dash == null )
-+            return solidStroke(pi);
-+
-+        return dashedStroke(pi);
-     }
- 
-     /**
-@@ -439,4 +456,511 @@
- 
-         return true;
-     }
-+
-+/*
-+ * This rest of this file is from GNU Classpath.
-+   Copyright (C) 2002, 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
-+
-+   GNU Classpath is free software; you can redistribute it and/or modify
-+   it under the terms of the GNU General Public License as published by
-+   the Free Software Foundation; either version 2, or (at your option)
-+   any later version.
-+
-+   GNU Classpath 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 for more details.
-+
-+   You should have received a copy of the GNU General Public License
-+   along with GNU Classpath; see the file COPYING.  If not, write to the
-+   Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-+   02110-1301 USA.
-+
-+   Linking this library statically or dynamically with other modules is
-+   making a combined work based on this library.  Thus, the terms and
-+   conditions of the GNU General Public License cover the whole
-+   combination.
-+
-+   As a special exception, the copyright holders of this library give you
-+   permission to link this library with independent modules to produce an
-+   executable, regardless of the license terms of these independent
-+   modules, and to copy and distribute the resulting executable under
-+   terms of your choice, provided that you also meet, for each linked
-+   independent module, the terms and conditions of the license of that
-+   module.  An independent module is a module which is not derived from
-+   or based on this library.  If you modify this library, you may extend
-+   this exception to your version of the library, but you are not
-+   obligated to do so.  If you do not wish to do so, delete this
-+   exception statement from your version.
-+   */
-+    private Shape solidStroke(PathIterator pi) {
-+        double[] coords = new double[6];
-+        double x, y, x0, y0;
-+        boolean pathOpen = false;
-+        GeneralPath output = new GeneralPath ();
-+        Segment[] p;
-+        x = x0 = y = y0 = 0;
-+
-+        while (!pi.isDone()) {
-+            switch (pi.currentSegment(coords)) {
-+                case PathIterator.SEG_MOVETO:
-+                    x0 = x = coords[0];
-+                    y0 = y = coords[1];
-+                    if (pathOpen) {
-+                        capEnds();
-+                        convertPath(output, start);
-+                        start = end = null;
-+                        pathOpen = false;
-+                    }
-+                    break;
-+
-+                case PathIterator.SEG_LINETO:
-+                    p = (new LineSegment(x, y, coords[0], coords[1])).
-+                    getDisplacedSegments(width/2.0);
-+                    if (!pathOpen) {
-+                        start = p[0];
-+                        end = p[1];
-+                        pathOpen = true;
-+                    } else {
-+                      addSegments(p);
-+                    }
-+
-+                    x = coords[0];
-+                    y = coords[1];
-+                    break;
-+
-+                case PathIterator.SEG_QUADTO:
-+                    p = (new QuadSegment(x, y, coords[0], coords[1], coords[2],
-+                                         coords[3])).getDisplacedSegments(width/2.0);
-+                    if (!pathOpen) {
-+                        start = p[0];
-+                        end = p[1];
-+                        pathOpen = true;
-+                    } else {
-+                        addSegments(p);
-+                    }
-+
-+                    x = coords[2];
-+                    y = coords[3];
-+                    break;
-+
-+                case PathIterator.SEG_CUBICTO:
-+                    p = new CubicSegment(x, y, coords[0], coords[1],
-+                                         coords[2], coords[3],
-+                                         coords[4], coords[5]).getDisplacedSegments(width/2.0);
-+                    if (!pathOpen) {
-+                        start = p[0];
-+                        end = p[1];
-+                        pathOpen = true;
-+                    } else {
-+                        addSegments(p);
-+                    }
-+
-+                    x = coords[4];
-+                    y = coords[5];
-+                    break;
-+
-+                case PathIterator.SEG_CLOSE:
-+                    if (x == x0 && y == y0) {
-+                        joinSegments(new Segment[] { start.first, end.first });
-+                    } else {
-+                        p = (new LineSegment(x, y, x0, y0)).getDisplacedSegments(width / 2.0);
-+                        addSegments(p);
-+                    }
-+                    convertPath(output, start);
-+                    convertPath(output, end);
-+                    start = end = null;
-+                    pathOpen = false;
-+                    output.setWindingRule(GeneralPath.WIND_EVEN_ODD);
-+                    break;
-+            }
-+            pi.next();
-+        }
-+
-+        if (pathOpen) {
-+            capEnds();
-+            convertPath(output, start);
-+        }
-+        return output;
-+    }
-+
-+    private Shape dashedStroke(PathIterator pi)
-+    {
-+        // The choice of (flatnessSq == width / 3) is made to be consistent with
-+        // the flattening in CubicSegment.getDisplacedSegments
-+        FlatteningPathIterator flat = new FlatteningPathIterator(pi,
-+                                                                 Math.sqrt(width / 3));
-+
-+        // Holds the endpoint of the current segment (or piece of a segment)
-+        double[] coords = new double[2];
-+
-+        // Holds end of the last segment
-+        double x, y, x0, y0;
-+        x = x0 = y = y0 = 0;
-+
-+        // Various useful flags
-+        boolean pathOpen = false;
-+        boolean dashOn = true;
-+        boolean offsetting = (dash_phase != 0);
-+
-+        // How far we are into the current dash
-+        double distance = 0;
-+        int dashIndex = 0;
-+
-+        // And variables to hold the final output
-+        GeneralPath output = new GeneralPath();
-+        Segment[] p;
-+
-+        // Iterate over the FlatteningPathIterator
-+        while (! flat.isDone()) {
-+            switch (flat.currentSegment(coords)) {
-+                case PathIterator.SEG_MOVETO:
-+                    x0 = x = coords[0];
-+                    y0 = y = coords[1];
-+
-+                    if (pathOpen) {
-+                        capEnds();
-+                        convertPath(output, start);
-+                        start = end = null;
-+                        pathOpen = false;
-+                    }
-+
-+                    break;
-+
-+                case PathIterator.SEG_LINETO:
-+                    boolean segmentConsumed = false;
-+
-+                    while (! segmentConsumed) {
-+                        // Find the total remaining length of this segment
-+                        double segLength = Math.sqrt((x - coords[0]) * (x - coords[0])
-+                                                     + (y - coords[1])
-+                                                     * (y - coords[1]));
-+                        boolean spanBoundary = true;
-+                        double[] segmentEnd = null;
-+
-+                        // The current segment fits entirely inside the current dash
-+                        if ((offsetting && distance + segLength <= dash_phase)
-+                            || distance + segLength <= dash[dashIndex]) {
-+                              spanBoundary = false;
-+
-+                        } else {
-+                            // Otherwise, we need to split the segment in two, as this
-+                            // segment spans a dash boundry
-+                            segmentEnd = (double[]) coords.clone();
-+
-+                            // Calculate the remaining distance in this dash,
-+                            // and coordinates of the dash boundary
-+                            double reqLength;
-+                            if (offsetting)
-+                                reqLength = dash_phase - distance;
-+                            else
-+                                reqLength = dash[dashIndex] - distance;
-+
-+                                coords[0] = x + ((coords[0] - x) * reqLength / segLength);
-+                                coords[1] = y + ((coords[1] - y) * reqLength / segLength);
-+                        }
-+
-+                        if (offsetting || ! dashOn) {
-+                            // Dash is off, or we are in offset - treat this as a
-+                            // moveTo
-+                            x0 = x = coords[0];
-+                            y0 = y = coords[1];
-+
-+                            if (pathOpen) {
-+                                capEnds();
-+                                convertPath(output, start);
-+                                start = end = null;
-+                                pathOpen = false;
-+                            }
-+                        } else {
-+                            // Dash is on - treat this as a lineTo
-+                            p = (new LineSegment(x, y, coords[0], coords[1])).getDisplacedSegments(width / 2.0);
-+
-+                            if (! pathOpen) {
-+                                start = p[0];
-+                                end = p[1];
-+                                pathOpen = true;
-+                            } else {
-+                                addSegments(p);
-+                            }
-+
-+                            x = coords[0];
-+                            y = coords[1];
-+                        }
-+
-+                        // Update variables depending on whether we spanned a
-+                        // dash boundary or not
-+                        if (! spanBoundary) {
-+                            distance += segLength;
-+                            segmentConsumed = true;
-+                        } else {
-+                            if (offsetting)
-+                                offsetting = false;
-+                            dashOn = ! dashOn;
-+                            distance = 0;
-+                            coords = segmentEnd;
-+
-+                            if (dashIndex + 1 == dash.length)
-+                                dashIndex = 0;
-+                            else
-+                                dashIndex++;
-+
-+                            // Since the value of segmentConsumed is still false,
-+                            // the next run of the while loop will complete the segment
-+                        }
-+                    }
-+                    break;
-+
-+            // This is a flattened path, so we don't need to deal with curves
-+            }
-+        flat.next();
-+        }
-+
-+        if (pathOpen) {
-+            capEnds();
-+            convertPath(output, start);
-+        }
-+        return output;
-+     }
-+
-+    /**
-+     * Cap the ends of the path (joining the start and end list of segments)
-+     */
-+    private void capEnds() {
-+        Segment returnPath = end.last;
-+
-+        end.reverseAll(); // reverse the path.
-+        end = null;
-+        capEnd(start, returnPath);
-+        start.last = returnPath.last;
-+        end = null;
-+
-+        capEnd(start, start);
-+    }
-+
-+    /**
-+     * Append the Segments in s to the GeneralPath p
-+     */
-+    private void convertPath(GeneralPath p, Segment s) {
-+        Segment v = s;
-+        p.moveTo((float)s.P1.getX(), (float)s.P1.getY());
-+
-+        do {
-+            if(v instanceof LineSegment)
-+                p.lineTo((float)v.P2.getX(), (float)v.P2.getY());
-+            else if(v instanceof QuadSegment)
-+                p.quadTo((float)((QuadSegment)v).cp.getX(),
-+                         (float)((QuadSegment)v).cp.getY(),
-+                         (float)v.P2.getX(), 
-+                         (float)v.P2.getY());
-+            else if(v instanceof CubicSegment)
-+                p.curveTo((float)((CubicSegment)v).cp1.getX(),
-+                          (float)((CubicSegment)v).cp1.getY(),
-+                          (float)((CubicSegment)v).cp2.getX(),
-+                          (float)((CubicSegment)v).cp2.getY(),
-+                          (float)v.P2.getX(), 
-+                          (float)v.P2.getY());
-+            v = v.next;
-+        } while(v != s && v != null);
-+
-+        p.closePath();
-+    }
-+  
-+    /**
-+     * Add the segments to start and end (the inner and outer edges of the stroke) 
-+     */
-+    private void addSegments(Segment[] segments) {
-+        joinSegments(segments);
-+        start.add(segments[0]);
-+        end.add(segments[1]);
-+    }
-+
-+    private void joinSegments(Segment[] segments) {
-+        double[] p0 = start.last.cp2();
-+        double[] p1 = new double[]{start.last.P2.getX(), start.last.P2.getY()};
-+        double[] p2 = new double[]{segments[0].first.P1.getX(), segments[0].first.P1.getY()};
-+        double[] p3 = segments[0].cp1();
-+        Point2D p;
-+
-+        p = lineIntersection(p0[0],p0[1],p1[0],p1[1],
-+                             p2[0],p2[1],p3[0],p3[1], false);
-+
-+        double det = (p1[0] - p0[0])*(p3[1] - p2[1]) - 
-+                     (p3[0] - p2[0])*(p1[1] - p0[1]);
-+
-+        if (det > 0) {
-+            // start and segment[0] form the 'inner' part of a join, 
-+            // connect the overlapping segments
-+            joinInnerSegments(start, segments[0], p);
-+            joinOuterSegments(end, segments[1], p);
-+        } else {
-+            // end and segment[1] form the 'inner' part 
-+            joinInnerSegments(end, segments[1], p);
-+            joinOuterSegments(start, segments[0], p);
-+        }
-+    }
-+
-+    /**
-+     * Make a cap between a and b segments, 
-+     * where a-->b is the direction of iteration.
-+     */
-+    private void capEnd(Segment a, Segment b) {
-+        double[] p0, p1;
-+        double dx, dy, l;
-+        Point2D c1,c2;
-+
-+        switch (cap) {
-+            case CAP_BUTT:
-+                a.add(new LineSegment(a.last.P2, b.P1));
-+                break;
-+
-+            case CAP_SQUARE:
-+                p0 = a.last.cp2();
-+                p1 = new double[]{a.last.P2.getX(), a.last.P2.getY()};
-+                dx = p1[0] - p0[0];
-+                dy = p1[1] - p0[1];
-+                l = Math.sqrt(dx * dx + dy * dy);
-+                dx = 0.5*width*dx/l;
-+                dy = 0.5*width*dy/l;
-+                c1 = new Point2D.Double(p1[0] + dx, p1[1] + dy);
-+                c2 = new Point2D.Double(b.P1.getX() + dx, b.P1.getY() + dy);
-+                a.add(new LineSegment(a.last.P2, c1));
-+                a.add(new LineSegment(c1, c2));
-+                a.add(new LineSegment(c2, b.P1));
-+                break;
-+
-+            case CAP_ROUND:
-+                p0 = a.last.cp2();
-+                p1 = new double[]{a.last.P2.getX(), a.last.P2.getY()};
-+                dx = p1[0] - p0[0];
-+                dy = p1[1] - p0[1];
-+                if (dx != 0 && dy != 0) {
-+                    l = Math.sqrt(dx * dx + dy * dy);
-+                    dx = (2.0/3.0)*width*dx/l;
-+                    dy = (2.0/3.0)*width*dy/l;
-+                }
-+        
-+                c1 = new Point2D.Double(p1[0] + dx, p1[1] + dy);
-+                c2 = new Point2D.Double(b.P1.getX() + dx, b.P1.getY() + dy);
-+                a.add(new CubicSegment(a.last.P2, c1, c2, b.P1));
-+                break;
-+        }
-+        a.add(b);
-+    }
-+
-+    /**
-+     * Returns the intersection of two lines, or null if there isn't one.
-+     * @param infinite - true if the lines should be regarded as infinite, false
-+     * if the intersection must be within the given segments.
-+     * @return a Point2D or null.
-+     */
-+    private Point2D lineIntersection(double X1, double Y1, 
-+                                     double X2, double Y2, 
-+                                     double X3, double Y3, 



More information about the distro-pkg-dev mailing list