public AtlasPackerState(int maxSize, ImageSpacing spacing, bool isSingle) { Width = STEP_SIZE; Height = STEP_SIZE; MaxSize = maxSize; Spacing = spacing; IsSingle = isSingle; Items = new List <Item>(); Heuristic = ChoiceHeuristic.BestAreaFit; if (!IsSingle) { Packer = new RectPacker(Width, Height, false); } }
public AtlasPacker(int maxSize, ImageSpacing spacing) { Spacing = spacing; if (maxSize < 256) { MaxSize = 256; } else if (maxSize > 16384) { MaxSize = 16384; } else { MaxSize = maxSize; } _singles = new List <AtlasImage>(); _states = new List <AtlasPackerState> { new AtlasPackerState(maxSize, Spacing, false) }; }