Constructor Detail

Arc2D

protected Arc2D()

This is an abstract class that cannot be instantiated directly.
Type-specific implementation subclasses are available for
instantiation and provide a number of formats for storing
the information necessary to satisfy the various accessor
methods below.

This constructor creates an object with a default closure
type of OPEN. It is provided only to enable
serialization of subclasses.

Arc2D

protected Arc2D(int type)

This is an abstract class that cannot be instantiated directly.
Type-specific implementation subclasses are available for
instantiation and provide a number of formats for storing
the information necessary to satisfy the various accessor
methods below.

setArcByCenter

Sets the position, bounds, angular extents, and closure type of
this arc to the specified values. The arc is defined by a center
point and a radius rather than a framing rectangle for the full ellipse.

setArcByTangent

Sets the position, bounds, and angular extents of this arc to the
specified value. The starting angle of the arc is tangent to the
line specified by points (p1, p2), the ending angle is tangent to
the line specified by points (p2, p3), and the arc has the
specified radius.

Parameters:

p1 - The first point that defines the arc. The starting
angle of the arc is tangent to the line specified by points (p1, p2).

p2 - The second point that defines the arc. The starting
angle of the arc is tangent to the line specified by points (p1, p2).
The ending angle of the arc is tangent to the line specified by
points (p2, p3).

p3 - The third point that defines the arc. The ending angle
of the arc is tangent to the line specified by points (p2, p3).

setAngles

public void setAngles(double x1,
double y1,
double x2,
double y2)

Sets the starting angle and angular extent of this arc using two
sets of coordinates. The first set of coordinates is used to
determine the angle of the starting point relative to the arc's
center. The second set of coordinates is used to determine the
angle of the end point relative to the arc's center.
The arc will always be non-empty and extend counterclockwise
from the first point around to the second point.

Parameters:

x1 - The X coordinate of the arc's starting point.

y1 - The Y coordinate of the arc's starting point.

x2 - The X coordinate of the arc's ending point.

y2 - The Y coordinate of the arc's ending point.

Since:

1.2

setAngles

Sets the starting angle and angular extent of this arc using
two points. The first point is used to determine the angle of
the starting point relative to the arc's center.
The second point is used to determine the angle of the end point
relative to the arc's center.
The arc will always be non-empty and extend counterclockwise
from the first point around to the second point.

Parameters:

p1 - The Point2D that defines the arc's
starting point.

p2 - The Point2D that defines the arc's
ending point.

Since:

1.2

setArcType

public void setArcType(int type)

Sets the closure type of this arc to the specified value:
OPEN, CHORD, or PIE.

Parameters:

type - The integer constant that represents the closure
type of this arc: OPEN, CHORD, or
PIE.

getBounds2D

Returns the high-precision framing rectangle of the arc. The framing
rectangle contains only the part of this Arc2D that is
in between the starting and ending angles and contains the pie
wedge, if this Arc2D has a PIE closure type.

This method differs from the
getBounds in that the
getBounds method only returns the bounds of the
enclosing ellipse of this Arc2D without considering
the starting and ending angles of this Arc2D.

getPathIterator

Returns an iteration object that defines the boundary of the
arc.
This iterator is multithread safe.
Arc2D guarantees that
modifications to the geometry of the arc
do not affect any iterations of that geometry that
are already in process.

Parameters:

at - an optional AffineTransform to be applied
to the coordinates as they are returned in the iteration, or null
if the untransformed coordinates are desired.

equals

Determines whether or not the specified Object is
equal to this Arc2D. The specified
Object is equal to this Arc2D
if it is an instance of Arc2D and if its
location, size, arc extents and type are the same as this
Arc2D.