Package org.apache.batik.ext.awt.geom
Class Linear
java.lang.Object
org.apache.batik.ext.awt.geom.Linear
A class representing a linear path segment.
- Version:
- $Id: Linear.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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLinear()Linear(double x1, double y1, double x2, double y2) Linear(Point2D.Double p1, Point2D.Double p2) -
Method Summary
Modifier and TypeMethodDescriptionclone()eval(double t) evalDt(double t) doubledoublegetLength(double maxErr) getSegment(double t0, double t1) doublemaxX()doublemaxY()doubleminX()doubleminY()reverse()split(double y) splitAfter(double t) splitBefore(double t) voidSubdivides this Cubic curve into two curves.voidSubdivides this Linear segment into two segments at given t.voidSubdivides this Cubic curve into two curves at t = 0.5.voidSubdivides this Linear segment into two segments at t = 0.5.toString()
-
Field Details
-
p1
-
p2
-
-
Constructor Details
-
Linear
public Linear() -
Linear
public Linear(double x1, double y1, double x2, double y2) -
Linear
-
-
Method Details
-
clone
-
reverse
-
minX
public double minX() -
maxX
public double maxX() -
minY
public double minY() -
maxY
public double maxY() -
getBounds2D
- Specified by:
getBounds2Din interfaceSegment
-
evalDt
-
eval
-
split
-
getSegment
- Specified by:
getSegmentin interfaceSegment
-
splitBefore
- Specified by:
splitBeforein interfaceSegment
-
splitAfter
- Specified by:
splitAfterin interfaceSegment
-
subdivide
Subdivides this Linear segment into two segments at t = 0.5. can be done with getSegment but this is more efficent. -
subdivide
Subdivides this Linear segment into two segments at given t. -
subdivide
Subdivides this Cubic curve into two curves at t = 0.5. Can be done with getSegment but this is more efficent.- Parameters:
l0- if non-null contains portion of curve from 0->.5l1- if non-null contains portion of curve from .5->1
-
subdivide
Subdivides this Cubic curve into two curves. Can be done with getSegment but this is more efficent.- Parameters:
t- position to split the curvel0- if non-null contains portion of curve from 0->tl1- if non-null contains portion of curve from t->1
-
getLength
public double getLength() -
getLength
public double getLength(double maxErr) -
toString
-