ruder

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::

    function Draw( )
    {
    }

    Draw.prototype.Draw=function(items,x,y)
    {

        for(var i=0;i<items.length;i++)
        {
             this.DrawByIndex(x,y,items[i],i);
        } 
    }
  Draw.prototype.DrawByIndex=function(x,y,item,index)
    {

        if(index==0)
        {
             this.DrawBy(x,y,item,0,0);
             return;
        }

        var circle=parseInt((index-1)/6);
        var value=SuperMath.Qu2(1,1,0-2*circle);
        circle=Math.max(value.value1,value.value2);
        circle=parseInt(circle)+1;
      
        var position=((index-1)-(circle-1)*6)%(circle*6);
        this.DrawBy(x,y,item,circle,position);
    }

posted on 2009-03-30 17:23  徐境  阅读(143)  评论(0)    收藏  举报