示例#1
0
 public CGImage CreateImage(int index, CGImageOptions options)
 {
     using (var dict = options == null ? null : options.ToDictionary()) {
         var ret = CGImageSourceCreateImageAtIndex(handle, new IntPtr(index), dict == null ? IntPtr.Zero : dict.Handle);
         return(new CGImage(ret, true));
     }
 }
示例#2
0
 public NSDictionary CopyProperties(CGImageOptions options, int imageIndex)
 {
     if (options == null)
     {
         throw new ArgumentNullException("options");
     }
     return(CopyProperties(options.ToDictionary(), imageIndex));
 }
示例#3
0
        public CGImage CreateImage(int index, CGImageOptions options)
        {
            var dict = options == null ? null : options.ToDictionary();
            var ret  = CGImageSourceCreateImageAtIndex(handle, index, dict == null ? IntPtr.Zero : dict.Handle);

            dict.Dispose();
            return(new CGImage(ret, true));
        }
示例#4
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);
        }
示例#5
0
        public static CGImageSource FromData(NSData data, CGImageOptions options)
        {
            if (data == null)
            {
                throw new ArgumentNullException("data");
            }

            using (var dict = options == null ? null : options.ToDictionary())
                return(new CGImageSource(CGImageSourceCreateWithData(data.Handle, dict == null ? IntPtr.Zero : dict.Handle), true));
        }
示例#6
0
        public static CGImageSource FromDataProvider(CGDataProvider provider, CGImageOptions options)
        {
            if (provider == null)
            {
                throw new ArgumentNullException("provider");
            }

            using (var dict = options == null ? null : options.ToDictionary())
                return(new CGImageSource(CGImageSourceCreateWithDataProvider(provider.Handle, dict == null ? IntPtr.Zero : dict.Handle), true));
        }
示例#7
0
        public static CGImageSource FromUrl(NSUrl url, CGImageOptions options)
        {
            if (url == null)
            {
                throw new ArgumentNullException("url");
            }

            using (var dict = options == null ? null : options.ToDictionary())
                return(new CGImageSource(CGImageSourceCreateWithURL(url.Handle, dict == null ? IntPtr.Zero : dict.Handle), true));
        }
示例#8
0
 public CoreGraphics.CGImageProperties GetProperties(int index, CGImageOptions options = null)
 {
     return(new CoreGraphics.CGImageProperties(CopyProperties(options == null ? null : options.ToDictionary(), index)));
 }
		public static CGImageSource CreateIncremental (CGImageOptions options)
		{
			using (var dict = options == null ? null : options.ToDictionary ())
				return new CGImageSource (CGImageSourceCreateIncremental (dict == null ? IntPtr.Zero : dict.Handle), true);
		}
示例#10
0
		public CoreGraphics.CGImageProperties GetProperties (int index, CGImageOptions options = null)
		{
			return new CoreGraphics.CGImageProperties (CopyProperties (options == null ? null : options.ToDictionary (), index));
		}
示例#11
0
		public NSDictionary CopyProperties (CGImageOptions options, int imageIndex)
		{
			if (options == null)
				throw new ArgumentNullException ("options");
			return CopyProperties (options.ToDictionary (), imageIndex);
		}
示例#12
0
		public static CGImageSource FromData (NSData data, CGImageOptions options)
		{
			if (data == null)
				throw new ArgumentNullException ("data");

			using (var dict = options == null ? null : options.ToDictionary ())
				return new CGImageSource (CGImageSourceCreateWithData (data.Handle, dict == null ? IntPtr.Zero : dict.Handle), true);
		}
示例#13
0
		public static CGImageSource FromDataProvider (CGDataProvider provider, CGImageOptions options)
		{
			if (provider == null)
				throw new ArgumentNullException ("provider");

			using (var dict = options == null ? null : options.ToDictionary ())
				return new CGImageSource (CGImageSourceCreateWithDataProvider (provider.Handle, dict == null ? IntPtr.Zero : dict.Handle), true);
		}
示例#14
0
		public static CGImageSource FromUrl (NSUrl url, CGImageOptions options)
		{
			if (url == null)
				throw new ArgumentNullException ("url");

			using (var dict = options == null ? null : options.ToDictionary ())
				return new CGImageSource (CGImageSourceCreateWithURL (url.Handle, dict == null ? IntPtr.Zero : dict.Handle), true);
		}
示例#15
0
		public CGImage CreateImage (int index, CGImageOptions options)
		{
			using (var dict = options == null ? null : options.ToDictionary ()) {
				var ret = CGImageSourceCreateImageAtIndex (handle, index, dict == null ? IntPtr.Zero : dict.Handle);
				return new CGImage (ret, true);
			}
		}
示例#16
0
 public static CGImageSource CreateIncremental(CGImageOptions options)
 {
     using (var dict = options == null ? null : options.ToDictionary())
         return(new CGImageSource(CGImageSourceCreateIncremental(dict == null ? IntPtr.Zero : dict.Handle), true));
 }
示例#17
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;
 }