iTextSharp.text.pdf.PdfCell.GetLines C# (CSharp) Метод

GetLines() публичный Метод

public GetLines ( float top, float bottom ) : ArrayList
top float
bottom float
Результат System.Collections.ArrayList
        public ArrayList GetLines(float top, float bottom) {
            float lineHeight;
            float currentPosition = Math.Min(this.Top, top);
            this.Top = currentPosition + cellspacing;
            ArrayList result = new ArrayList();
        
            // if the bottom of the page is higher than the top of the cell: do nothing
            if (Top < bottom) {
                return result;
            }
            
            // we loop over the lines
            int size = lines.Count;
            bool aboveBottom = true;
            for (int i = 0; i < size && aboveBottom; i++) {
                line = (PdfLine) lines[i];
                lineHeight = line.Height;
                currentPosition -= lineHeight;
                // if the currentPosition is higher than the bottom, we add the line to the result
                if (currentPosition > (bottom + cellpadding + GetBorderWidthInside(BOTTOM_BORDER))) { // bugfix by Tom Ring and Veerendra Namineni
                    result.Add(line);
                }
                else {
                    aboveBottom = false;
                }
            }
            // if the bottom of the cell is higher than the bottom of the page, the cell is written, so we can remove all lines
            float difference = 0f;
            if (!header) {
                if (aboveBottom) {
                    lines = new ArrayList();
                    contentHeight = 0f;
                }
                else {
                    size = result.Count;
                    for (int i = 0; i < size; i++) {
                        line = RemoveLine(0);
                        difference += line.Height;
                    }
                }
            }
            if (difference > 0) {
                foreach (Image image in images) {
                    image.SetAbsolutePosition(image.AbsoluteX, image.AbsoluteY - difference - leading);
                }
            }
            return result;
        }