Package org.apache.batik.ext.awt.geom
Class Cubic
java.lang.Object
org.apache.batik.ext.awt.geom.AbstractSegment
org.apache.batik.ext.awt.geom.Cubic
A class representing a cubic path segment.
- Version:
- $Id: Cubic.java 1805408 2017-08-18 12:21:52Z ssteiner $
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.batik.ext.awt.geom.Segment
Segment.SplitResults
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static int
Fields inherited from class org.apache.batik.ext.awt.geom.AbstractSegment
eps, tol
-
Constructor Summary
ConstructorsConstructorDescriptionCubic()
Cubic
(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4) Cubic
(Point2D.Double p1, Point2D.Double p2, Point2D.Double p3, Point2D.Double p4) -
Method Summary
Modifier and TypeMethodDescriptionclone()
eval
(double t) evalDt
(double t) protected int
findRoots
(double y, double[] roots) double
double
getLength
(double maxErr) private void
getMinMax
(double p1, double p2, double p3, double p4, double[] minMax) getSegment
(double t0, double t1) double
maxX()
double
maxY()
double
minX()
double
minY()
reverse()
void
Subdivides this Cubic curve into two curves at given t.void
Subdivides this Cubic curve into two curves at given t.void
Subdivides this Cubic curve into two curves at t = 0.5.void
Subdivides this Cubic curve into two curves at t = 0.5.protected double
subLength
(double leftLegLen, double rightLegLen, double maxErr) toString()
Methods inherited from class org.apache.batik.ext.awt.geom.AbstractSegment
matchSign, solveCubic, solveLine, solveQuad, split, splitAfter, splitBefore
-
Field Details
-
p1
-
p2
-
p3
-
p4
-
count
private static int count
-
-
Constructor Details
-
Cubic
public Cubic() -
Cubic
public Cubic(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4) -
Cubic
-
-
Method Details
-
clone
-
reverse
-
getMinMax
private void getMinMax(double p1, double p2, double p3, double p4, double[] minMax) -
minX
public double minX() -
maxX
public double maxX() -
minY
public double minY() -
maxY
public double maxY() -
getBounds2D
-
findRoots
protected int findRoots(double y, double[] roots) - Specified by:
findRoots
in classAbstractSegment
-
evalDt
-
eval
-
subdivide
Subdivides this Cubic curve into two curves at t = 0.5. can be done with getSegment but this is more efficent.- Parameters:
s0
- if non-null contains portion of curve from 0->.5s1
- if non-null contains portion of curve from .5->1
-
subdivide
Subdivides this Cubic curve into two curves at given t.- Parameters:
s0
- if non-null contains portion of curve from 0->t.s1
- if non-null contains portion of curve from t->1.
-
subdivide
Subdivides this Cubic curve into two curves at t = 0.5. can be done with getSegment but this is more efficent.- Parameters:
c0
- if non-null contains portion of curve from 0->.5c1
- if non-null contains portion of curve from .5->1
-
subdivide
Subdivides this Cubic curve into two curves at given t.- Parameters:
c0
- if non-null contains portion of curve from 0->t.c1
- if non-null contains portion of curve from t->1.
-
getSegment
-
subLength
protected double subLength(double leftLegLen, double rightLegLen, double maxErr) -
getLength
public double getLength() -
getLength
public double getLength(double maxErr) -
toString
-