Ejemplo n.º 1
0
        public CGColor(CGColorSpace colorspace, CGPattern pattern, nfloat [] components)
        {
            if (colorspace == null)
            {
                throw new ArgumentNullException("colorspace");
            }
            if (colorspace.handle == IntPtr.Zero)
            {
                throw new ObjectDisposedException("colorspace");
            }
            if (pattern == null)
            {
                throw new ArgumentNullException("pattern");
            }
            if (components == null)
            {
                throw new ArgumentNullException("components");
            }

            handle = CGColorCreateWithPattern(colorspace.handle, pattern.handle, components);
            if (handle == IntPtr.Zero)
            {
                throw new ArgumentException();
            }
        }
Ejemplo n.º 2
0
		public CGColor (CGColorSpace colorspace, CGPattern pattern, nfloat [] components)
		{
			if (colorspace == null)
				throw new ArgumentNullException ("colorspace");
			if (colorspace.handle == IntPtr.Zero)
				throw new ObjectDisposedException ("colorspace");
			if (pattern == null)
				throw new ArgumentNullException ("pattern");
			if (components == null)
				throw new ArgumentNullException ("components");

			handle = CGColorCreateWithPattern (colorspace.handle, pattern.handle, components);
			if (handle == IntPtr.Zero)
				throw new ArgumentException ();
		}
Ejemplo n.º 3
0
		public void SetStrokePattern (CGPattern pattern, nfloat [] components)
		{
			CGContextSetStrokePattern (handle, pattern == null ? IntPtr.Zero : pattern.handle, components);
		}