[wadalabfont-kit] / java / Renderer.java  

Diff of /java/Renderer.java

Parent Directory | Revision Log

version 1.1, Thu Dec 28 08:54:22 2000 UTC version 1.2, Thu Jan 4 10:23:56 2001 UTC
Line 158 
Line 158 
                     r0,r1);                      r0,r1);
     return ret;      return ret;
   }    }
     public  Outline[] fitSample(Outline[] sample,Point p0, Point p1,double ratio){
       Point p2=sample[0].firstPoint();
       Point p3=sample[0].lastPoint();
       double theta1=p3.minus(p2).theta();
       double theta2=p1.minus(p0).theta();
       double len01=p0.distance(p1),len23=p2.distance(p3);
       double r1=len01/len23;
       Outline[] ret=new Outline[2];
       ret[0]=sample[0].plus(p2.neg()).rot(-theta1).times(r1).timesY(ratio).rot(theta2).plus(p0);
       ret[1]=sample[1].plus(p2.neg()).rot(-theta1).times(r1).timesY(ratio).rot(theta2).plus(p0);
       return ret;
     }
 }  }
   
   
   
   


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