public void SetDefaultOverlapRemovalAlgorithm(OverlapRemovalAlgorithmTypeEnum algorithm) { this.DefaultOverlapRemovalAlgorithm = algorithm; if (this.DefaultOverlapRemovalAlgorithm == OverlapRemovalAlgorithmTypeEnum.FSA || this.DefaultOverlapRemovalAlgorithm == OverlapRemovalAlgorithmTypeEnum.OneWayFSA) { this.DefaultOverlapRemovalAlgorithmParams.HorizontalGap = 30; this.DefaultOverlapRemovalAlgorithmParams.VerticalGap = 30; } this.NotifyParent(); }
/// <summary> /// Create overlap removal algorithm parameters /// </summary> /// <param name="algorithmType">Overlap removal algorithm type</param> public IOverlapRemovalParameters CreateOverlapRemovalParameters(OverlapRemovalAlgorithmTypeEnum algorithmType) { switch (algorithmType) { case OverlapRemovalAlgorithmTypeEnum.FSA: return(new OverlapRemovalParameters()); case OverlapRemovalAlgorithmTypeEnum.OneWayFSA: return(new OneWayFSAParameters()); default: return(null); } }
public IOverlapRemovalAlgorithm <TVertex> CreateOverlapRemovalAlgorithm(OverlapRemovalAlgorithmTypeEnum newAlgorithmType, IDictionary <TVertex, Rect> Rectangles, IOverlapRemovalParameters parameters = null) { //if (Rectangles == null) return null; if (parameters == null) { parameters = CreateOverlapRemovalParameters(newAlgorithmType); } switch (newAlgorithmType) { case OverlapRemovalAlgorithmTypeEnum.FSA: return(new FSAAlgorithm <TVertex>(Rectangles, parameters)); case OverlapRemovalAlgorithmTypeEnum.OneWayFSA: return(new OneWayFSAAlgorithm <TVertex>(Rectangles, parameters as OneWayFSAParameters)); default: return(null); } }
/// <summary> /// Creates uninitialized overlap removal algorithm /// </summary> /// <param name="newAlgorithmType">Algorithm type</param> public IOverlapRemovalAlgorithm <TVertex> CreateOverlapRemovalAlgorithm(OverlapRemovalAlgorithmTypeEnum newAlgorithmType) { return(CreateOverlapRemovalAlgorithm(newAlgorithmType, null)); }