Blame mono/Assistance/Modifier.cs

72b17c
using System;
72b17c
using System.Collections.Generic;
b82ef4
using Assistance.Drawing;
72b17c
72b17c
namespace Assistance {
72b17c
	public class Modifier: ActivePoint.Owner {
b82ef4
		public static readonly Pen pen = new Pen("Light Gray");
72b17c
726e8a
		public Modifier(Document document): base(document) {
726e8a
			document.modifiers.Add(this);
72b17c
		}
72b17c
72b17c
		public override void remove() {
72b17c
			base.remove();
726e8a
			document.modifiers.Remove(this);
72b17c
		}
72b17c
72b17c
		public override void bringToFront() {
726e8a
			document.modifiers.Remove(this);
726e8a
			document.modifiers.Add(this);
72b17c
		}
72b17c
b82ef4
		public virtual void draw(Cairo.Context context) { }
72b17c
72b17c
		public virtual void getTransformFuncs(List<geometry.transformfunc> transformFuncs) { }</geometry.transformfunc>
72b17c
		
72b17c
		public List<track> modify(List<track> tracks) {
72b17c
			List<track> outTracks = new List<track>();
72b17c
			List<geometry.transformfunc> transformFuncs = new List<geometry.transformfunc>();</geometry.transformfunc></geometry.transformfunc>
72b17c
			getTransformFuncs(transformFuncs);
72b17c
			foreach(Track track in tracks)
72b17c
				foreach(Geometry.TransformFunc transformFunc in transformFuncs)
72b17c
					outTracks.Add(track.createChild(transformFunc));
72b17c
			return outTracks;
72b17c
		}
72b17c
	}
72b17c
}