This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


java.awt.geom
class Path2D.Double

java.lang.Object extended by java.awt.geom.Path2D extended by java.awt.geom.Path2D.Double
All Implemented Interfaces:
Shape, Serializable, Cloneable
Enclosing class:
Path2D

public static class Path2D.Double
extends Path2D
implements Serializable

The {@code Double} class defines a geometric path with coordinates stored in double precision floating point.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.geom.Path2D
Path2D.Double, Path2D.Float
   
Field Summary
 
Fields inherited from class java.awt.geom.Path2D
WIND_EVEN_ODD, WIND_NON_ZERO
 
Constructor Summary

          Constructs a new empty double precision object with a default winding rule of java.awt.geom.Path2D.WIND_NON_ZERO.
Path2D.Double(int rule)

          Constructs a new empty double precision object with the specified winding rule to control operations that require the interior of the path to be defined.
Path2D.Double(int rule, int initialCapacity)

          Constructs a new empty double precision object with the specified winding rule and the specified initial capacity to store path segments.

          Constructs a new double precision object from an arbitrary java.awt.Shape object.

          Constructs a new double precision object from an arbitrary java.awt.Shape object, transformed by an java.awt.geom.AffineTransform object.
 
Method Summary
 void
append(PathIterator pi, boolean connect)

          Appends the geometry of the specified object to the path, possibly connecting the new geometry to the existing path segments with a line segment.
 Object

          Creates a new object of the same class as this object.
 void
curveTo(double x1, double y1, double x2, double y2, double x3, double y3)

          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 , using the specified points and as Bézier control points.
 Rectangle2D

          
 PathIterator

          
 void
lineTo(double x, double y)

          Adds a point to the path by drawing a straight line from the current coordinates to the new specified coordinates specified in double precision.
 void
moveTo(double x, double y)

          Adds a point to the path by moving to the specified coordinates specified in double precision.
 void
quadTo(double x1, double y1, double x2, double y2)

          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 , using the specified point as a quadratic parametric control point.
 void

          Transforms the geometry of this path using the specified java.awt.geom.AffineTransform.
 
Methods inherited from class java.awt.geom.Path2D
append, append, clone, closePath, contains, contains, contains, contains, contains, contains, contains, contains, createTransformedShape, curveTo, getBounds, getCurrentPoint, getPathIterator, getWindingRule, intersects, intersects, intersects, intersects, lineTo, moveTo, quadTo, reset, setWindingRule, transform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Path2D.Double

public Path2D.Double()
Constructs a new empty double precision {@code Path2D} object with a default winding rule of {@link #WIND_NON_ZERO}.


Path2D.Double

public Path2D.Double(int rule)
Constructs a new empty double precision {@code Path2D} object with the specified winding rule to control operations that require the interior of the path to be defined.

Parameters:
rule - the winding rule

Path2D.Double

public Path2D.Double(int rule,
                     int initialCapacity)
Constructs a new empty double precision {@code 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.

Parameters:
rule - the winding rule
initialCapacity - the estimate for the number of path segments in the path

Path2D.Double

public Path2D.Double(Shape s)
Constructs a new double precision {@code Path2D} object from an arbitrary {@link Shape} object. All of the initial geometry and the winding rule for this path are taken from the specified {@code Shape} object.

Parameters:
s - the specified {@code Shape} object

Path2D.Double

public Path2D.Double(Shape s,
                     AffineTransform at)
Constructs a new double precision {@code Path2D} object from an arbitrary {@link Shape} object, transformed by an {@link AffineTransform} object. All of the initial geometry and the winding rule for this path are taken from the specified {@code Shape} object and transformed by the specified {@code AffineTransform} object.

Parameters:
s - the specified {@code Shape} object
at - the specified {@code AffineTransform} object
Method Detail

append

public final void append(PathIterator pi,
                         boolean connect)
{@inheritDoc}

Overrides:
append in class Path2D
Parameters:
pi
connect

clone

public final Object clone()
Creates a new object of the same class as this object.

Overrides:
clone in class Path2D
Returns:
a clone of this instance.

curveTo

public final synchronized void curveTo(double x1,
                                       double y1,
                                       double x2,
                                       double y2,
                                       double x3,
                                       double y3)
{@inheritDoc}

Overrides:
curveTo in class Path2D
Parameters:
x1
y1
x2
y2
x3
y3

getBounds2D

public final synchronized Rectangle2D getBounds2D()
{@inheritDoc}


getPathIterator

public PathIterator getPathIterator(AffineTransform at)
{@inheritDoc}

The iterator for this class is not multi-threaded safe, which means that the {@code Path2D} class does not guarantee that modifications to the geometry of this {@code Path2D} object do not affect any iterations of that geometry that are already in process.

Parameters:
at - an {@code AffineTransform}
Returns:
a new {@code PathIterator} that iterates along the boundary of this {@code Shape} and provides access to the geometry of this {@code Shape}'s outline

lineTo

public final synchronized void lineTo(double x,
                                      double y)
{@inheritDoc}

Overrides:
lineTo in class Path2D
Parameters:
x
y

moveTo

public final synchronized void moveTo(double x,
                                      double y)
{@inheritDoc}

Overrides:
moveTo in class Path2D
Parameters:
x
y

quadTo

public final synchronized void quadTo(double x1,
                                      double y1,
                                      double x2,
                                      double y2)
{@inheritDoc}

Overrides:
quadTo in class Path2D
Parameters:
x1
y1
x2
y2

transform

public final void transform(AffineTransform at)
{@inheritDoc}

Overrides:
transform in class Path2D
Parameters:
at


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.