Пример #1
0
    protected GeglBWProcessor(Gegl.Node _gegl)
        : base()
    {
        gegl = _gegl;

        SList children = gegl.Children;

        load = mixer = contrast = tint = null;
        foreach (Node c in children) {
            string op = c.Operation;
            if (op == "load")
                load = c;
            else if (op == "mono-mixer")
                mixer = c;
            else if (op == "contrast-curve")
                contrast = c;
            else if (op == "tint")
                tint = c;
        }

        if (load == null || mixer == null || contrast == null || tint == null)
            throw new ApplicationException("not all nodes found");

        Value val = new Value(Gegl.Curve.GType);
        contrastCurve = (GLib.Object)contrast.GetProperty("curve", ref val) as Gegl.Curve;
    }
Пример #2
0
        private void HandleNodeComputed(object o, Gegl.Rectangle rectangle)
        {
            rectangle.X = (int) (Scale * (rectangle.X - X));
            rectangle.Y = (int) (Scale * (rectangle.Y - Y));
            rectangle.Width = (int) Math.Ceiling(rectangle.Width * Scale);
            rectangle.Height = (int) Math.Ceiling(rectangle.Height * Scale);

            QueueDrawArea(rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height);
        }