Пример #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);
        }
Пример #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);
        }
Пример #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;
		}
Пример #4
0
 public unsafe CGContextPDF(CGDataConsumer dataConsumer) :
     this(dataConsumer, null, null)
 {
 }
Пример #5
0
 public unsafe CGContextPDF(CGDataConsumer dataConsumer, CGPDFInfo info) :
     this(dataConsumer, null, info)
 {
 }
Пример #6
0
 public unsafe CGContextPDF(CGDataConsumer dataConsumer, CGRect mediaBox) :
     this(dataConsumer, &mediaBox, null)
 {
 }
Пример #7
0
 public unsafe CGContextPDF(CGDataConsumer dataConsumer, CGRect mediaBox, CGPDFInfo info) :
     this(dataConsumer, &mediaBox, info)
 {
 }
Пример #8
0
 unsafe CGContextPDF(CGDataConsumer dataConsumer, CGRect *mediaBox, CGPDFInfo info)
 {
     using (var dict = info == null ? null : info.ToDictionary())
         Handle = CGPDFContextCreate(dataConsumer.GetHandle(), mediaBox, dict.GetHandle());
 }