Example #1
0
        public unsafe CGContextPDF(CGDataConsumer dataConsumer, CGRect mediaBox, CGPDFInfo info)
        {
            if (dataConsumer == null)
                throw new ArgumentNullException ("dataConsumer");

            using (var dict = info == null ? null : info.ToDictionary ())
                Handle = CGPDFContextCreate (dataConsumer.Handle, &mediaBox, dict == null ? IntPtr.Zero : dict.Handle);
        }
Example #2
0
        public unsafe CGContextPDF(CGDataConsumer dataConsumer, CGRect mediaBox, CGPDFInfo info)
        {
            if (dataConsumer == null)
            {
                throw new ArgumentNullException("dataConsumer");
            }

            using (var dict = info == null ? null : info.ToDictionary())
                Handle = CGPDFContextCreate(dataConsumer.Handle, &mediaBox, dict == null ? IntPtr.Zero : dict.Handle);
        }
Example #3
0
		public static CGImageDestination Create (CGDataConsumer consumer, string typeIdentifier, int imageCount, CGImageDestinationOptions options = null)
		{
			if (consumer == null)
				throw new ArgumentNullException ("consumer");
			if (typeIdentifier == null)
				throw new ArgumentNullException ("typeIdentifier");

			var dict = options == null ? null : options.ToDictionary ();
			var typeId = NSString.CreateNative (typeIdentifier);
			IntPtr p = CGImageDestinationCreateWithDataConsumer (consumer.Handle, typeId, imageCount, dict == null ? IntPtr.Zero : dict.Handle);
			NSString.ReleaseNative (typeId);
			var ret = p == IntPtr.Zero ? null : new CGImageDestination (p, true);
			if (dict != null)
				dict.Dispose ();
			return ret;
		}
 public unsafe CGContextPDF(CGDataConsumer dataConsumer) :
     this(dataConsumer, null, null)
 {
 }
 public unsafe CGContextPDF(CGDataConsumer dataConsumer, CGPDFInfo info) :
     this(dataConsumer, null, info)
 {
 }
 public unsafe CGContextPDF(CGDataConsumer dataConsumer, CGRect mediaBox) :
     this(dataConsumer, &mediaBox, null)
 {
 }
 public unsafe CGContextPDF(CGDataConsumer dataConsumer, CGRect mediaBox, CGPDFInfo info) :
     this(dataConsumer, &mediaBox, info)
 {
 }
 unsafe CGContextPDF(CGDataConsumer dataConsumer, CGRect *mediaBox, CGPDFInfo info)
 {
     using (var dict = info == null ? null : info.ToDictionary())
         Handle = CGPDFContextCreate(dataConsumer.GetHandle(), mediaBox, dict.GetHandle());
 }