1 18 package org.apache.batik.ext.awt.geom; 19 20 import java.awt.geom.Point2D ; 21 import java.awt.geom.Rectangle2D ; 22 23 28 public interface Segment extends Cloneable { 29 public double minX(); 30 public double maxX(); 31 public double minY(); 32 public double maxY(); 33 public Rectangle2D getBounds2D(); 34 35 public Point2D.Double evalDt(double t); 36 public Point2D.Double eval(double t); 37 38 public Segment getSegment(double t0, double t1); 39 public Segment splitBefore(double t); 40 public Segment splitAfter(double t); 41 public void subdivide(Segment s0, Segment s1); 42 public void subdivide(double t, Segment s0, Segment s1); 43 public double getLength(); 44 public double getLength(double maxErr); 45 46 public SplitResults split(double y); 47 48 public static class SplitResults { 49 Segment [] above; 50 Segment [] below; 51 SplitResults(Segment []below, Segment []above) { 52 this.below = below; 53 this.above = above; 54 } 55 56 Segment [] getBelow() { 57 return below; 58 } 59 Segment [] getAbove() { 60 return above; 61 } 62 } 63 } 64 | Popular Tags |