GNU Classpath (0.99.1-pre) | |

Prev Class | Next Class | Frames | No Frames |

Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |

`java.lang.Object`

`java.awt.geom.CubicCurve2D`

`java.awt.geom.CubicCurve2D.Double`

**Enclosing Class:**- CubicCurve2D

**Implemented Interfaces:**- Cloneable, Shape

`public static class `**CubicCurve2D.Double**

`extends CubicCurve2D`

A two-dimensional curve that is parameterized with a cubic
function and stores coordinate values in double-precision
floating-point format.

**See Also:**`CubicCurve2D.Float`

## Nested Class Summary

### Nested classes/interfaces inherited from class java.awt.geom.CubicCurve2D

`CubicCurve2D.Double`

,`CubicCurve2D.Float`

## Field Summary

`double`

`ctrlx1`

- The
*x*coordinate of the curve’s first control point.

`double`

`ctrlx2`

- The
*x*coordinate of the curve’s second control point.

`double`

`ctrly1`

- The
*y*coordinate of the curve’s first control point.

`double`

`ctrly2`

- The
*y*coordinate of the curve’s second control point.

`double`

`x1`

- The
*x*coordinate of the curve’s start point.

`double`

`x2`

- The
*x*coordinate of the curve’s end point.

`double`

`y1`

- The
*y*coordinate of the curve’s start point.

`double`

`y2`

- The
*y*coordinate of the curve’s end point.

## Constructor Summary

`Double()`

- Constructs a new CubicCurve2D that stores its coordinate values in double-precision floating-point format.

`Double(double x1, double y1, double cx1, double cy1, double cx2, double cy2, double x2, double y2)`

- Constructs a new CubicCurve2D that stores its coordinate values in double-precision floating-point format, specifying the initial position of each point.

## Method Summary

`Rectangle2D`

`getBounds2D()`

- Determines the smallest rectangle that encloses the curve’s start, end and control points.

`Point2D`

`getCtrlP1()`

- Returns the curve’s first control point.

`Point2D`

`getCtrlP2()`

- Returns the curve’s second control point.

`double`

`getCtrlX1()`

- Returns the
*x*coordinate of the curve’s first control point.

`double`

`getCtrlX2()`

- Returns the
*x*coordinate of the curve’s second control point.

`double`

`getCtrlY1()`

- Returns the
*y*coordinate of the curve’s first control point.

`double`

`getCtrlY2()`

- Returns the
*y*coordinate of the curve’s second control point.

`Point2D`

`getP1()`

- Returns the curve’s start point.

`Point2D`

`getP2()`

- Returns the curve’s end point.

`double`

`getX1()`

- Returns the
*x*coordinate of the curve’s start point.

`double`

`getX2()`

- Returns the
*x*coordinate of the curve’s end point.

`double`

`getY1()`

- Returns the
*y*coordinate of the curve’s start point.

`double`

`getY2()`

- Returns the
*y*coordinate of the curve’s end point.

`void`

`setCurve(double x1, double y1, double cx1, double cy1, double cx2, double cy2, double x2, double y2)`

- Changes the curve geometry, separately specifying each coordinate value.

### Methods inherited from class java.awt.geom.CubicCurve2D

`clone`

,`contains`

,`contains`

,`contains`

,`contains`

,`getBounds`

,`getCtrlP1`

,`getCtrlP2`

,`getCtrlX1`

,`getCtrlX2`

,`getCtrlY1`

,`getCtrlY2`

,`getFlatness`

,`getFlatness`

,`getFlatness`

,`getFlatnessSq`

,`getFlatnessSq`

,`getFlatnessSq`

,`getP1`

,`getP2`

,`getPathIterator`

,`getPathIterator`

,`getX1`

,`getX2`

,`getY1`

,`getY2`

,`intersects`

,`intersects`

,`setCurve`

,`setCurve`

,`setCurve`

,`setCurve`

,`setCurve`

,`solveCubic`

,`solveCubic`

,`subdivide`

,`subdivide`

,`subdivide`

### Methods inherited from class java.lang.Object

`clone`

,`equals`

,`extends Object> getClass`

,`finalize`

,`hashCode`

,`notify`

,`notifyAll`

,`toString`

,`wait`

,`wait`

,`wait`

public Double()

Constructs a new CubicCurve2D that stores its coordinate values in double-precision floating-point format. All points are initially at position (0, 0).

public Double(double x1, double y1, double cx1, double cy1, double cx2, double cy2, double x2, double y2)

Constructs a new CubicCurve2D that stores its coordinate values in double-precision floating-point format, specifying the initial position of each point.

Parameters:`x1`

- thexcoordinate of the curve’s start point.`y1`

- theycoordinate of the curve’s start point.`cx1`

- thexcoordinate of the curve’s first control point.`cy1`

- theycoordinate of the curve’s first control point.`cx2`

- thexcoordinate of the curve’s second control point.`cy2`

- theycoordinate of the curve’s second control point.`x2`

- thexcoordinate of the curve’s end point.`y2`

- theycoordinate of the curve’s end point.

public Rectangle2D getBounds2D()

Determines the smallest rectangle that encloses the curve’s start, end and control points. As the illustration below shows, the invisible control points may cause the bounds to be much larger than the area that is actually covered by the curve.

Specified by:- getBounds2D in interface Shape

public Point2D getCtrlP1()

Returns the curve’s first control point.

Overrides:- getCtrlP1 in interface CubicCurve2D

public Point2D getCtrlP2()

Returns the curve’s second control point.

Overrides:- getCtrlP2 in interface CubicCurve2D

public double getCtrlX1()

Returns thexcoordinate of the curve’s first control point.

Overrides:- getCtrlX1 in interface CubicCurve2D

public double getCtrlX2()

Returns thexcoordinate of the curve’s second control point.

Overrides:- getCtrlX2 in interface CubicCurve2D

public double getCtrlY1()

Returns theycoordinate of the curve’s first control point.

Overrides:- getCtrlY1 in interface CubicCurve2D

public double getCtrlY2()

Returns theycoordinate of the curve’s second control point.

Overrides:- getCtrlY2 in interface CubicCurve2D

public Point2D getP1()

Returns the curve’s start point.

Overrides:- getP1 in interface CubicCurve2D

public Point2D getP2()

Returns the curve’s end point.

Overrides:- getP2 in interface CubicCurve2D

public double getX1()

Returns thexcoordinate of the curve’s start point.

Overrides:- getX1 in interface CubicCurve2D

public double getX2()

Returns thexcoordinate of the curve’s end point.

Overrides:- getX2 in interface CubicCurve2D

public double getY1()

Returns theycoordinate of the curve’s start point.

Overrides:- getY1 in interface CubicCurve2D

public double getY2()

Returns theycoordinate of the curve’s end point.

Overrides:- getY2 in interface CubicCurve2D

public void setCurve(double x1, double y1, double cx1, double cy1, double cx2, double cy2, double x2, double y2)

Changes the curve geometry, separately specifying each coordinate value.

Overrides:- setCurve in interface CubicCurve2D

Parameters:`x1`

- thexcoordinate of the curve’s new start point.`y1`

- theycoordinate of the curve’s new start point.`cx1`

- thexcoordinate of the curve’s new first control point.`cy1`

- theycoordinate of the curve’s new first control point.`cx2`

- thexcoordinate of the curve’s new second control point.`cy2`

- theycoordinate of the curve’s new second control point.`x2`

- thexcoordinate of the curve’s new end point.`y2`

- theycoordinate of the curve’s new end point.

CubicCurve2D.java -- represents a parameterized cubic curve in 2-D space
Copyright (C) 2002, 2003, 2004 Free Software Foundation
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version.

GNU Classpath (0.99.1-pre) |