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.Float

java.lang.Object extended by java.awt.geom.Path2D extended by java.awt.geom.Path2D.Float
All Implemented Interfaces:
Shape, Serializable, Cloneable
Direct Known Subclasses:
GeneralPath
Enclosing class:
Path2D

public static class Path2D.Float
extends Path2D
implements Serializable

The {@code Float} class defines a geometric path with coordinates stored in single 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 single precision object with a default winding rule of java.awt.geom.Path2D.WIND_NON_ZERO.
Path2D.Float(int rule)

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

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

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

          Constructs a new single 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.
 void
curveTo(float x1, float y1, float x2, float y2, float x3, float 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
lineTo(float x, float y)

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

          Adds a point to the path by moving to the specified coordinates specified in double precision.
 void
moveTo(float x, float y)

          Adds a point to the path by moving to the specified coordinates specified in float 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
quadTo(float x1, float y1, float x2, float 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.Float

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


Path2D.Float

public Path2D.Float(int rule)
Constructs a new empty single 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.Float

public Path2D.Float(int rule,
                    int initialCapacity)
Constructs a new empty single 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 will be added to the path, but the storage is expanded as needed to store whatever path segments are added.

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

Path2D.Float

public Path2D.Float(Shape s)
Constructs a new single 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.Float

public Path2D.Float(Shape s,
                    AffineTransform at)
Constructs a new single 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

curveTo

public final synchronized void curveTo(float x1,
                                       float y1,
                                       float x2,
                                       float y2,
                                       float x3,
                                       float 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 {@code (x3,y3)}, using the specified points {@code (x1,y1)} and {@code (x2,y2)} as Bézier control points. All coordinates are specified in float precision.

This method provides a single precision variant of the double precision {@code curveTo()} method on the base {@code Path2D} class.

Parameters:
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

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

lineTo

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

Overrides:
lineTo in class Path2D
Parameters:
x
y

lineTo

public final synchronized void lineTo(float x,
                                      float y)
Adds a point to the path by drawing a straight line from the current coordinates to the new specified coordinates specified in float precision.

This method provides a single precision variant of the double precision {@code lineTo()} method on the base {@code Path2D} class.

Parameters:
x - the specified X coordinate
y - the specified Y coordinate

moveTo

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

Overrides:
moveTo in class Path2D
Parameters:
x
y

moveTo

public final synchronized void moveTo(float x,
                                      float y)
Adds a point to the path by moving to the specified coordinates specified in float precision.

This method provides a single precision variant of the double precision {@code moveTo()} method on the base {@code Path2D} class.

Parameters:
x - the specified X coordinate
y - the specified Y coordinate

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

quadTo

public final synchronized void quadTo(float x1,
                                      float y1,
                                      float x2,
                                      float 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 {@code (x2,y2)}, using the specified point {@code (x1,y1)} as a quadratic parametric control point. All coordinates are specified in float precision.

This method provides a single precision variant of the double precision {@code quadTo()} method on the base {@code Path2D} class.

Parameters:
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

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/.