Esempio n. 1
0
 private void AddGlyphData(FontGlyphData glyphData)
 {
     if (this.glyphList.Capacity >= this.glyphList.Count + 1)
     {
         this.glyphList.Capacity += 10;
     }
     this.glyphList.Add(glyphData);
 }
Esempio n. 2
0
        private void Reserve(FontGlyph glyph, FontNode[] nodes, Rectangle region)
        {
            var glyphData = new FontGlyphData(this.Page, glyph, region);

            foreach (var item in nodes)
            {
                item.AddGlyphData(glyphData);
            }
            var spacingRect = glyphData.SpacingRectangle;
            var lt          = new Point(spacingRect.Left, spacingRect.Top);
            var rt          = new Point(spacingRect.Right, spacingRect.Top);
            var lb          = new Point(spacingRect.Left, spacingRect.Bottom);
            var rb          = new Point(spacingRect.Right, spacingRect.Bottom);

            this.pointList.Remove(lt);
            this.pointList.Remove(lb);
            this.pointList.Insert(0, rt);
            if (this.rightBottomList.Contains(lb) == false)
            {
                this.pointList.Add(lb);
            }

            this.rightBottomList.Add(rb);
        }