Spec-Zone.ru › OpenJDK 27

Class QuadCurve2D.Double

java.lang.Object
java.awt.geom.QuadCurve2D
java.awt.geom.QuadCurve2D.Double
All Implemented Interfaces:
Shape, Serializable, Cloneable
Enclosing class:
QuadCurve2D
public static class QuadCurve2D.Double extends QuadCurve2D implements Serializable
A quadratic parametric curve segment specified with double coordinates.
Since:
1.2
See Also:
  • Serialized Form

Nested Class Summary

Nested classes/interfaces declared in class QuadCurve2D

QuadCurve2D.Double, QuadCurve2D.Float
Modifier and Type Class Description
static class  QuadCurve2D.Double
A quadratic parametric curve segment specified with double coordinates.
static class  QuadCurve2D.Float
A quadratic parametric curve segment specified with float coordinates.

Field Summary

Modifier and Type Field Description
double ctrlx
The X coordinate of the control point of the quadratic curve segment.
double ctrly
The Y coordinate of the control point of the quadratic curve segment.
double x1
The X coordinate of the start point of the quadratic curve segment.
double x2
The X coordinate of the end point of the quadratic curve segment.
double y1
The Y coordinate of the start point of the quadratic curve segment.
double y2
The Y coordinate of the end point of the quadratic curve segment.

Constructor Summary

Constructor Description
Double()
Constructs and initializes a QuadCurve2D with coordinates (0, 0, 0, 0, 0, 0).
Double(double x1, double y1, double ctrlx, double ctrly, double x2, double y2)
Constructs and initializes a QuadCurve2D from the specified double coordinates.

Method Summary

Modifier and Type Method Description
Point2D getCtrlPt()
Returns the control point.
double getCtrlX()
Returns the X coordinate of the control point in double precision.
double getCtrlY()
Returns the Y coordinate of the control point in double precision.
Point2D getP1()
Returns the start point.
Point2D getP2()
Returns the end point.
double getX1()
Returns the X coordinate of the start point in double in precision.
double getX2()
Returns the X coordinate of the end point in double precision.
double getY1()
Returns the Y coordinate of the start point in double precision.
double getY2()
Returns the Y coordinate of the end point in double precision.
void setCurve(double x1, double y1, double ctrlx, double ctrly, double x2, double y2)
Sets the location of the end points and control point of this curve to the specified double coordinates.

Methods declared in class QuadCurve2D

clone, contains, contains, contains, contains, getBounds, getBounds2D, getFlatness, getFlatness, getFlatness, getFlatnessSq, getFlatnessSq, getFlatnessSq, getPathIterator, getPathIterator, intersects, intersects, setCurve, setCurve, setCurve, setCurve, solveQuadratic, solveQuadratic, subdivide, subdivide, subdivide
Modifier and Type Method Description
Object clone()
Creates a new object of the same class and with the same contents as this object.
boolean contains(double x, double y)
Tests if the specified coordinates are inside the boundary of the Shape, as described by the definition of insideness.
boolean contains(double x, double y, double w, double h)
Tests if the interior of the Shape entirely contains the specified rectangular area.
boolean contains(Point2D p)
Tests if a specified Point2D is inside the boundary of the Shape, as described by the definition of insideness.
boolean contains(Rectangle2D r)
Tests if the interior of the Shape entirely contains the specified Rectangle2D.
Rectangle getBounds()
Returns an integer Rectangle that completely encloses the Shape.
Rectangle2D getBounds2D()
Returns a high precision and more accurate bounding box of the Shape than the getBounds method.
double getFlatness()
Returns the flatness, or maximum distance of a control point from the line connecting the end points, of this QuadCurve2D.
static double getFlatness(double[] coords, int offset)
Returns the flatness, or maximum distance of a control point from the line connecting the end points, of the quadratic curve specified by the control points stored in the indicated array at the indicated index.
static double getFlatness(double x1, double y1, double ctrlx, double ctrly, double x2, double y2)
Returns the flatness, or maximum distance of a control point from the line connecting the end points, of the quadratic curve specified by the indicated control points.
double getFlatnessSq()
Returns the square of the flatness, or maximum distance of a control point from the line connecting the end points, of this QuadCurve2D.
static double getFlatnessSq(double[] coords, int offset)
Returns the square of the flatness, or maximum distance of a control point from the line connecting the end points, of the quadratic curve specified by the control points stored in the indicated array at the indicated index.
static double getFlatnessSq(double x1, double y1, double ctrlx, double ctrly, double x2, double y2)
Returns the square of the flatness, or maximum distance of a control point from the line connecting the end points, of the quadratic curve specified by the indicated control points.
PathIterator getPathIterator(AffineTransform at)
Returns an iteration object that defines the boundary of the shape of this QuadCurve2D.
PathIterator getPathIterator(AffineTransform at, double flatness)
Returns an iteration object that defines the boundary of the flattened shape of this QuadCurve2D.
boolean intersects(double x, double y, double w, double h)
Tests if the interior of the Shape intersects the interior of a specified rectangular area.
boolean intersects(Rectangle2D r)
Tests if the interior of the Shape intersects the interior of a specified Rectangle2D.
void setCurve(double[] coords, int offset)
Sets the location of the end points and control points of this QuadCurve2D to the double coordinates at the specified offset in the specified array.
void setCurve(Point2D[] pts, int offset)
Sets the location of the end points and control points of this QuadCurve2D to the coordinates of the Point2D objects at the specified offset in the specified array.
void setCurve(Point2D p1, Point2D cp, Point2D p2)
Sets the location of the end points and control point of this QuadCurve2D to the specified Point2D coordinates.
void setCurve(QuadCurve2D c)
Sets the location of the end points and control point of this QuadCurve2D to the same as those in the specified QuadCurve2D.
static int solveQuadratic(double[] eqn)
Solves the quadratic whose coefficients are in the eqn array and places the non-complex roots back into the same array, returning the number of roots.
static int solveQuadratic(double[] eqn, double[] res)
Solves the quadratic whose coefficients are in the eqn array and places the non-complex roots into the res array, returning the number of roots.
static void subdivide(double[] src, int srcoff, double[] left, int leftoff, double[] right, int rightoff)
Subdivides the quadratic curve specified by the coordinates stored in the src array at indices srcoff through srcoff + 5 and stores the resulting two subdivided curves into the two result arrays at the corresponding indices.
void subdivide(QuadCurve2D left, QuadCurve2D right)
Subdivides this QuadCurve2D and stores the resulting two subdivided curves into the left and right curve parameters.
static void subdivide(QuadCurve2D src, QuadCurve2D left, QuadCurve2D right)
Subdivides the quadratic curve specified by the src parameter and stores the resulting two subdivided curves into the left and right curve parameters.

Methods declared in class Object

equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Modifier and Type Method Description
boolean equals(Object obj)
Indicates whether some other object is "equal to" this one.
protected void finalize()
Deprecated, for removal: This API element is subject to removal in a future version.
Finalization is deprecated and subject to removal in a future release.
final Class<?> getClass()
Returns the runtime class of this Object.
int hashCode()
Returns a hash code value for this object.
final void notify()
Wakes up a single thread that is waiting on this object's monitor.
final void notifyAll()
Wakes up all threads that are waiting on this object's monitor.
String toString()
Returns a string representation of the object.
final void wait()
Causes the current thread to wait until it is awakened, typically by being notified or interrupted.
final void wait(long timeoutMillis)
Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
final void wait(long timeoutMillis, int nanos)
Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

Field Details

x1

public double x1
The X coordinate of the start point of the quadratic curve segment.
Since:
1.2

y1

public double y1
The Y coordinate of the start point of the quadratic curve segment.
Since:
1.2

ctrlx

public double ctrlx
The X coordinate of the control point of the quadratic curve segment.
Since:
1.2

ctrly

public double ctrly
The Y coordinate of the control point of the quadratic curve segment.
Since:
1.2

x2

public double x2
The X coordinate of the end point of the quadratic curve segment.
Since:
1.2

y2

public double y2
The Y coordinate of the end point of the quadratic curve segment.
Since:
1.2

Constructor Details

Double

public Double()
Constructs and initializes a QuadCurve2D with coordinates (0, 0, 0, 0, 0, 0).
Since:
1.2

Double

public Double(double x1, double y1, double ctrlx, double ctrly, double x2, double y2)
Constructs and initializes a QuadCurve2D from the specified double coordinates.
Parameters:
x1 - the X coordinate of the start point
y1 - the Y coordinate of the start point
ctrlx - the X coordinate of the control point
ctrly - the Y coordinate of the control point
x2 - the X coordinate of the end point
y2 - the Y coordinate of the end point
Since:
1.2

Method Details

getX1

public double getX1()
Returns the X coordinate of the start point in double in precision.
Specified by:
getX1 in class QuadCurve2D
Returns:
the X coordinate of the start point.
Since:
1.2

getY1

public double getY1()
Returns the Y coordinate of the start point in double precision.
Specified by:
getY1 in class QuadCurve2D
Returns:
the Y coordinate of the start point.
Since:
1.2

getP1

public Point2D getP1()
Returns the start point.
Specified by:
getP1 in class QuadCurve2D
Returns:
a Point2D that is the start point of this QuadCurve2D.
Since:
1.2

getCtrlX

public double getCtrlX()
Returns the X coordinate of the control point in double precision.
Specified by:
getCtrlX in class QuadCurve2D
Returns:
X coordinate the control point
Since:
1.2

getCtrlY

public double getCtrlY()
Returns the Y coordinate of the control point in double precision.
Specified by:
getCtrlY in class QuadCurve2D
Returns:
the Y coordinate of the control point.
Since:
1.2

getCtrlPt

public Point2D getCtrlPt()
Returns the control point.
Specified by:
getCtrlPt in class QuadCurve2D
Returns:
a Point2D that is the control point of this Point2D.
Since:
1.2

getX2

public double getX2()
Returns the X coordinate of the end point in double precision.
Specified by:
getX2 in class QuadCurve2D
Returns:
the x coordinate of the end point.
Since:
1.2

getY2

public double getY2()
Returns the Y coordinate of the end point in double precision.
Specified by:
getY2 in class QuadCurve2D
Returns:
the Y coordinate of the end point.
Since:
1.2

getP2

public Point2D getP2()
Returns the end point.
Specified by:
getP2 in class QuadCurve2D
Returns:
a Point object that is the end point of this Point2D.
Since:
1.2

setCurve

public void setCurve(double x1, double y1, double ctrlx, double ctrly, double x2, double y2)
Sets the location of the end points and control point of this curve to the specified double coordinates.
Specified by:
setCurve in class QuadCurve2D
Parameters:
x1 - the X coordinate of the start point
y1 - the Y coordinate of the start point
ctrlx - the X coordinate of the control point
ctrly - the Y coordinate of the control point
x2 - the X coordinate of the end point
y2 - the Y coordinate of the end point
Since:
1.2

Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples. Other versions.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2026, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.

© 1993, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API