public FontPage(int index, FontDataSettings settings) { this.Index = index; this.settings = settings; this.Name = settings.Name; this.Width = settings.Width; this.Height = settings.Height; this.node = FontNode.Create(this, settings); }
private FontNode(FontPage page, FontNode parent, Rectangle rectangle, FontDataSettings settings) { this.Page = page; this.Parent = parent; this.Rectangle = rectangle; this.pointList = parent == null ? new List <Point>(settings.Capacity * 2) { Point.Empty } : parent.pointList; this.rightBottomList = parent == null ? new List <Point>(settings.Capacity) : parent.rightBottomList; this.settings = settings; this.Childs = Slice(rectangle).Select(item => new FontNode(page, this, item, settings)).ToArray(); while (parent != null) { parent.count++; parent = parent.Parent; } }