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) double
double
getLength
(double maxErr) getSegment
(double t0, double t1) double
maxX()
double
maxY()
double
minX()
double
minY()
reverse()
split
(double y) splitAfter
(double t) splitBefore
(double t) void
Subdivides this Cubic curve into two curves.void
Subdivides this Linear segment into two segments at given t.void
Subdivides this Cubic curve into two curves at t = 0.5.void
Subdivides 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:
getBounds2D
in interfaceSegment
-
evalDt
-
eval
-
split
-
getSegment
- Specified by:
getSegment
in interfaceSegment
-
splitBefore
- Specified by:
splitBefore
in interfaceSegment
-
splitAfter
- Specified by:
splitAfter
in 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
-