public class QuadraticCurve extends BezierCurve
Constructor and Description |
---|
QuadraticCurve(double... coordinates)
Constructs a new
QuadraticCurve from the given sequence of x- and
y-coordinates of the start-, the control-, and the end-point. |
QuadraticCurve(double x1,
double y1,
double ctrlX,
double ctrlY,
double x2,
double y2)
Constructs a new QuadraticCurve object from the given point coordinates.
|
QuadraticCurve(Point... points)
Constructs a new
QuadraticCurve from the given sequence of
Point s formed by start-, control-, and end-point. |
QuadraticCurve(Point p1,
Point pCtrl,
Point p2)
Constructs a new QuadraticCurve object from the given points.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Overridden with public visibility as recommended within
Cloneable
. |
QuadraticCurve |
getCopy()
Returns a new
QuadraticCurve , which has the same start, end, and
control point coordinates as this one. |
Point |
getCtrl()
Get the control point.
|
double |
getCtrlX()
Get the control point's x-coordinate.
|
double |
getCtrlY()
Get the control point's y-coordinate.
|
CubicCurve |
getElevated()
Degree elevation: Returns a
CubicCurve representation of this
QuadraticCurve . |
QuadraticCurve |
getTransformed(AffineTransform t)
|
int |
hashCode() |
QuadraticCurve |
setCtrl(Point ctrl)
Sets the curve's control point.
|
QuadraticCurve |
setCtrlX(double ctrlX)
Sets the x-coordinate of the curve's control point.
|
QuadraticCurve |
setCtrlY(double ctrlY)
Sets the y-coordinate of the curve's control point.
|
QuadraticCurve[] |
split(double t)
Splits this QuadraticCurve using the de Casteljau algorithm at parameter
t into two separate QuadraticCurve objects.
|
Path |
toPath()
Transform the QuadraticCurve object to a
Path object with the
same shape. |
java.lang.String |
toString() |
boolean |
touches(IGeometry g)
|
contains, contains, equals, get, getBounds, getClipped, getControlBounds, getDerivative, getIntersectionIntervalPairs, getIntersections, getIntersections, getOverlap, getOverlaps, getP1, getP2, getParameterAt, getPoint, getPoints, getProjection, getRotatedCCW, getRotatedCCW, getRotatedCCW, getRotatedCW, getRotatedCW, getRotatedCW, getScaled, getScaled, getScaled, getScaled, getScaled, getScaled, getTranslated, getTranslated, getX1, getX2, getY1, getY2, intersects, overlaps, overlaps, rotateCCW, rotateCCW, rotateCCW, rotateCW, rotateCW, rotateCW, scale, scale, scale, scale, scale, scale, setP1, setP2, setPoint, toBezier, toCubic, toLine, toLineStrip, toLineStrip, toPoints, toQuadratic, translate, translate
public QuadraticCurve(double... coordinates)
QuadraticCurve
from the given sequence of x- and
y-coordinates of the start-, the control-, and the end-point.coordinates
- a sequence containing the x- and y-coordinatesQuadraticCurve(double, double, double, double,
double, double)
public QuadraticCurve(double x1, double y1, double ctrlX, double ctrlY, double x2, double y2)
x1
- the start point's x-coordinatey1
- the start point's y-coordinatectrlX
- the control point's x-coordinatectrlY
- the control point's y-coordinatex2
- the end point's x-coordinatey2
- the end point's y-coordinatepublic QuadraticCurve(Point... points)
QuadraticCurve
from the given sequence of
Point
s formed by start-, control-, and end-point.points
- the control Point
sQuadraticCurve(Point, Point, Point)
public QuadraticCurve getCopy()
QuadraticCurve
, which has the same start, end, and
control point coordinates as this one.getCopy
in interface IGeometry
getCopy
in class BezierCurve
QuadraticCurve
with the same start, end, and
control point coordinatespublic Point getCtrl()
public double getCtrlX()
public double getCtrlY()
public CubicCurve getElevated()
CubicCurve
representation of this
QuadraticCurve
.getElevated
in class BezierCurve
CubicCurve
that represents this QuadraticCurve
.public QuadraticCurve getTransformed(AffineTransform t)
Path
representation of this IGeometry
. Subclasses may override this
method to return a more specific representation.getTransformed
in interface IGeometry
getTransformed
in class BezierCurve
t
- The AffineTransform
to be appliedPath
representation of this
IGeometry
IGeometry.getTransformed(AffineTransform)
public QuadraticCurve setCtrl(Point ctrl)
ctrl
- The new curve's control point.this
for conveniencepublic QuadraticCurve setCtrlX(double ctrlX)
ctrlX
- The new x-coordinate of the curve's control point.this
for conveniencepublic QuadraticCurve setCtrlY(double ctrlY)
ctrlY
- The y-coordinate of the curve's control point.this
for conveniencepublic QuadraticCurve[] split(double t)
QuadraticCurve
s are the curves for [0, t] and [t, 1].split
in class BezierCurve
t
- in range [0,1]public Path toPath()
Path
object with the
same shape.toPath
in interface IGeometry
toPath
in class BezierCurve
Path
object representing the curvepublic java.lang.String toString()
toString
in class BezierCurve
public java.lang.Object clone()
Cloneable
.clone
in class java.lang.Object
public final int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
Copyright (c) 2014 itemis AG, and others. All rights reserved.