iTextSharp.text.pdf.PdfPRow.SetColumn C# (CSharp) Метод

SetColumn() публичный статический Метод

public static SetColumn ( ColumnText ct, float left, float bottom, float right, float top ) : float
ct ColumnText
left float
bottom float
right float
top float
Результат float
        public static float SetColumn(ColumnText ct, float left, float bottom, float right, float top)
        {
            if (left > right)
                right = left;
            if (bottom > top)
                top = bottom;
            ct.SetSimpleColumn(left, bottom, right, top);
            return top;
        }

Usage Example

Пример #1
0
 /**
 * Returns the height of the cell.
 * @return  the height of the cell
 * @since   3.0.0
 */
 public float GetMaxHeight() {
     bool pivoted = (Rotation == 90 || Rotation == 270);
     Image img = this.Image;
     if (img != null) {
         img.ScalePercent(100);
         float refWidth = pivoted ? img.ScaledHeight : img.ScaledWidth;
         float scale = (Right - EffectivePaddingRight
                 - EffectivePaddingLeft - Left) / refWidth;
         img.ScalePercent(scale * 100);
         float refHeight = pivoted ? img.ScaledWidth : img.ScaledHeight;
         Bottom = Top - EffectivePaddingTop - EffectivePaddingBottom - refHeight;
     }
     else {
         if (pivoted && HasFixedHeight())
             Bottom = Top - FixedHeight;
         else {
             ColumnText ct = ColumnText.Duplicate(Column);
             float right, top, left, bottom;
             if (pivoted) {
                 right = PdfPRow.RIGHT_LIMIT;
                 top = Right - EffectivePaddingRight;
                 left = 0;
                 bottom = Left + EffectivePaddingLeft;
             }
             else {
                 right = NoWrap ? PdfPRow.RIGHT_LIMIT : Right - EffectivePaddingRight;
                 top = Top - EffectivePaddingTop;
                 left = Left + EffectivePaddingLeft;
                 bottom = HasFixedHeight() ? top + EffectivePaddingBottom - FixedHeight : PdfPRow.BOTTOM_LIMIT;
             }
             PdfPRow.SetColumn(ct, left, bottom, right, top);
             ct.Go(true);
             if (pivoted)
                 Bottom = Top - EffectivePaddingTop - EffectivePaddingBottom - ct.FilledWidth;
             else {
                 float yLine = ct.YLine;
                 if (UseDescender)
                     yLine += ct.Descender;
                 Bottom = yLine - EffectivePaddingBottom;
             }
         }
     }
     float height = Height;
     if (HasFixedHeight())
         height = FixedHeight;
     else if (HasMinimumHeight() && height < MinimumHeight)
         height = MinimumHeight;
     return height;
 }