示例#1
0
        public static void SetInput(this ID2D1Effect effect, int index, ID2D1Bitmap input = null, bool invalidate = false)
        {
            if (effect == null)
            {
                throw new ArgumentNullException(nameof(effect));
            }

            effect.SetInput(index, input, invalidate);
        }
示例#2
0
        public static void SetInput(this ID2D1Effect effect, ID2D1Image image, int index = 0, bool invalidate = false)
        {
            if (effect == null)
            {
                throw new ArgumentNullException(nameof(effect));
            }

            if (image == null)
            {
                throw new ArgumentNullException(nameof(image));
            }

            effect.SetInput((uint)index, image, invalidate);
        }
示例#3
0
        public static void SetInputEffect(this ID2D1Effect effect, ID2D1Effect inputEffect, int index = 0, bool invalidate = false)
        {
            if (effect == null)
            {
                throw new ArgumentNullException(nameof(effect));
            }

            if (inputEffect == null)
            {
                throw new ArgumentNullException(nameof(inputEffect));
            }

            inputEffect.GetOutput(out var output);
            effect.SetInput((uint)index, output, invalidate);
            Marshal.ReleaseComObject(output);
        }