示例#1
0
    static void Main()
    {
        var pdf = new CGContextPDF(NSUrl.FromFilename("demo.pdf"), new RectangleF(0, 0, 617, 792));

        pdf.BeginPage(null);
        pdf.SetRGBFillColor(1, 0, 0, 1);
        pdf.AddArc(300, 300, 100, 0, (float)(2 * Math.PI), true);
        pdf.FillPath();
        pdf.EndPage();
        pdf.Flush();
    }
示例#2
0
	static void Main ()
	{
		NSApplication.Init ();
		NSUrl path = NSUrl.FromFilename (Path.Combine ("../../..", "demo.pdf")); //Escape out of generate-pdf.app/Contents/Resources
		var pdf = new CGContextPDF (path, new RectangleF (0, 0, 617, 792));

		pdf.BeginPage (null);
		pdf.SetFillColor (1, 0, 0, 1);
		pdf.AddArc (300, 300, 100, 0, (float) (2 * Math.PI), true);
		pdf.FillPath ();
		pdf.EndPage ();
		pdf.Flush ();
	}
示例#3
0
    static void Main()
    {
        NSApplication.Init();
        NSUrl path = NSUrl.FromFilename(Path.Combine("../../..", "demo.pdf"));           //Escape out of generate-pdf.app/Contents/Resources
        var   pdf  = new CGContextPDF(path, new RectangleF(0, 0, 617, 792));

        pdf.BeginPage(null);
        pdf.SetFillColor(1, 0, 0, 1);
        pdf.AddArc(300, 300, 100, 0, (float)(2 * Math.PI), true);
        pdf.FillPath();
        pdf.EndPage();
        pdf.Flush();
    }