Package org.apache.batik.ext.awt.geom
Class Quadradic
java.lang.Object
org.apache.batik.ext.awt.geom.AbstractSegment
org.apache.batik.ext.awt.geom.Quadradic
A class representing a quadratic path segment.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.batik.ext.awt.geom.Segment
Segment.SplitResults -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionQuadradic(double x1, double y1, double x2, double y2, double x3, double y3) Quadradic(Point2D.Double p1, Point2D.Double p2, Point2D.Double p3) -
Method Summary
Modifier and TypeMethodDescriptionclone()eval(double t) evalDt(double t) protected intfindRoots(double y, double[] roots) doubledoublegetLength(double maxErr) getSegment(double t0, double t1) doublemaxX()doublemaxY()doubleminX()doubleminY()reverse()voidSubdivides this Quadradic curve into two curves at given t.voidSubdivides this Quadradic curve into two curves at t.voidSubdivides this Quadradic curve into two curves at t = 0.5.voidSubdivides this Quadradic curve into two curves at t = 0.5.protected doublesubLength(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
-
-
Constructor Details
-
Quadradic
public Quadradic() -
Quadradic
public Quadradic(double x1, double y1, double x2, double y2, double x3, double y3) -
Quadradic
-
-
Method Details
-
clone
-
reverse
-
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:
findRootsin classAbstractSegment
-
evalDt
-
eval
-
getSegment
-
subdivide
Subdivides this Quadradic curve into two curves at t = 0.5. can be done with getSegment but this is more efficent.- Parameters:
q0- if non-null contains portion of curve from 0->.5q1- if non-null contains portion of curve from .5->1
-
subdivide
Subdivides this Quadradic curve into two curves at given t.- Parameters:
q0- if non-null contains portion of curve from 0->t.q1- if non-null contains portion of curve from t->1.
-
subdivide
Subdivides this Quadradic 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 Quadradic curve into two curves at t. 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
-
subLength
protected double subLength(double leftLegLen, double rightLegLen, double maxErr) -
getLength
public double getLength() -
getLength
public double getLength(double maxErr) -
toString
-