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(); } }
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 (); }
public void SetStrokePattern (CGPattern pattern, nfloat [] components) { CGContextSetStrokePattern (handle, pattern == null ? IntPtr.Zero : pattern.handle, components); }