iTextSharp.text.pdf.PdfDiv.getActualHeight C# (CSharp) Метод

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

public getActualHeight ( ) : float
Результат float
        public float getActualHeight()
        {
            return height != null && height >= contentHeight ? (float)height : contentHeight;
        }

Usage Example

Пример #1
0
        public int layout(bool simulate)
        {
            int status = ColumnText.NO_MORE_TEXT;

            filledWidth = 0;

            List <IElement> floatingElements = new List <IElement>();

            while (content.Count > 0)
            {
                if (content[0] is PdfDiv)
                {
                    PdfDiv floatingElement = (PdfDiv)content[0];
                    if (floatingElement.Float == PdfDiv.FloatType.LEFT || floatingElement.Float == PdfDiv.FloatType.RIGHT)
                    {
                        floatingElements.Add(floatingElement);
                        content.RemoveAt(0);
                    }
                    else
                    {
                        if (floatingElements.Count > 0)
                        {
                            status = floatingLayout(floatingElements, simulate);
                            //if ((status & ColumnText.NO_MORE_TEXT) == 0) {
                            //    break;
                            //}
                        }

                        status = floatingElement.layout(compositeColumn, true, floatLeftX, minY, floatRightX, yLine);

                        if (!simulate)
                        {
                            status = floatingElement.layout(compositeColumn, simulate, floatLeftX, minY, floatRightX, yLine);
                        }

                        yLine -= floatingElement.getActualHeight();

                        if (floatingElement.getActualWidth() > filledWidth)
                        {
                            filledWidth = floatingElement.getActualWidth();
                        }
                        //if ((status & ColumnText.NO_MORE_TEXT) == 0) {
                        //    break;
                        //}
                        content.RemoveAt(0);
                    }
                }
                else
                {
                    floatingElements.Add(content[0]);
                    content.RemoveAt(0);
                }
            }

            if (/*(status & ColumnText.NO_MORE_TEXT) != 0 && */ floatingElements.Count > 0)
            {
                status = floatingLayout(floatingElements, simulate);
            }

            //foreach (IElement floatingElement in floatingElements) {
            //    content.Add(floatingElement);
            //}


            return(status);
        }
All Usage Examples Of iTextSharp.text.pdf.PdfDiv::getActualHeight