コード例 #1
0
        unsafe static void EvaluateCallback(IntPtr info, nfloat *input, nfloat *output)
        {
            GCHandle   lgc       = GCHandle.FromIntPtr(info);
            CGFunction container = (CGFunction)lgc.Target;

            container.evaluate(input, output);
        }
コード例 #2
0
ファイル: CGShading.cs プロジェクト: cwensley/xamarin-macios
        public static CGShading CreateRadial(CGColorSpace colorspace, CGPoint start, nfloat startRadius, CGPoint end, nfloat endRadius,
                                             CGFunction function, bool extendStart, bool extendEnd)
        {
            if (colorspace is null)
            {
                throw new ArgumentNullException(nameof(colorspace));
            }
            if (function is null)
            {
                throw new ArgumentNullException(nameof(function));
            }

            return(new CGShading(CGShadingCreateRadial(colorspace.GetCheckedHandle(), start, startRadius, end, endRadius,
                                                       function.GetCheckedHandle(), extendStart, extendEnd), true));
        }
コード例 #3
0
ファイル: CGShading.cs プロジェクト: tondat/xamarin-macios
        public static CGShading CreateRadial(CGColorSpace colorspace, CGPoint start, nfloat startRadius, CGPoint end, nfloat endRadius,
                                             CGFunction function, bool extendStart, bool extendEnd)
        {
            if (colorspace == null)
            {
                throw new ArgumentNullException("colorspace");
            }
            if (colorspace.Handle == IntPtr.Zero)
            {
                throw new ObjectDisposedException("colorspace");
            }
            if (function == null)
            {
                throw new ArgumentNullException("function");
            }
            if (function.Handle == IntPtr.Zero)
            {
                throw new ObjectDisposedException("function");
            }

            return(new CGShading(CGShadingCreateRadial(colorspace.Handle, start, startRadius, end, endRadius,
                                                       function.Handle, extendStart, extendEnd), true));
        }