@@ -225,7 +225,7 @@ public abstract class AbstractArc extends RectangularShape implements IArc
|
|||||||
/** The path iterator transformation */
|
/** The path iterator transformation */
|
||||||
private AffineTransform t;
|
private AffineTransform t;
|
||||||
|
|
||||||
/** The current segmenet index */
|
/** The current segment index */
|
||||||
private int index;
|
private int index;
|
||||||
|
|
||||||
/** The number of arc segments the source arc subdivided to be approximated by Bezier
|
/** 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 */
|
/** The step to calculate next arc subdivision point */
|
||||||
private double step;
|
private double step;
|
||||||
|
|
||||||
/** The tempopary value of cosinus of the current angle */
|
/** The temporary value of cosinus of the current angle */
|
||||||
private double cos;
|
private double cos;
|
||||||
|
|
||||||
/** The tempopary value of sinus of the current angle */
|
/** The temporary value of sinus of the current angle */
|
||||||
private double sin;
|
private double sin;
|
||||||
|
|
||||||
/** The coefficient to calculate control points of Bezier curves */
|
/** The coefficient to calculate control points of Bezier curves */
|
||||||
private double k;
|
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;
|
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;
|
private double ky;
|
||||||
|
|
||||||
/** The x coordinate of the first path point (MOVE_TO) */
|
/** 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 double x, y, width, height;
|
||||||
private AffineTransform t;
|
private AffineTransform t;
|
||||||
|
|
||||||
/** The current segmenet index. */
|
/** The current segment index. */
|
||||||
private int index;
|
private int index;
|
||||||
|
|
||||||
Iterator (IRectangle r, AffineTransform at) {
|
Iterator (IRectangle r, AffineTransform at) {
|
||||||
|
|||||||
@@ -1236,7 +1236,7 @@ public class Area implements IShape, Cloneable
|
|||||||
/** offsets[i] - index in array of coords and i - index in array of rules. */
|
/** offsets[i] - index in array of coords and i - index in array of rules. */
|
||||||
private int[] offsets = new int[10];
|
private int[] offsets = new int[10];
|
||||||
|
|
||||||
/** The quantity of MOVETO rule occurences. */
|
/** The quantity of MOVETO rule occurrences. */
|
||||||
private int moveToCount = 0;
|
private int moveToCount = 0;
|
||||||
|
|
||||||
/** True if the shape is polygonal. */
|
/** True if the shape is polygonal. */
|
||||||
|
|||||||
@@ -61,8 +61,11 @@ public interface ILine extends IShape, Cloneable
|
|||||||
/** Returns the distance from the supplied point this line segment. */
|
/** Returns the distance from the supplied point this line segment. */
|
||||||
double pointSegDist (IPoint p);
|
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);
|
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);
|
int relativeCCW (IPoint p);
|
||||||
|
|
||||||
/** Returns a mutable copy of this line. */
|
/** Returns a mutable copy of this line. */
|
||||||
|
|||||||
@@ -359,7 +359,7 @@ public final class Path implements IShape, Cloneable
|
|||||||
/* The path rule. */
|
/* The path rule. */
|
||||||
protected int 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
|
protected static int[] pointShift = { 2, // MOVETO
|
||||||
2, // LINETO
|
2, // LINETO
|
||||||
4, // QUADTO
|
4, // QUADTO
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ package pythagoras.d;
|
|||||||
public class Points
|
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) {
|
public static double distanceSq (double x1, double y1, double x2, double y2) {
|
||||||
x2 -= x1;
|
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) {
|
public static double distance (double x1, double y1, double x2, double y2) {
|
||||||
return Math.sqrt(distanceSq(x1, y1, x2, y2));
|
return Math.sqrt(distanceSq(x1, y1, x2, y2));
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ public abstract class AbstractArc extends RectangularShape implements IArc
|
|||||||
/** The path iterator transformation */
|
/** The path iterator transformation */
|
||||||
private AffineTransform t;
|
private AffineTransform t;
|
||||||
|
|
||||||
/** The current segmenet index */
|
/** The current segment index */
|
||||||
private int index;
|
private int index;
|
||||||
|
|
||||||
/** The number of arc segments the source arc subdivided to be approximated by Bezier
|
/** 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 */
|
/** The step to calculate next arc subdivision point */
|
||||||
private float step;
|
private float step;
|
||||||
|
|
||||||
/** The tempopary value of cosinus of the current angle */
|
/** The temporary value of cosinus of the current angle */
|
||||||
private float cos;
|
private float cos;
|
||||||
|
|
||||||
/** The tempopary value of sinus of the current angle */
|
/** The temporary value of sinus of the current angle */
|
||||||
private float sin;
|
private float sin;
|
||||||
|
|
||||||
/** The coefficient to calculate control points of Bezier curves */
|
/** The coefficient to calculate control points of Bezier curves */
|
||||||
private float k;
|
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;
|
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;
|
private float ky;
|
||||||
|
|
||||||
/** The x coordinate of the first path point (MOVE_TO) */
|
/** 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 float x, y, width, height;
|
||||||
private AffineTransform t;
|
private AffineTransform t;
|
||||||
|
|
||||||
/** The current segmenet index. */
|
/** The current segment index. */
|
||||||
private int index;
|
private int index;
|
||||||
|
|
||||||
Iterator (IRectangle r, AffineTransform at) {
|
Iterator (IRectangle r, AffineTransform at) {
|
||||||
|
|||||||
@@ -1236,7 +1236,7 @@ public class Area implements IShape, Cloneable
|
|||||||
/** offsets[i] - index in array of coords and i - index in array of rules. */
|
/** offsets[i] - index in array of coords and i - index in array of rules. */
|
||||||
private int[] offsets = new int[10];
|
private int[] offsets = new int[10];
|
||||||
|
|
||||||
/** The quantity of MOVETO rule occurences. */
|
/** The quantity of MOVETO rule occurrences. */
|
||||||
private int moveToCount = 0;
|
private int moveToCount = 0;
|
||||||
|
|
||||||
/** True if the shape is polygonal. */
|
/** True if the shape is polygonal. */
|
||||||
|
|||||||
@@ -61,8 +61,11 @@ public interface ILine extends IShape, Cloneable
|
|||||||
/** Returns the distance from the supplied point this line segment. */
|
/** Returns the distance from the supplied point this line segment. */
|
||||||
float pointSegDist (IPoint p);
|
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);
|
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);
|
int relativeCCW (IPoint p);
|
||||||
|
|
||||||
/** Returns a mutable copy of this line. */
|
/** Returns a mutable copy of this line. */
|
||||||
|
|||||||
@@ -359,7 +359,7 @@ public final class Path implements IShape, Cloneable
|
|||||||
/* The path rule. */
|
/* The path rule. */
|
||||||
protected int 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
|
protected static int[] pointShift = { 2, // MOVETO
|
||||||
2, // LINETO
|
2, // LINETO
|
||||||
4, // QUADTO
|
4, // QUADTO
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ package pythagoras.f;
|
|||||||
public class Points
|
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) {
|
public static float distanceSq (float x1, float y1, float x2, float y2) {
|
||||||
x2 -= x1;
|
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) {
|
public static float distance (float x1, float y1, float x2, float y2) {
|
||||||
return (float)Math.sqrt(distanceSq(x1, y1, x2, y2));
|
return (float)Math.sqrt(distanceSq(x1, y1, x2, y2));
|
||||||
|
|||||||
Reference in New Issue
Block a user