[wadalabfont-kit] / java / Skeleton.java  

View of /java/Skeleton.java

Parent Directory | Revision Log
Revision: 1.2 - (download) (as text) (annotate)
Thu Jan 4 10:23:56 2001 UTC (23 years, 10 months ago) by ktanaka
Branch: MAIN
CVS Tags: SNAP-20030702, SNAP-20030624, SNAP-20030630, SNAP-20040518, HEAD
Changes since 1.1: +15 -0 lines
MinchoRendererのへんこう瘢雹
import java.util.*;

public class Skeleton {
  Point[] points;
  Element[] elements;
  Annotation[] annotations;
  Skeleton(Point[] points,Element[] elements,Annotation[] annotations){
    this.points=points;
    this.elements=elements;
    this.annotations=annotations;
  }
  public Point[] getPoints(){ return points;}
  public Element[] getElements(){ return elements;}
  public Annotation[] getAnnotations(){ return annotations;}
  // まずは腕だめしに単純なやつをやってみる
  public Outline[] makeOutline(Renderer renderer){
    Vector v=new Vector();
    for(int i=0;i<elements.length;i++){
      Outline[] outlines=renderer.elementRenderer(points,elements[i]);
      if(outlines!=null){
	v.add(outlines[0]);
	v.add(outlines[1]);
      }
    }
    Outline[] ret=new Outline[v.size()];
    v.toArray(ret);
    return ret;
  }
  public String toString(){
    String ret="Skeleton(";
    int i,len=points.length;
    for(i=0;i<len;i++)
      ret+=points[i].toString()+",";
    len=elements.length;
    for(i=0;i<len;i++)
      ret+=elements[i].toString()+",";
    return ret+")";
  }
}

ktanaka

Powered by ViewCVS 1.0-dev

ViewCVS and CVS Help