java.lang.Object
java.awt.geom.Point2D
java.awt.geom.Point2D.Double
jpicedt.graphic.PicPoint
- All Implemented Interfaces:
- java.lang.Cloneable
- public class PicPoint
- extends java.awt.geom.Point2D.Double
Enhancement of Point2D.Double
- Since:
- PicEdt 1.0
Nested classes inherited from class java.awt.geom.Point2D |
java.awt.geom.Point2D.Double, java.awt.geom.Point2D.Float |
Fields inherited from class java.awt.geom.Point2D.Double |
x, y |
Method Summary |
double[] |
toDoubleArray(double[] f)
|
float[] |
toFloatArray(float[] f)
|
PicPoint |
toMm(double unitLength)
convert a PicPoint with coordinate in the given unitlenth (expressed in mm)
to a new PicPoint in mm coordinate. |
PicPoint |
toMm(double xUnit,
double yUnit)
convert a PicPoint with coordinate in the given unitlenths along X and Y axis (expressed in mm)
to a new PicPoint in mm coordinate. |
java.lang.String |
toString()
Returns a string representation of this object. |
void |
translate(double dx,
double dy)
translates this point by (dx,dy) |
Methods inherited from class java.awt.geom.Point2D.Double |
getX, getY, setLocation |
PicPoint
public PicPoint()
- Construct a (0,0) point.
- Since:
- jPicEdt 1.3.2
PicPoint
public PicPoint(PicPoint picPoint)
- Clone the given point.
- Since:
- jPicEdt 1.3.2
PicPoint
public PicPoint(java.awt.Point pt)
- Clone the given point.
- Since:
- jPicEdt 1.3.2
PicPoint
public PicPoint(double x,
double y)
- Construct (x,y)
- Since:
- jPicEdt 1.3.2
PicPoint
public PicPoint(java.lang.Number x,
java.lang.Number y)
- Construct a point from the given pair of Number (using their double value).
- Since:
- jPicEdt 1.3.2
PicPoint
public PicPoint(float[] f)
- Construct a point from the first two elements of the given array.
- Since:
- jPicEdt 1.3.2
PicPoint
public PicPoint(double[] f)
- Construct a point from the first two elements of the given array.
- Since:
- jPicEdt 1.3.2
toFloatArray
public float[] toFloatArray(float[] f)
- Since:
- jPicEdt 1.3.2
toDoubleArray
public double[] toDoubleArray(double[] f)
- Since:
- jPicEdt 1.3.2
toString
public java.lang.String toString()
- Description copied from class:
java.awt.geom.Point2D.Double
- Returns a string representation of this object. The format is:
"Point2D.Double[" + x + ", " + y + ']'
.
- Since:
- PicEdt 1.1
toMm
public PicPoint toMm(double unitLength)
- convert a PicPoint with coordinate in the given unitlenth (expressed in mm)
to a new PicPoint in mm coordinate.
- Since:
- PicEdt 1.0
toMm
public PicPoint toMm(double xUnit,
double yUnit)
- convert a PicPoint with coordinate in the given unitlenths along X and Y axis (expressed in mm)
to a new PicPoint in mm coordinate.
- Since:
- jPicEdt 1.3.2
translate
public void translate(double dx,
double dy)
- translates this point by (dx,dy)
- Since:
- PicEdt 1.0