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 (components == null) { global::ObjCRuntime.ThrowHelper.ThrowArgumentNullException(nameof(components)); } var colorspace_handle = colorspace.GetNonNullHandle(nameof(colorspace)); var pattern_handle = pattern.GetNonNullHandle(nameof(pattern)); handle = CGColorCreateWithPattern(colorspace_handle, pattern_handle, components); if (handle == IntPtr.Zero) { throw new ArgumentException(); } }
public void SetStrokePattern(CGPattern pattern, nfloat [] components) { CGContextSetStrokePattern(handle, pattern.GetHandle(), components); }
public CGColor(CGColorSpace colorspace, CGPattern pattern, nfloat [] components) : base(Create(colorspace, pattern, components), true) { }