~ubuntu-branches/ubuntu/saucy/monodevelop/saucy

« back to all changes in this revision

Viewing changes to external/monomac/samples/MicroSamples/generate-pdf.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2012-05-27 18:08:20 UTC
  • mfrom: (1.8.5) (1.5.8 sid)
  • Revision ID: package-import@ubuntu.com-20120527180820-f1ub6lhg0s50wci1
Tags: 3.0.2+dfsg-3
* [fcecfe7] Fix monodevelop-core-addins.pc.in to point to actual 
  installed location of assemblies.
* [26e1a07] DebSrc 3.0 does not support Quilt's -p parameter, so 
  manually adjust the path in the patch file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//
 
2
// generate-pdf.cs: This sample renders a red circle in a PDF file
 
3
//
 
4
 
 
5
using System;
 
6
using System.Drawing;
 
7
using MonoMac.CoreGraphics;
 
8
using MonoMac.Foundation;
 
9
 
 
10
class DrawCircleInPDF {
 
11
 
 
12
        static void Main ()
 
13
        {
 
14
                var pdf = new CGContextPDF (NSUrl.FromFilename ("demo.pdf"), new RectangleF (0, 0, 617, 792));
 
15
 
 
16
                pdf.BeginPage (null);
 
17
                pdf.SetRGBFillColor (1, 0, 0, 1);
 
18
                pdf.AddArc (300, 300, 100, 0, (float) (2 * Math.PI), true);
 
19
                pdf.FillPath ();
 
20
                pdf.EndPage ();
 
21
                pdf.Flush ();
 
22
        }
 
23
}
 
 
b'\\ No newline at end of file'