コード例 #1
0
        public HSLNode(int w, int h, GraphPixelType p = GraphPixelType.RGBA)
        {
            Name   = "HSL";
            Id     = Guid.NewGuid().ToString();
            width  = w;
            height = h;

            tileX = tileY = 1;

            previewProcessor = new BasicImageRenderer();
            processor        = new HSLProcessor();

            hue        = 0;
            saturation = 0;
            lightness  = 0;

            internalPixelType = p;

            input  = new NodeInput(NodeType.Gray | NodeType.Color, this, "Image");
            Output = new NodeOutput(NodeType.Color, this);

            input.OnInputAdded   += Input_OnInputAdded;
            input.OnInputChanged += Input_OnInputChanged;

            Inputs = new List <NodeInput>();
            Inputs.Add(input);

            Outputs = new List <NodeOutput>();
            Outputs.Add(Output);
        }
コード例 #2
0
        public override void Dispose()
        {
            base.Dispose();

            if (processor != null)
            {
                processor.Release();
                processor = null;
            }
        }