public abstract class AbstractCubicCurve extends Object implements ICubicCurve
ICubicCurve, obtaining only the start, end and
control points from the derived class.| Constructor and Description |
|---|
AbstractCubicCurve() |
| Modifier and Type | Method and Description |
|---|---|
Rectangle |
bounds()
Returns a copy of the bounding rectangle for this shape.
|
Rectangle |
bounds(Rectangle target)
Initializes the supplied rectangle with this shape's bounding rectangle.
|
CubicCurve |
clone()
Returns a mutable copy of this curve.
|
boolean |
contains(float px,
float py)
Returns true if this shape contains the specified point.
|
boolean |
contains(float rx,
float ry,
float rw,
float rh)
Returns true if this shape completely contains the specified rectangle.
|
boolean |
contains(IRectangle r)
Returns true if this shape completely contains the supplied rectangle.
|
boolean |
contains(XY p)
Returns true if this shape contains the supplied point.
|
Point |
ctrlP1()
Returns a copy of the first control point of this curve.
|
Point |
ctrlP2()
Returns a copy of the second control point of this curve.
|
float |
flatness()
Returns the flatness (maximum distance of a control point from the line connecting the end
points) of this curve.
|
float |
flatnessSq()
Returns the square of the flatness (maximum distance of a control point from the line
connecting the end points) of this curve.
|
boolean |
intersects(float rx,
float ry,
float rw,
float rh)
Returns true if this shape intersects the specified rectangle.
|
boolean |
intersects(IRectangle r)
Returns true if this shape intersects the supplied rectangle.
|
boolean |
isEmpty()
Returns true if this shape encloses no area.
|
Point |
p1()
Returns a copy of the starting point of this curve.
|
Point |
p2()
Returns a copy of the ending point of this curve.
|
PathIterator |
pathIterator(Transform t)
Returns an iterator over the path described by this shape.
|
PathIterator |
pathIterator(Transform at,
float flatness)
Returns an iterator over the path described by this shape.
|
void |
subdivide(CubicCurve left,
CubicCurve right)
Subdivides this curve and stores the results into
left and right. |
public Point p1()
ICubicCurvep1 in interface ICubicCurvepublic Point ctrlP1()
ICubicCurvectrlP1 in interface ICubicCurvepublic Point ctrlP2()
ICubicCurvectrlP2 in interface ICubicCurvepublic Point p2()
ICubicCurvep2 in interface ICubicCurvepublic float flatnessSq()
ICubicCurveflatnessSq in interface ICubicCurvepublic float flatness()
ICubicCurveflatness in interface ICubicCurvepublic void subdivide(CubicCurve left, CubicCurve right)
ICubicCurveleft and right.subdivide in interface ICubicCurvepublic CubicCurve clone()
ICubicCurveclone in interface ICubicCurveclone in class Objectpublic boolean isEmpty()
IShapepublic boolean contains(float px,
float py)
IShapepublic boolean contains(float rx,
float ry,
float rw,
float rh)
IShapepublic boolean contains(XY p)
IShapepublic boolean contains(IRectangle r)
IShapepublic boolean intersects(float rx,
float ry,
float rw,
float rh)
IShapeintersects in interface IShapepublic boolean intersects(IRectangle r)
IShapeintersects in interface IShapepublic Rectangle bounds()
IShapepublic Rectangle bounds(Rectangle target)
IShapepublic PathIterator pathIterator(Transform t)
IShapepathIterator in interface IShapet - if supplied, the points in the path are transformed using this.public PathIterator pathIterator(Transform at, float flatness)
IShapepathIterator in interface IShapeat - if supplied, the points in the path are transformed using this.flatness - when approximating curved segments with lines, this controls the maximum
distance the lines are allowed to deviate from the approximated curve, thus a higher
flatness value generally allows for a path with fewer segments.Copyright © 2017. All rights reserved.