java.awt.geom
Class CubicCurve2D.Double
- CubicCurve2D
- Cloneable, Shape
A two-dimensional curve that is parameterized with a cubic
function and stores coordinate values in double-precision
floating-point format.
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.
|
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.
|
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.
|
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 |
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
ctrlx1
public double ctrlx1
The x coordinate of the curve’s first control point.
ctrlx2
public double ctrlx2
The x coordinate of the curve’s second control point.
ctrly1
public double ctrly1
The y coordinate of the curve’s first control point.
ctrly2
public double ctrly2
The y coordinate of the curve’s second control point.
x1
public double x1
The x coordinate of the curve’s start point.
x2
public double x2
The x coordinate of the curve’s end point.
y1
public double y1
The y coordinate of the curve’s start point.
y2
public double y2
The y coordinate of the curve’s end point.
Double
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).
Double
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.
x1
- the x coordinate of the curve’s start
point.y1
- the y coordinate of the curve’s start
point.cx1
- the x coordinate of the curve’s first
control point.cy1
- the y coordinate of the curve’s first
control point.cx2
- the x coordinate of the curve’s second
control point.cy2
- the y coordinate of the curve’s second
control point.x2
- the x coordinate of the curve’s end
point.y2
- the y coordinate of the curve’s end
point.
getBounds2D
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.
- getBounds2D in interface Shape
getX1
public double getX1()
Returns the x coordinate of the curve’s start
point.
- getX1 in interface CubicCurve2D
getY1
public double getY1()
Returns the y coordinate of the curve’s start
point.
- getY1 in interface CubicCurve2D
setCurve
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.
- setCurve in interface CubicCurve2D
x1
- the x coordinate of the curve’s new start
point.y1
- the y coordinate of the curve’s new start
point.cx1
- the x coordinate of the curve’s new
first control point.cy1
- the y coordinate of the curve’s new
first control point.cx2
- the x coordinate of the curve’s new
second control point.cy2
- the y coordinate of the curve’s new
second control point.x2
- the x coordinate of the curve’s new end
point.y2
- the y coordinate 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.