public static class

QuadCurve2D.Double

extends QuadCurve2D
implements Serializable
java.lang.Object
   ↳ java.awt.geom.QuadCurve2D
     ↳ java.awt.geom.QuadCurve2D.Double

Class Overview

A quadratic parametric curve segment specified with double coordinates.

Summary

Fields
public double ctrlx The X coordinate of the control point of the quadratic curve segment.
public double ctrly The Y coordinate of the control point of the quadratic curve segment.
public double x1 The X coordinate of the start point of the quadratic curve segment.
public double x2 The X coordinate of the end point of the quadratic curve segment.
public double y1 The Y coordinate of the start point of the quadratic curve segment.
public double y2 The Y coordinate of the end point of the quadratic curve segment.
Public Constructors
QuadCurve2D.Double()
Constructs and initializes a QuadCurve2D with coordinates (0, 0, 0, 0, 0, 0).
QuadCurve2D.Double(double x1, double y1, double ctrlx, double ctrly, double x2, double y2)
Constructs and initializes a QuadCurve2D from the specified double coordinates.
Public Methods
Rectangle2D getBounds2D()
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.
[Expand]
Inherited Methods
From class java.awt.geom.QuadCurve2D
From class java.lang.Object
From interface java.awt.Shape

Fields

public double ctrlx

The X coordinate of the control point of the quadratic curve segment.

public double ctrly

The Y coordinate of the control point of the quadratic curve segment.

public double x1

The X coordinate of the start point of the quadratic curve segment.

public double x2

The X coordinate of the end point of the quadratic curve segment.

public double y1

The Y coordinate of the start point of the quadratic curve segment.

public double y2

The Y coordinate of the end point of the quadratic curve segment.

Public Constructors

public QuadCurve2D.Double ()

Constructs and initializes a QuadCurve2D with coordinates (0, 0, 0, 0, 0, 0).

public QuadCurve2D.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

Public Methods

public Rectangle2D getBounds2D ()

public Point2D getCtrlPt ()

Returns the control point.

Returns
  • a Point2D that is the control point of this Point2D.

public double getCtrlX ()

Returns the X coordinate of the control point in double precision.

Returns
  • X coordinate the control point

public double getCtrlY ()

Returns the Y coordinate of the control point in double precision.

Returns
  • the Y coordinate of the control point.

public Point2D getP1 ()

Returns the start point.

Returns
  • a Point2D that is the start point of this QuadCurve2D.

public Point2D getP2 ()

Returns the end point.

Returns
  • a Point object that is the end point of this Point2D.

public double getX1 ()

Returns the X coordinate of the start point in double in precision.

Returns
  • the X coordinate of the start point.

public double getX2 ()

Returns the X coordinate of the end point in double precision.

Returns
  • the x coordiante of the end point.

public double getY1 ()

Returns the Y coordinate of the start point in double precision.

Returns
  • the Y coordinate of the start point.

public double getY2 ()

Returns the Y coordinate of the end point in double precision.

Returns
  • the Y coordinate of the end point.

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.

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