tk2dAtlas.MaxRectsBinPack.Init C# (CSharp) Method

Init() public method

public Init ( int width, int height ) : void
width int
height int
return void
        public void Init(int width, int height)
        {
            binWidth = width;
            binHeight = height;

            Rect n = new Rect();
            n.x = 0;
            n.y = 0;
            n.width = width;
            n.height = height;

            usedRectangles.Clear();

            freeRectangles.Clear();
            freeRectangles.Add(n);
        }