iTextSharp.text.Rectangle.GetLeft C# (CSharp) Метод

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

Returns the lower left x-coordinate, considering a given margin.
public GetLeft ( float margin ) : float
margin float a margin
Результат float
        public virtual float GetLeft(float margin)
        {
            return llx + margin;
        }

Usage Example

Пример #1
0
    void IPdfPCellEvent.CellLayout(PdfPCell cell, iTextSharp.text.Rectangle position, PdfContentByte[] canvases)
    {
        PdfContentByte canvas    = canvases[PdfPTable.TEXTCANVAS];
        float          x         = 0;
        float          y         = 0;
        int            alignment = 0;

        switch (pos)
        {
        case "TOP_LEFT":
            x         = position.GetLeft(3);
            y         = position.GetTop(content.Leading);
            alignment = Element.ALIGN_LEFT;
            break;

        case "TOP_RIGHT":
            x         = position.GetRight(3);
            y         = position.GetTop(content.Leading);
            alignment = Element.ALIGN_RIGHT;
            break;

        case "BOTTOM_LEFT":
            x         = position.GetLeft(3);
            y         = position.GetBottom(3);
            alignment = Element.ALIGN_LEFT;
            break;

        case "BOTTOM_RIGHT":
            x         = position.GetRight(3);
            y         = position.GetBottom(3);
            alignment = Element.ALIGN_RIGHT;
            break;

        case "CENTER_TOP":
            x         = position.GetRight(3) + position.GetLeft(3) / 2;
            y         = position.GetTop(3);
            alignment = Element.ALIGN_RIGHT;
            break;

        case "CENTER_BOTTOM":
            x         = position.GetRight(3) + position.GetLeft(3) / 2;
            y         = position.GetBottom(3);
            alignment = Element.ALIGN_RIGHT;
            break;

        case "CENTER_MIDDLE":
            x         = position.GetRight(3) + position.GetLeft(3) / 2;
            y         = x;
            alignment = Element.ALIGN_RIGHT;
            break;
        }
        ColumnText.ShowTextAligned(canvas, alignment, content, x, y, 0);
    }
All Usage Examples Of iTextSharp.text.Rectangle::GetLeft