< prev index next >
src/java.desktop/share/classes/java/awt/geom/EllipseIterator.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1997, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -84,11 +84,11 @@
* bezier curves that approximate a circle of radius 0.5
* centered at 0.5, 0.5
*/
private static final double pcv = 0.5 + CtrlVal * 0.5;
private static final double ncv = 0.5 - CtrlVal * 0.5;
- private static double ctrlpts[][] = {
+ private static double[][] ctrlpts = {
{ 1.0, pcv, pcv, 1.0, 0.5, 1.0 },
{ ncv, 1.0, 0.0, pcv, 0.0, 0.5 },
{ 0.0, ncv, ncv, 0.0, 0.5, 0.0 },
{ pcv, 0.0, 1.0, ncv, 1.0, 0.5 }
};
@@ -117,19 +117,19 @@
}
if (index == 5) {
return SEG_CLOSE;
}
if (index == 0) {
- double ctrls[] = ctrlpts[3];
+ double[] ctrls = ctrlpts[3];
coords[0] = (float) (x + ctrls[4] * w);
coords[1] = (float) (y + ctrls[5] * h);
if (affine != null) {
affine.transform(coords, 0, coords, 0, 1);
}
return SEG_MOVETO;
}
- double ctrls[] = ctrlpts[index - 1];
+ double[] ctrls = ctrlpts[index - 1];
coords[0] = (float) (x + ctrls[0] * w);
coords[1] = (float) (y + ctrls[1] * h);
coords[2] = (float) (x + ctrls[2] * w);
coords[3] = (float) (y + ctrls[3] * h);
coords[4] = (float) (x + ctrls[4] * w);
@@ -164,19 +164,19 @@
}
if (index == 5) {
return SEG_CLOSE;
}
if (index == 0) {
- double ctrls[] = ctrlpts[3];
+ double[] ctrls = ctrlpts[3];
coords[0] = x + ctrls[4] * w;
coords[1] = y + ctrls[5] * h;
if (affine != null) {
affine.transform(coords, 0, coords, 0, 1);
}
return SEG_MOVETO;
}
- double ctrls[] = ctrlpts[index - 1];
+ double[] ctrls = ctrlpts[index - 1];
coords[0] = x + ctrls[0] * w;
coords[1] = y + ctrls[1] * h;
coords[2] = x + ctrls[2] * w;
coords[3] = y + ctrls[3] * h;
coords[4] = x + ctrls[4] * w;
< prev index next >