< prev index next >

src/java.desktop/share/classes/sun/awt/geom/Crossings.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018, 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

@@ -31,11 +31,11 @@
 
 public abstract class Crossings {
     public static final boolean debug = false;
 
     int limit = 0;
-    double yranges[] = new double[10];
+    double[] yranges = new double[10];
 
     double xlo, ylo, xhi, yhi;
 
     public Crossings(double xlo, double ylo, double xhi, double yhi) {
         this.xlo = xlo;

@@ -117,11 +117,11 @@
         //         three subdivided cubic curves (2+6+6+6=20)
         //         AND
         //             0-2 horizontal splitting parameters
         //             OR
         //             3 parametric equation derivative coefficients
-        double coords[] = new double[23];
+        double[] coords = new double[23];
         double movx = 0;
         double movy = 0;
         double curx = 0;
         double cury = 0;
         double newx, newy;

@@ -237,11 +237,11 @@
         return false;
     }
 
     private Vector<Curve> tmp = new Vector<>();
 
-    public boolean accumulateQuad(double x0, double y0, double coords[]) {
+    public boolean accumulateQuad(double x0, double y0, double[] coords) {
         if (y0 < ylo && coords[1] < ylo && coords[3] < ylo) {
             return false;
         }
         if (y0 > yhi && coords[1] > yhi && coords[3] > yhi) {
             return false;

@@ -267,11 +267,11 @@
         }
         tmp.clear();
         return false;
     }
 
-    public boolean accumulateCubic(double x0, double y0, double coords[]) {
+    public boolean accumulateCubic(double x0, double y0, double[] coords) {
         if (y0 < ylo && coords[1] < ylo &&
             coords[3] < ylo && coords[5] < ylo)
         {
             return false;
         }

@@ -377,11 +377,11 @@
                 System.arraycopy(yranges, from, yranges, to, limit-from);
             }
             to += (limit-from);
             if (ystart < yend) {
                 if (to >= yranges.length) {
-                    double newranges[] = new double[to+10];
+                    double[] newranges = new double[to+10];
                     System.arraycopy(yranges, 0, newranges, 0, to);
                     yranges = newranges;
                 }
                 yranges[to++] = ystart;
                 yranges[to++] = yend;

@@ -389,11 +389,11 @@
             limit = to;
         }
     }
 
     public static final class NonZero extends Crossings {
-        private int crosscounts[];
+        private int[] crosscounts;
 
         public NonZero(double xlo, double ylo, double xhi, double yhi) {
             super(xlo, ylo, xhi, yhi);
             crosscounts = new int[yranges.length / 2];
         }

@@ -428,12 +428,12 @@
             }
         }
 
         public void insert(int cur, double lo, double hi, int dir) {
             int rem = limit - cur;
-            double oldranges[] = yranges;
-            int oldcounts[] = crosscounts;
+            double[] oldranges = yranges;
+            int[] oldcounts = crosscounts;
             if (limit >= yranges.length) {
                 yranges = new double[limit+10];
                 System.arraycopy(oldranges, 0, yranges, 0, cur);
                 crosscounts = new int[(limit+10)/2];
                 System.arraycopy(oldcounts, 0, crosscounts, 0, cur/2);
< prev index next >