org.apache.batik.ext.awt.geom
Class Linear
java.lang.Object
org.apache.batik.ext.awt.geom.Linear
- All Implemented Interfaces:
- Cloneable, Segment
public class Linear
- extends Object
- implements Segment
A class representing a linear path segment.
p1
public Point2D.Double p1
p2
public Point2D.Double p2
Linear
public Linear()
Linear
public Linear(double x1,
double y1,
double x2,
double y2)
Linear
public Linear(Point2D.Double p1,
Point2D.Double p2)
clone
public Object clone()
- Overrides:
clone
in class Object
reverse
public Segment reverse()
minX
public double minX()
- Specified by:
minX
in interface Segment
maxX
public double maxX()
- Specified by:
maxX
in interface Segment
minY
public double minY()
- Specified by:
minY
in interface Segment
maxY
public double maxY()
- Specified by:
maxY
in interface Segment
getBounds2D
public Rectangle2D getBounds2D()
- Specified by:
getBounds2D
in interface Segment
evalDt
public Point2D.Double evalDt(double t)
- Specified by:
evalDt
in interface Segment
eval
public Point2D.Double eval(double t)
- Specified by:
eval
in interface Segment
split
public Segment.SplitResults split(double y)
- Specified by:
split
in interface Segment
getSegment
public Segment getSegment(double t0,
double t1)
- Specified by:
getSegment
in interface Segment
splitBefore
public Segment splitBefore(double t)
- Specified by:
splitBefore
in interface Segment
splitAfter
public Segment splitAfter(double t)
- Specified by:
splitAfter
in interface Segment
subdivide
public void subdivide(Segment s0,
Segment s1)
- Subdivides this Linear segment into two segments at t = 0.5.
can be done with getSegment but this is more efficent.
- Specified by:
subdivide
in interface Segment
- Parameters:
s0
- if non-null contains portion of curve from 0->.5s1
- if non-null contains portion of curve from .5->1
subdivide
public void subdivide(double t,
Segment s0,
Segment s1)
- Subdivides this Linear segment into two segments at given t.
- Specified by:
subdivide
in interface Segment
- Parameters:
s0
- if non-null contains portion of curve from 0->t.s1
- if non-null contains portion of curve from t->1.
subdivide
public void subdivide(Linear l0,
Linear l1)
- 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
public void subdivide(double t,
Linear l0,
Linear l1)
- 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()
- Specified by:
getLength
in interface Segment
getLength
public double getLength(double maxErr)
- Specified by:
getLength
in interface Segment
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2008 Apache Software Foundation. All Rights Reserved.