[wadalabfont-kit] / java / Outline.java  

Diff of /java/Outline.java

Parent Directory | Revision Log

version 1.1, Thu Dec 28 08:54:23 2000 UTC version 1.2, Thu Jan 4 10:23:56 2001 UTC
Line 3 
Line 3 
   Outline(OutlineComponent[] components){    Outline(OutlineComponent[] components){
     this.components=components;      this.components=components;
   }    }
     Outline(OutlineComponent component){
       this.components=new OutlineComponent[1];
       this.components[0]=component;
     }
     Outline append(Outline outline){
       OutlineComponent[] newComponents=new OutlineComponent[components.length+outline.components.length];
       System.arraycopy(components,0,newComponents,0,components.length);
       System.arraycopy(outline.components,0,newComponents,components.length,outline.components.length);
       return new Outline(newComponents);
     }
     Outline plus(Point p0){
       OutlineComponent[] newComponents=new OutlineComponent[components.length];
       for(int i=0;i<components.length;i++){
         newComponents[i]=components[i].plus(p0);
       }
       return new Outline(newComponents);
     }
     Outline rot(double theta){
       OutlineComponent[] newComponents=new OutlineComponent[components.length];
       for(int i=0;i<components.length;i++){
         newComponents[i]=components[i].rot(theta);
       }
       return new Outline(newComponents);
     }
     Outline times(double ratio){
       OutlineComponent[] newComponents=new OutlineComponent[components.length];
       for(int i=0;i<components.length;i++){
         newComponents[i]=components[i].times(ratio);
       }
       return new Outline(newComponents);
     }
     Outline timesY(double ratio){
       OutlineComponent[] newComponents=new OutlineComponent[components.length];
       for(int i=0;i<components.length;i++){
         newComponents[i]=components[i].timesY(ratio);
       }
       return new Outline(newComponents);
     }
     Point firstPoint(){
       return components[0].firstPoint();
     }
     Point lastPoint(){
       return components[components.length-1].lastPoint();
     }
   OutlineComponent[] getComponents(){ return components; }    OutlineComponent[] getComponents(){ return components; }
     public String toString(){
       String str="Outline(";
       for(int i=0;i<components.length;i++)
         str+=components[i].toString();
       return str+")";
     }
 }  }


Generate output suitable for use with a patch program
Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

ktanaka

Powered by ViewCVS 1.0-dev

ViewCVS and CVS Help