Пример #1
0
        private PdfXObject AnnotationArea
        (
            Double Width,
            Double Height,
            Color FillColor,
            Color BorderColor,
            String Text
        )
        {
            PdfXObject XObject = new PdfXObject(Document, Width, Height);

            XObject.SaveGraphicsState();
            XObject.SetColorNonStroking(FillColor);
            XObject.SetColorStroking(BorderColor);
            XObject.DrawRectangle(0.02 * Width, 0.02 * Height, 0.96 * Width, 0.96 * Height, PaintOp.CloseFillStroke);
            XObject.SetColorNonStroking(BorderColor);
            XObject.DrawText(ArialNormal, 14.0, 0.5 * Width, 0.5 * Height, TextJustify.Center, Text);
            XObject.RestoreGraphicsState();
            return(XObject);
        }