iTextSharp.text.pdf.PdfAnnotation.CreateLine C# (CSharp) Метод

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

public static CreateLine ( PdfWriter writer, Rectangle rect, string contents, float x1, float y1, float x2, float y2 ) : PdfAnnotation
writer PdfWriter
rect iTextSharp.text.Rectangle
contents string
x1 float
y1 float
x2 float
y2 float
Результат PdfAnnotation
        public static PdfAnnotation CreateLine(PdfWriter writer, Rectangle rect, string contents, float x1, float y1, float x2, float y2)
        {
            PdfAnnotation annot = new PdfAnnotation(writer, rect);
            annot.Put(PdfName.SUBTYPE, PdfName.LINE);
            annot.Put(PdfName.CONTENTS, new PdfString(contents, PdfObject.TEXT_UNICODE));
            PdfArray array = new PdfArray(new PdfNumber(x1));
            array.Add(new PdfNumber(y1));
            array.Add(new PdfNumber(x2));
            array.Add(new PdfNumber(y2));
            annot.Put(PdfName.L, array);
            return annot;
        }