Exemplo n.º 1
0
        unsafe CGContextPDF(NSUrl url, CGRect *mediaBox, CGPDFInfo info)
        {
            if (url == null)
            {
                throw new ArgumentNullException("url");
            }

            using (var dict = info == null ? null : info.ToDictionary())
                Handle = CGPDFContextCreateWithURL(url.Handle, mediaBox, dict == null ? IntPtr.Zero : dict.Handle);
        }
Exemplo n.º 2
0
        static void Add(NSMutableDictionary dict, IntPtr key, CGRect?val)
        {
            if (!val.HasValue)
            {
                return;
            }
            NSData data;

            unsafe {
                CGRect  f  = val.Value;
                CGRect *pf = &f;
                data = NSData.FromBytes((IntPtr)pf, 16);
            }
            dict.LowlevelSetObject(data, key);
        }
Exemplo n.º 3
0
 unsafe extern static void RectFillList(CGRect *rects, nint count);
Exemplo n.º 4
0
 unsafe CGContextPDF(NSUrl url, CGRect *mediaBox, CGPDFInfo info)
 {
     using (var dict = info == null ? null : info.ToDictionary())
         Handle = CGPDFContextCreateWithURL(url.GetHandle(), mediaBox, dict.GetHandle());
 }
Exemplo n.º 5
0
 unsafe CGContextPDF(CGDataConsumer dataConsumer, CGRect *mediaBox, CGPDFInfo info)
 {
     using (var dict = info == null ? null : info.ToDictionary())
         Handle = CGPDFContextCreate(dataConsumer.GetHandle(), mediaBox, dict.GetHandle());
 }
Exemplo n.º 6
0
 unsafe extern static /* CGContextRef */ IntPtr CGPDFContextCreate(/* CGDataConsumerRef */ IntPtr consumer, CGRect *mediaBox, /* CFDictionaryRef */ IntPtr auxiliaryInfo);
Exemplo n.º 7
0
 unsafe extern static /* CGContextRef */ IntPtr CGPDFContextCreateWithURL(/* CFURLRef */ IntPtr url, CGRect *mediaBox, /* CFDictionaryRef */ IntPtr auxiliaryInfo);
Exemplo n.º 8
0
 unsafe extern static void CGContextBeginPage(/* CGContextRef __nullable */ IntPtr c,
                                              /* const CGRect * __nullable */ CGRect *mediaBox);
Exemplo n.º 9
0
 unsafe CGContextPDF(NSUrl?url, CGRect *mediaBox, CGPDFInfo?info)
     : base(Create(url, mediaBox, info), true)
 {
 }
Exemplo n.º 10
0
 unsafe static IntPtr Create(NSUrl?url, CGRect *mediaBox, CGPDFInfo?info)
 {
     using (var dict = info?.ToDictionary())
         return(CGPDFContextCreateWithURL(url.GetHandle(), mediaBox, dict.GetHandle()));
 }
Exemplo n.º 11
0
 unsafe CGContextPDF(CGDataConsumer?dataConsumer, CGRect *mediaBox, CGPDFInfo?info)
     : base(Create(dataConsumer, mediaBox, info), true)
 {
 }
Exemplo n.º 12
0
 unsafe static IntPtr Create(CGDataConsumer?dataConsumer, CGRect *mediaBox, CGPDFInfo?info)
 {
     using (var dict = info?.ToDictionary())
         return(CGPDFContextCreate(dataConsumer.GetHandle(), mediaBox, dict.GetHandle()));
 }