Javadoc fixes and improvements.

This commit is contained in:
Michael Bayne
2011-06-13 12:30:06 -07:00
parent 520167978e
commit f3b646a63f
21 changed files with 44 additions and 24 deletions
@@ -10,7 +10,7 @@ import java.io.Serializable;
* Represents a 2D affine transform, which performs a linear mapping that preserves the * Represents a 2D affine transform, which performs a linear mapping that preserves the
* straightness and parallelness of lines. * straightness and parallelness of lines.
* *
* @see http://download.oracle.com/javase/6/docs/api/java/awt/geom/AffineTransform.html * See http://download.oracle.com/javase/6/docs/api/java/awt/geom/AffineTransform.html
*/ */
public class AffineTransform implements Cloneable, Serializable public class AffineTransform implements Cloneable, Serializable
{ {
+1 -1
View File
@@ -8,7 +8,7 @@ import java.util.NoSuchElementException;
/** /**
* Stores and manipulates an enclosed area of 2D space. * Stores and manipulates an enclosed area of 2D space.
* @see http://download.oracle.com/javase/6/docs/api/java/awt/geom/Area.html * See http://download.oracle.com/javase/6/docs/api/java/awt/geom/Area.html
*/ */
public class Area implements IShape, Cloneable public class Area implements IShape, Cloneable
{ {
+2 -2
View File
@@ -74,7 +74,7 @@ public class CubicCurve extends AbstractCubicCurve implements Serializable
/** /**
* Configures the start, control and end points for this curve, using the values at the * Configures the start, control and end points for this curve, using the values at the
* specified offset in the {@link coords} array. * specified offset in the {@code coords} array.
*/ */
public void setCurve (double[] coords, int offset) { public void setCurve (double[] coords, int offset) {
setCurve(coords[offset + 0], coords[offset + 1], coords[offset + 2], coords[offset + 3], setCurve(coords[offset + 0], coords[offset + 1], coords[offset + 2], coords[offset + 3],
@@ -83,7 +83,7 @@ public class CubicCurve extends AbstractCubicCurve implements Serializable
/** /**
* Configures the start, control and end points for this curve, using the values at the * Configures the start, control and end points for this curve, using the values at the
* specified offset in the {@link points} array. * specified offset in the {@code points} array.
*/ */
public void setCurve (IPoint[] points, int offset) { public void setCurve (IPoint[] points, int offset) {
setCurve(points[offset + 0].getX(), points[offset + 0].getY(), setCurve(points[offset + 0].getX(), points[offset + 0].getY(),
@@ -5,7 +5,7 @@
package pythagoras.d; package pythagoras.d;
/** /**
* An interface implemented by {@link Shape} classes whose geometry is defined by a rectangular * An interface implemented by {@link IShape} classes whose geometry is defined by a rectangular
* frame. The framing rectangle <em>defines</em> the geometry, but may in some cases differ from * frame. The framing rectangle <em>defines</em> the geometry, but may in some cases differ from
* the <em>bounding</em> rectangle of the shape. * the <em>bounding</em> rectangle of the shape.
*/ */
+1 -1
View File
@@ -128,7 +128,7 @@ public class Lines
* Returns an indicator of where the specified point (px,py) lies with respect to the line * Returns an indicator of where the specified point (px,py) lies with respect to the line
* segment from (x1,y1) to (x2,y2). * segment from (x1,y1) to (x2,y2).
* *
* @see http://download.oracle.com/javase/6/docs/api/java/awt/geom/Line2D.html * See http://download.oracle.com/javase/6/docs/api/java/awt/geom/Line2D.html
*/ */
public static int relativeCCW (double px, double py, public static int relativeCCW (double px, double py,
double x1, double y1, double x2, double y2) { double x1, double y1, double x2, double y2) {
+1 -1
View File
@@ -5,7 +5,7 @@
package pythagoras.d; package pythagoras.d;
/** /**
* Used to return the boundary of a {@link IShape}, one segment at a time. * Used to return the boundary of an {@link IShape}, one segment at a time.
*/ */
public interface PathIterator public interface PathIterator
{ {
+2 -2
View File
@@ -63,7 +63,7 @@ public class QuadCurve extends AbstractQuadCurve implements Serializable
/** /**
* Configures the start, control, and end points for this curve, using the values at the * Configures the start, control, and end points for this curve, using the values at the
* specified offset in the {@link coords} array. * specified offset in the {@code coords} array.
*/ */
public void setCurve (double[] coords, int offset) { public void setCurve (double[] coords, int offset) {
setCurve(coords[offset + 0], coords[offset + 1], setCurve(coords[offset + 0], coords[offset + 1],
@@ -73,7 +73,7 @@ public class QuadCurve extends AbstractQuadCurve implements Serializable
/** /**
* Configures the start, control, and end points for this curve, using the values at the * Configures the start, control, and end points for this curve, using the values at the
* specified offset in the {@link points} array. * specified offset in the {@code points} array.
*/ */
public void setCurve (IPoint[] points, int offset) { public void setCurve (IPoint[] points, int offset) {
setCurve(points[offset + 0].getX(), points[offset + 0].getY(), setCurve(points[offset + 0].getX(), points[offset + 0].getY(),
+2 -2
View File
@@ -10,7 +10,7 @@ package pythagoras.d;
public class Rectangles public class Rectangles
{ {
/** /**
* Intersects the supplied two rectangles, writing the result into {@link dst}. * Intersects the supplied two rectangles, writing the result into {@code dst}.
*/ */
public static void intersect (IRectangle src1, IRectangle src2, Rectangle dst) { public static void intersect (IRectangle src1, IRectangle src2, Rectangle dst) {
double x1 = Math.max(src1.getMinX(), src2.getMinX()); double x1 = Math.max(src1.getMinX(), src2.getMinX());
@@ -21,7 +21,7 @@ public class Rectangles
} }
/** /**
* Unions the supplied two rectangles, writing the result into {@link dst}. * Unions the supplied two rectangles, writing the result into {@code dst}.
*/ */
public static void union (IRectangle src1, IRectangle src2, Rectangle dst) { public static void union (IRectangle src1, IRectangle src2, Rectangle dst) {
double x1 = Math.min(src1.getMinX(), src2.getMinX()); double x1 = Math.min(src1.getMinX(), src2.getMinX());
@@ -5,7 +5,7 @@
package pythagoras.d; package pythagoras.d;
/** /**
* The base class for various {@link Shape} objects whose geometry is defined by a rectangular * The base class for various {@link IShape} objects whose geometry is defined by a rectangular
* frame. * frame.
*/ */
public abstract class RectangularShape implements IRectangularShape public abstract class RectangularShape implements IRectangularShape
@@ -0,0 +1,4 @@
/**
* The Pythagoras geometry utility classes specialized on {@code double}.
*/
package pythagoras.d;
@@ -10,7 +10,7 @@ import java.io.Serializable;
* Represents a 2D affine transform, which performs a linear mapping that preserves the * Represents a 2D affine transform, which performs a linear mapping that preserves the
* straightness and parallelness of lines. * straightness and parallelness of lines.
* *
* @see http://download.oracle.com/javase/6/docs/api/java/awt/geom/AffineTransform.html * See http://download.oracle.com/javase/6/docs/api/java/awt/geom/AffineTransform.html
*/ */
public class AffineTransform implements Cloneable, Serializable public class AffineTransform implements Cloneable, Serializable
{ {
+1 -1
View File
@@ -8,7 +8,7 @@ import java.util.NoSuchElementException;
/** /**
* Stores and manipulates an enclosed area of 2D space. * Stores and manipulates an enclosed area of 2D space.
* @see http://download.oracle.com/javase/6/docs/api/java/awt/geom/Area.html * See http://download.oracle.com/javase/6/docs/api/java/awt/geom/Area.html
*/ */
public class Area implements IShape, Cloneable public class Area implements IShape, Cloneable
{ {
+2 -2
View File
@@ -74,7 +74,7 @@ public class CubicCurve extends AbstractCubicCurve implements Serializable
/** /**
* Configures the start, control and end points for this curve, using the values at the * Configures the start, control and end points for this curve, using the values at the
* specified offset in the {@link coords} array. * specified offset in the {@code coords} array.
*/ */
public void setCurve (float[] coords, int offset) { public void setCurve (float[] coords, int offset) {
setCurve(coords[offset + 0], coords[offset + 1], coords[offset + 2], coords[offset + 3], setCurve(coords[offset + 0], coords[offset + 1], coords[offset + 2], coords[offset + 3],
@@ -83,7 +83,7 @@ public class CubicCurve extends AbstractCubicCurve implements Serializable
/** /**
* Configures the start, control and end points for this curve, using the values at the * Configures the start, control and end points for this curve, using the values at the
* specified offset in the {@link points} array. * specified offset in the {@code points} array.
*/ */
public void setCurve (IPoint[] points, int offset) { public void setCurve (IPoint[] points, int offset) {
setCurve(points[offset + 0].getX(), points[offset + 0].getY(), setCurve(points[offset + 0].getX(), points[offset + 0].getY(),
@@ -5,7 +5,7 @@
package pythagoras.f; package pythagoras.f;
/** /**
* An interface implemented by {@link Shape} classes whose geometry is defined by a rectangular * An interface implemented by {@link IShape} classes whose geometry is defined by a rectangular
* frame. The framing rectangle <em>defines</em> the geometry, but may in some cases differ from * frame. The framing rectangle <em>defines</em> the geometry, but may in some cases differ from
* the <em>bounding</em> rectangle of the shape. * the <em>bounding</em> rectangle of the shape.
*/ */
+1 -1
View File
@@ -126,7 +126,7 @@ public class Lines
* Returns an indicator of where the specified point (px,py) lies with respect to the line * Returns an indicator of where the specified point (px,py) lies with respect to the line
* segment from (x1,y1) to (x2,y2). * segment from (x1,y1) to (x2,y2).
* *
* @see http://download.oracle.com/javase/6/docs/api/java/awt/geom/Line2D.html * See http://download.oracle.com/javase/6/docs/api/java/awt/geom/Line2D.html
*/ */
public static int relativeCCW (float px, float py, float x1, float y1, float x2, float y2) { public static int relativeCCW (float px, float py, float x1, float y1, float x2, float y2) {
// A = (x2-x1, y2-y1) // A = (x2-x1, y2-y1)
+1 -1
View File
@@ -5,7 +5,7 @@
package pythagoras.f; package pythagoras.f;
/** /**
* Used to return the boundary of a {@link IShape}, one segment at a time. * Used to return the boundary of an {@link IShape}, one segment at a time.
*/ */
public interface PathIterator public interface PathIterator
{ {
+2 -2
View File
@@ -63,7 +63,7 @@ public class QuadCurve extends AbstractQuadCurve implements Serializable
/** /**
* Configures the start, control, and end points for this curve, using the values at the * Configures the start, control, and end points for this curve, using the values at the
* specified offset in the {@link coords} array. * specified offset in the {@code coords} array.
*/ */
public void setCurve (float[] coords, int offset) { public void setCurve (float[] coords, int offset) {
setCurve(coords[offset + 0], coords[offset + 1], setCurve(coords[offset + 0], coords[offset + 1],
@@ -73,7 +73,7 @@ public class QuadCurve extends AbstractQuadCurve implements Serializable
/** /**
* Configures the start, control, and end points for this curve, using the values at the * Configures the start, control, and end points for this curve, using the values at the
* specified offset in the {@link points} array. * specified offset in the {@code points} array.
*/ */
public void setCurve (IPoint[] points, int offset) { public void setCurve (IPoint[] points, int offset) {
setCurve(points[offset + 0].getX(), points[offset + 0].getY(), setCurve(points[offset + 0].getX(), points[offset + 0].getY(),
+2 -2
View File
@@ -10,7 +10,7 @@ package pythagoras.f;
public class Rectangles public class Rectangles
{ {
/** /**
* Intersects the supplied two rectangles, writing the result into {@link dst}. * Intersects the supplied two rectangles, writing the result into {@code dst}.
*/ */
public static void intersect (IRectangle src1, IRectangle src2, Rectangle dst) { public static void intersect (IRectangle src1, IRectangle src2, Rectangle dst) {
float x1 = Math.max(src1.getMinX(), src2.getMinX()); float x1 = Math.max(src1.getMinX(), src2.getMinX());
@@ -21,7 +21,7 @@ public class Rectangles
} }
/** /**
* Unions the supplied two rectangles, writing the result into {@link dst}. * Unions the supplied two rectangles, writing the result into {@code dst}.
*/ */
public static void union (IRectangle src1, IRectangle src2, Rectangle dst) { public static void union (IRectangle src1, IRectangle src2, Rectangle dst) {
float x1 = Math.min(src1.getMinX(), src2.getMinX()); float x1 = Math.min(src1.getMinX(), src2.getMinX());
@@ -5,7 +5,7 @@
package pythagoras.f; package pythagoras.f;
/** /**
* The base class for various {@link Shape} objects whose geometry is defined by a rectangular * The base class for various {@link IShape} objects whose geometry is defined by a rectangular
* frame. * frame.
*/ */
public abstract class RectangularShape implements IRectangularShape public abstract class RectangularShape implements IRectangularShape
@@ -0,0 +1,4 @@
/**
* The Pythagoras geometry utility classes specialized on {@code float}.
*/
package pythagoras.f;
+12
View File
@@ -0,0 +1,12 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<body bgcolor="white">
<p> Pythagoras is a collection of geometry classes for use on platforms that do not vend their own
such classes (for example, GWT and Android). </p>
<p> The source code, and additional information can be found on the
<a href="http://github.com/samskivert/pythagoras">project website</a>. </p>
</body>
</html>