示例#1
0
 public Texture2D makeDelaunayLineBmp()
 {
     Vector2 p0=leftSite.Coord;
     Vector2 p1=rightSite.Coord;
     GRAPHICS.clear();
     GRAPHICS.lineStyle(0,0,1.0,false,LineScaleMove.NONE,CapsStyle.NONE);
     GRAPHICS.moveTo(p0.x, p0.y);
     GRAPHICS.lineTo(p1.x, p1.y);
     int w=(int)Mathf.Ceil(Mathf.Max(p0.x,p1.x));
     if(w<1){
         w=1;
     }
     int h=(int)Mathf.Ceil(Mathf.Max(p0.y,p1.y));
     if(h<1){
         h=1;
     }
     Texture2D bmp =new Texture2D(w,h);
     bmp.draw(LINESPRITE);
     return bmp;
 }