Esempio n. 1
0
        /// <summary>
        /// Adds an existing line to this region, updating the items' parent in the process.
        /// And increasing the size of this region if the block is closed.
        /// </summary>
        /// <param name="item"></param>
        public virtual void AddExistingItem(PDFLayoutLine line)
        {
            if (null == line)
            {
                throw new ArgumentNullException("line");
            }
            this._contents.Add(line);
            line.SetOffset(line.OffsetX, this.Height);
            line.SetParent(this);
            line.LineIndex = this.Contents.Count - 1;

            if (line.IsClosed)
            {
                this.AddToSize(line);
            }
        }