Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.

Nested Class Summary

Nested classes/interfaces inherited from interface org.apache.batik.ext.awt.geom.Segment
`Segment.SplitResults`

Field Summary
`Point2D.Double` | `p1`
`Point2D.Double` | `p2`

Constructor Summary
`Linear()`
`Linear(double x1, double y1, double x2, double y2)`
`Linear(Point2D.Double p1, Point2D.Double p2)`

Method Summary
`Object` | `clone()`
`Point2D.Double` | `eval(double t)`
`Point2D.Double` | `evalDt(double t)`
`Rectangle2D` | `getBounds2D()`
`double` | `getLength()`
`double` | `getLength(double maxErr)`
`Segment` | `getSegment(double t0, double t1)`
`double` | `maxX()`
`double` | `maxY()`
`double` | `minX()`
`double` | `minY()`
`Segment` | `reverse()`
`Segment.SplitResults` | `split(double y)`
`Segment` | `splitAfter(double t)`
`Segment` | `splitBefore(double t)`
`void` | `subdivide(double t, Linear l0, Linear l1)` Subdivides this Cubic curve into two curves.
`void` | `subdivide(double t, Segment s0, Segment s1)` Subdivides this Linear segment into two segments at given t.
`void` | `subdivide(Linear l0, Linear l1)` Subdivides this Cubic curve into two curves at t = 0.5.
`void` | `subdivide(Segment s0, Segment s1)` Subdivides this Linear segment into two segments at t = 0.5.
`String` | `toString()`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### p1

    public Point2D.Double p1

### p2

    public Point2D.Double p2

Constructor Detail

### Linear

    public Linear()

### Linear

    public Linear(double x1,
                  double y1,
                  double x2,
                  double y2)

### Linear

    public Linear(Point2D.Double p1,
                  Point2D.Double p2)

Method Detail

### 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->.5
    `s1` - 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->.5
    `l1` - 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 curve
    `l0` - if non-null contains portion of curve from 0->t
    `l1` - 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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008 Apache Software Foundation. All Rights Reserved.