java.lang.Object | ||
↳ | java.awt.geom.Path2D | |
↳ | java.awt.geom.Path2D.Double |
The Double
class defines a geometric path with
coordinates stored in double precision floating point.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.awt.geom.Path2D
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new empty double precision
Path2D object
with a default winding rule of WIND_NON_ZERO . | |||||||||||
Constructs a new empty double precision
Path2D object
with the specified winding rule to control operations that
require the interior of the path to be defined. | |||||||||||
Constructs a new empty double precision
Path2D object
with the specified winding rule and the specified initial
capacity to store path segments. | |||||||||||
Constructs a new double precision
Path2D object
from an arbitrary Shape object. | |||||||||||
Constructs a new double precision
Path2D object
from an arbitrary Shape object, transformed by an
AffineTransform object. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Appends the geometry of the specified
PathIterator object
to the path, possibly connecting the new geometry to the existing
path segments with a line segment. | |||||||||||
Creates a new object of the same class as this object.
| |||||||||||
Adds a curved segment, defined by three new points, to the path by
drawing a Bézier curve that intersects both the current
coordinates and the specified coordinates
(x3,y3) ,
using the specified points (x1,y1) and (x2,y2) as
Bézier control points. | |||||||||||
The iterator for this class is not multi-threaded safe,
which means that the | |||||||||||
Adds a point to the path by drawing a straight line from the
current coordinates to the new specified coordinates
specified in double precision.
| |||||||||||
Adds a point to the path by moving to the specified
coordinates specified in double precision.
| |||||||||||
Adds a curved segment, defined by two new points, to the path by
drawing a Quadratic curve that intersects both the current
coordinates and the specified coordinates
(x2,y2) ,
using the specified point (x1,y1) as a quadratic
parametric control point. | |||||||||||
Transforms the geometry of this path using the specified
AffineTransform . |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.awt.geom.Path2D
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
java.awt.Shape
|
Constructs a new empty double precision Path2D
object
with a default winding rule of WIND_NON_ZERO
.
Constructs a new empty double precision Path2D
object
with the specified winding rule to control operations that
require the interior of the path to be defined.
rule | the winding rule |
---|
Constructs a new empty double precision Path2D
object
with the specified winding rule and the specified initial
capacity to store path segments.
This number is an initial guess as to how many path segments
are in the path, but the storage is expanded as needed to store
whatever path segments are added to this path.
rule | the winding rule |
---|---|
initialCapacity | the estimate for the number of path segments in the path |
Constructs a new double precision Path2D
object
from an arbitrary Shape
object.
All of the initial geometry and the winding rule for this path are
taken from the specified Shape
object.
s | the specified Shape object |
---|
Constructs a new double precision Path2D
object
from an arbitrary Shape
object, transformed by an
AffineTransform
object.
All of the initial geometry and the winding rule for this path are
taken from the specified Shape
object and transformed
by the specified AffineTransform
object.
s | the specified Shape object |
---|---|
at | the specified AffineTransform object |
Appends the geometry of the specified
PathIterator
object
to the path, possibly connecting the new geometry to the existing
path segments with a line segment.
If the connect
parameter is true
and the
path is not empty then any initial moveTo
in the
geometry of the appended Shape
is turned into a
lineTo
segment.
If the destination coordinates of such a connecting lineTo
segment match the ending coordinates of a currently open
subpath then the segment is omitted as superfluous.
The winding rule of the specified Shape
is ignored
and the appended geometry is governed by the winding
rule specified for this path.
pi | the PathIterator whose geometry is appended to
this path |
---|---|
connect | a boolean to control whether or not to turn an initial
moveTo segment into a lineTo segment
to connect the new geometry to the existing path |
Creates a new object of the same class as this object.
OutOfMemoryError | if there is not enough memory. |
---|
Adds a curved segment, defined by three new points, to the path by
drawing a Bézier curve that intersects both the current
coordinates and the specified coordinates (x3,y3)
,
using the specified points (x1,y1)
and (x2,y2)
as
Bézier control points.
All coordinates are specified in double precision.
x1 | the X coordinate of the first Bézier control point |
---|---|
y1 | the Y coordinate of the first Bézier control point |
x2 | the X coordinate of the second Bézier control point |
y2 | the Y coordinate of the second Bézier control point |
x3 | the X coordinate of the final end point |
y3 | the Y coordinate of the final end point |
The iterator for this class is not multi-threaded safe,
which means that the Path2D
class does not
guarantee that modifications to the geometry of this
Path2D
object do not affect any iterations of
that geometry that are already in process.
at | an AffineTransform |
---|
PathIterator
that iterates along the boundary
of this Shape
and provides access to the geometry
of this Shape
's outlineAdds a point to the path by drawing a straight line from the current coordinates to the new specified coordinates specified in double precision.
x | the specified X coordinate |
---|---|
y | the specified Y coordinate |
Adds a point to the path by moving to the specified coordinates specified in double precision.
x | the specified X coordinate |
---|---|
y | the specified Y coordinate |
Adds a curved segment, defined by two new points, to the path by
drawing a Quadratic curve that intersects both the current
coordinates and the specified coordinates (x2,y2)
,
using the specified point (x1,y1)
as a quadratic
parametric control point.
All coordinates are specified in double precision.
x1 | the X coordinate of the quadratic control point |
---|---|
y1 | the Y coordinate of the quadratic control point |
x2 | the X coordinate of the final end point |
y2 | the Y coordinate of the final end point |
Transforms the geometry of this path using the specified
AffineTransform
.
The geometry is transformed in place, which permanently changes the
boundary defined by this object.
at | the AffineTransform used to transform the area |
---|