Inheritance: INativeObject, IDisposable
コード例 #1
0
ファイル: CGImageSource.cs プロジェクト: kangaroo/maccore
        public static CGImage CreateImageAtIndex(CGImageSource isrc, int index, NSDictionary options)
        {
            if (isrc == null)
                throw new ArgumentNullException ("isrc");

            return new CGImage(CGImageSourceCreateImageAtIndex(isrc.Handle, index, options == null ? IntPtr.Zero : options.Handle));
        }
コード例 #2
0
        public static CGImageSource CreateIncremental(CGImageOptions options)
        {
            var dict = options == null ? null : options.ToDictionary();
            var ret  = new CGImageSource(CGImageSourceCreateIncremental(dict == null ? IntPtr.Zero : dict.Handle), true);

            dict.Dispose();
            return(ret);
        }
コード例 #3
0
        public void AddImage(CGImageSource source, int index, NSDictionary properties)
        {
            if (source == null)
            {
                throw new ArgumentNullException("source");
            }

            CGImageDestinationAddImageFromSource(handle, source.Handle, (IntPtr)index, properties == null ? IntPtr.Zero : properties.Handle);
        }
コード例 #4
0
        public static CGImageSource FromDataProvider(CGDataProvider provider, CGImageOptions options)
        {
            if (provider == null)
            {
                throw new ArgumentNullException("provider");
            }

            var dict = options == null ? null : options.ToDictionary();
            var ret  = new CGImageSource(CGImageSourceCreateWithDataProvider(provider.Handle, dict == null ? IntPtr.Zero : dict.Handle), true);

            dict.Dispose();
            return(ret);
        }
コード例 #5
0
        public static CGImageSource FromData(NSData data, CGImageOptions options)
        {
            if (data == null)
            {
                throw new ArgumentNullException("data");
            }

            var dict = options == null ? null : options.ToDictionary();
            var ret  = new CGImageSource(CGImageSourceCreateWithData(data.Handle, dict == null ? IntPtr.Zero : dict.Handle), true);

            dict.Dispose();
            return(ret);
        }
コード例 #6
0
        public static CGImageSource FromUrl(NSUrl url, CGImageOptions options)
        {
            if (url == null)
            {
                throw new ArgumentNullException("url");
            }

            var dict = options == null ? null : options.ToDictionary();
            var ret  = new CGImageSource(CGImageSourceCreateWithURL(url.Handle, dict == null ? IntPtr.Zero : dict.Handle), true);

            dict.Dispose();
            return(ret);
        }
コード例 #7
0
ファイル: CGImageDestination.cs プロジェクト: polipo/maccore
		public void AddImage (CGImageSource source, int index, NSDictionary properties)
		{
			if (source == null)
				throw new ArgumentNullException ("source");
			
			CGImageDestinationAddImageFromSource (Handle, source.Handle, (IntPtr) index, properties == null ? IntPtr.Zero : properties.Handle);
		}
コード例 #8
0
ファイル: CGImageSource.cs プロジェクト: JoeMatt/maccore
        public static CGImageSource FromUrl(NSUrl url, CGImageOptions options)
        {
            if (url == null)
                throw new ArgumentNullException ("url");

            var dict = options == null ? null : options.ToDictionary ();
            var ret = new CGImageSource (CGImageSourceCreateWithURL (url.Handle, dict == null ? IntPtr.Zero : dict.Handle), true);
            dict.Dispose ();
            return ret;
        }
コード例 #9
0
ファイル: CGImageSource.cs プロジェクト: JoeMatt/maccore
        public static CGImageSource FromDataProvider(CGDataProvider provider, CGImageOptions options)
        {
            if (provider == null)
                throw new ArgumentNullException ("provider");

            var dict = options == null ? null : options.ToDictionary ();
            var ret = new CGImageSource (CGImageSourceCreateWithDataProvider (provider.Handle, dict == null ? IntPtr.Zero : dict.Handle), true);
            dict.Dispose ();
            return ret;
        }
コード例 #10
0
ファイル: CGImageSource.cs プロジェクト: JoeMatt/maccore
        public static CGImageSource FromData(NSData data, CGImageOptions options)
        {
            if (data == null)
                throw new ArgumentNullException ("data");

            var dict = options == null ? null : options.ToDictionary ();
            var ret = new CGImageSource (CGImageSourceCreateWithData (data.Handle, dict == null ? IntPtr.Zero : dict.Handle), true);
            dict.Dispose ();
            return ret;
        }
コード例 #11
0
ファイル: CGImageSource.cs プロジェクト: JoeMatt/maccore
 public static CGImageSource CreateIncremental(CGImageOptions options)
 {
     var dict = options == null ? null : options.ToDictionary ();
     var ret = new CGImageSource (CGImageSourceCreateIncremental (dict == null ? IntPtr.Zero : dict.Handle), true);
     dict.Dispose ();
     return ret;
 }