public CGColor(CGColorSpace colorspace, nfloat [] components) { if (components == null) { global::ObjCRuntime.ThrowHelper.ThrowArgumentNullException(nameof(components)); } var colorspace_handle = colorspace.GetNonNullHandle(nameof(colorspace)); handle = CGColorCreate(colorspace_handle, components); }
static IntPtr Create(CGColorSpace colorspace, nfloat [] components) { if (components is null) { global::ObjCRuntime.ThrowHelper.ThrowArgumentNullException(nameof(components)); } var colorspace_handle = colorspace.GetNonNullHandle(nameof(colorspace)); return(CGColorCreate(colorspace_handle, components)); }
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(); } }