Merge pull request #2 from deadmoose/master

Some more cleanup
This commit is contained in:
Michael Bayne
2011-06-13 14:23:35 -07:00
12 changed files with 26 additions and 20 deletions
+5 -5
View File
@@ -225,7 +225,7 @@ public abstract class AbstractArc extends RectangularShape implements IArc
/** The path iterator transformation */
private AffineTransform t;
/** The current segmenet index */
/** The current segment index */
private int index;
/** The number of arc segments the source arc subdivided to be approximated by Bezier
@@ -238,19 +238,19 @@ public abstract class AbstractArc extends RectangularShape implements IArc
/** The step to calculate next arc subdivision point */
private double step;
/** The tempopary value of cosinus of the current angle */
/** The temporary value of cosinus of the current angle */
private double cos;
/** The tempopary value of sinus of the current angle */
/** The temporary value of sinus of the current angle */
private double sin;
/** The coefficient to calculate control points of Bezier curves */
private double k;
/** The tempopary value of x coordinate of the Bezier curve control vector */
/** The temporary value of x coordinate of the Bezier curve control vector */
private double kx;
/** The tempopary value of y coordinate of the Bezier curve control vector */
/** The temporary value of y coordinate of the Bezier curve control vector */
private double ky;
/** The x coordinate of the first path point (MOVE_TO) */
@@ -170,7 +170,7 @@ public abstract class AbstractRectangle extends RectangularShape implements IRec
private double x, y, width, height;
private AffineTransform t;
/** The current segmenet index. */
/** The current segment index. */
private int index;
Iterator (IRectangle r, AffineTransform at) {
+1 -1
View File
@@ -1236,7 +1236,7 @@ public class Area implements IShape, Cloneable
/** offsets[i] - index in array of coords and i - index in array of rules. */
private int[] offsets = new int[10];
/** The quantity of MOVETO rule occurences. */
/** The quantity of MOVETO rule occurrences. */
private int moveToCount = 0;
/** True if the shape is polygonal. */
+3
View File
@@ -61,8 +61,11 @@ public interface ILine extends IShape, Cloneable
/** Returns the distance from the supplied point this line segment. */
double pointSegDist (IPoint p);
/** Returns an indicator of where the specified point (px,py) lies with respect to this line
* segment. */
int relativeCCW (double px, double py);
/** Returns an indicator of where the specified point lies with respect to this line segment. */
int relativeCCW (IPoint p);
/** Returns a mutable copy of this line. */
+1 -1
View File
@@ -359,7 +359,7 @@ public final class Path implements IShape, Cloneable
/* The path rule. */
protected int rule;
/** The space required in points buffer for different segmenet types. */
/** The space required in points buffer for different segment types. */
protected static int[] pointShift = { 2, // MOVETO
2, // LINETO
4, // QUADTO
+2 -2
View File
@@ -10,7 +10,7 @@ package pythagoras.d;
public class Points
{
/**
* Returns the squared Euclidian distance between the specified two points.
* Returns the squared Euclidean distance between the specified two points.
*/
public static double distanceSq (double x1, double y1, double x2, double y2) {
x2 -= x1;
@@ -19,7 +19,7 @@ public class Points
}
/**
* Returns the Euclidian distance between the specified two points.
* Returns the Euclidean distance between the specified two points.
*/
public static double distance (double x1, double y1, double x2, double y2) {
return Math.sqrt(distanceSq(x1, y1, x2, y2));
+5 -5
View File
@@ -225,7 +225,7 @@ public abstract class AbstractArc extends RectangularShape implements IArc
/** The path iterator transformation */
private AffineTransform t;
/** The current segmenet index */
/** The current segment index */
private int index;
/** The number of arc segments the source arc subdivided to be approximated by Bezier
@@ -238,19 +238,19 @@ public abstract class AbstractArc extends RectangularShape implements IArc
/** The step to calculate next arc subdivision point */
private float step;
/** The tempopary value of cosinus of the current angle */
/** The temporary value of cosinus of the current angle */
private float cos;
/** The tempopary value of sinus of the current angle */
/** The temporary value of sinus of the current angle */
private float sin;
/** The coefficient to calculate control points of Bezier curves */
private float k;
/** The tempopary value of x coordinate of the Bezier curve control vector */
/** The temporary value of x coordinate of the Bezier curve control vector */
private float kx;
/** The tempopary value of y coordinate of the Bezier curve control vector */
/** The temporary value of y coordinate of the Bezier curve control vector */
private float ky;
/** The x coordinate of the first path point (MOVE_TO) */
@@ -167,7 +167,7 @@ public abstract class AbstractRectangle extends RectangularShape implements IRec
private float x, y, width, height;
private AffineTransform t;
/** The current segmenet index. */
/** The current segment index. */
private int index;
Iterator (IRectangle r, AffineTransform at) {
+1 -1
View File
@@ -1236,7 +1236,7 @@ public class Area implements IShape, Cloneable
/** offsets[i] - index in array of coords and i - index in array of rules. */
private int[] offsets = new int[10];
/** The quantity of MOVETO rule occurences. */
/** The quantity of MOVETO rule occurrences. */
private int moveToCount = 0;
/** True if the shape is polygonal. */
+3
View File
@@ -61,8 +61,11 @@ public interface ILine extends IShape, Cloneable
/** Returns the distance from the supplied point this line segment. */
float pointSegDist (IPoint p);
/** Returns an indicator of where the specified point (px,py) lies with respect to this line
* segment. */
int relativeCCW (float px, float py);
/** Returns an indicator of where the specified point lies with respect to this line segment. */
int relativeCCW (IPoint p);
/** Returns a mutable copy of this line. */
+1 -1
View File
@@ -359,7 +359,7 @@ public final class Path implements IShape, Cloneable
/* The path rule. */
protected int rule;
/** The space required in points buffer for different segmenet types. */
/** The space required in points buffer for different segment types. */
protected static int[] pointShift = { 2, // MOVETO
2, // LINETO
4, // QUADTO
+2 -2
View File
@@ -10,7 +10,7 @@ package pythagoras.f;
public class Points
{
/**
* Returns the squared Euclidian distance between the specified two points.
* Returns the squared Euclidean distance between the specified two points.
*/
public static float distanceSq (float x1, float y1, float x2, float y2) {
x2 -= x1;
@@ -19,7 +19,7 @@ public class Points
}
/**
* Returns the Euclidian distance between the specified two points.
* Returns the Euclidean distance between the specified two points.
*/
public static float distance (float x1, float y1, float x2, float y2) {
return (float)Math.sqrt(distanceSq(x1, y1, x2, y2));