示例#1
0
        private static void drawColoredPattern(PdfDocument pdf)
        {
            PdfTilingPattern pattern = pdf.AddColoredPattern(5, 5);

            fill(pattern);

            PdfCanvas canvas = pdf.GetPage(0).Canvas;

            canvas.Brush.Pattern = pattern;
            canvas.DrawString(new PointF(50, 50), 0, "Pattern-filled text");
            canvas.DrawCircle(new PointF(0, 0), 20, PdfDrawMode.FillAndStroke);
        }