[wadalabfont-kit] / java / Line.java  

View of /java/Line.java

Parent Directory | Revision Log
Revision: 1.2 - (download) (as text) (annotate)
Thu Jan 4 10:23:56 2001 UTC (23 years, 4 months ago) by ktanaka
Branch: MAIN
CVS Tags: SNAP-20030702, SNAP-20030624, SNAP-20030630, SNAP-20040518, HEAD
Changes since 1.1: +17 -0 lines
MinchoRendererのへんこう瘢雹
import java.util.*;
public class Line extends OutlineComponent{
  Point p0,p1;
  Line(Point p0,Point p1){
    this.p0=p0; this.p1=p1;
  }
  public void render(Vector ret,double limit){
    ret.addElement(p0);
    ret.addElement(p1);
  }
  public OutlineComponent plus(Point point){
    return new Line(p0.plus(point),p1.plus(point));
  }
  public OutlineComponent rot(double theta){
    return new Line(p0.rot(theta),p1.rot(theta));
  }
  public OutlineComponent times(double ratio){
    return new Line(p0.times(ratio),p1.times(ratio));
  }
  public OutlineComponent timesY(double ratio){
    return new Line(p0.timesY(ratio),p1.timesY(ratio));
  }
  public Point firstPoint(){ return p0;}
  public Point lastPoint(){ return p1;}
  public String toString(){
    return "Line("+p0+","+p1+")";
  }
}

ktanaka

Powered by ViewCVS 1.0-dev

ViewCVS and CVS Help