public bool GetStream(int idx, out CGPDFStream result) { IntPtr ptr; var r = CGPDFArrayGetStream(handle, idx, out ptr); result = r ? new CGPDFStream(ptr) : null; return(r); }
public CGPDFContentStream(CGPDFStream stream, NSDictionary streamResources = null, CGPDFContentStream parent = null) { if (stream == null) throw new ArgumentNullException ("stream"); var dh = streamResources == null ? IntPtr.Zero : streamResources.Handle; var ph = parent == null ? IntPtr.Zero : parent.Handle; Handle = CGPDFContentStreamCreateWithStream (stream.Handle, dh, ph); }
public CGPDFStream[] GetStreams() { using (CFArray a = new CFArray(CGPDFContentStreamGetStreams(Handle))) { var streams = new CGPDFStream [a.Count]; for (int i = 0; i < a.Count; i++) { streams [i] = new CGPDFStream(a.GetValue(i)); } return(streams); // note: CGPDFStreamRef is weird because it has no retain/release calls unlike other CGPDF* types } }
public CGPDFContentStream(CGPDFStream stream, NSDictionary streamResources = null, CGPDFContentStream parent = null) { if (stream == null) { throw new ArgumentNullException("stream"); } var dh = streamResources == null ? IntPtr.Zero : streamResources.Handle; var ph = parent == null ? IntPtr.Zero : parent.Handle; Handle = CGPDFContentStreamCreateWithStream(stream.Handle, dh, ph); }
public bool GetStream(string key, out CGPDFStream result) { if (key == null) { throw new ArgumentNullException("key"); } IntPtr ptr; var r = CGPDFDictionaryGetStream(handle, key, out ptr); result = r ? new CGPDFStream(ptr) : null; return(r); }
public bool TryGetValue(out CGPDFStream value) { IntPtr ip; if (CGPDFObjectGetValue(Handle, CGPDFObjectType.Stream, out ip)) { value = new CGPDFStream(ip); return(true); } else { value = null; return(false); } }
public bool TryPop(out CGPDFStream value) { IntPtr ip; if (CGPDFScannerPopStream(Handle, out ip)) { value = new CGPDFStream(ip); return(true); } else { value = null; return(false); } }
public bool GetStream (string key, out CGPDFStream result) { if (key == null) throw new ArgumentNullException ("key"); IntPtr ptr; var r = CGPDFDictionaryGetStream (handle, key, out ptr); result = r ? new CGPDFStream (ptr) : null; return r; }
public bool TryGetValue(out CGPDFStream value) { IntPtr ip; if (CGPDFObjectGetValue (Handle, CGPDFObjectType.Stream, out ip)) { value = new CGPDFStream (ip); return true; } else { value = null; return false; } }
public bool TryPop(out CGPDFStream value) { IntPtr ip; if (CGPDFScannerPopStream (Handle, out ip)) { value = new CGPDFStream (ip); return true; } else { value = null; return false; } }
public CGPDFStream[] GetStreams() { using (CFArray a = new CFArray (CGPDFContentStreamGetStreams (Handle))) { var streams = new CGPDFStream [a.Count]; for (int i = 0; i < a.Count; i++) streams [i] = new CGPDFStream (a.GetValue (i)); return streams; // note: CGPDFStreamRef is weird because it has no retain/release calls unlike other CGPDF* types } }
public bool GetStream(int idx, out CGPDFStream result) { IntPtr ptr; var r = CGPDFArrayGetStream (handle, idx, out ptr); result = r ? new CGPDFStream (ptr) : null; return r; }