コード例 #1
0
ファイル: CGFunction.cs プロジェクト: zippo227/xamarin-macios
        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
		public static CGShading CreateAxial (CGColorSpace colorspace, CGPoint start, CGPoint end, 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 (CGShadingCreateAxial (colorspace.Handle, start, end, function.Handle, extendStart, extendEnd), true);
		}
コード例 #3
0
        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));
        }