public static IStageVm ToStageVm ( this ISorterStage <ISwitchEval> sorterStage, int useMax, double switchWidth, double lineThickness, Brush lineBrush, Brush backgroundBrush, IReadOnlyList <Brush> switchBrushes ) { return(new StageVmImpl ( keyCount: sorterStage.KeyCount, keyPairVms: sorterStage.ToStageLayouts() .Select( sl => new KeyPairVm ( keyPair: sl.Item2, switchBrush: BrushFactory.LogBrushOfInt ( value: (int)sl.Item2.UseCount, max: useMax, brushList: switchBrushes ), position: sl.Item1 ) ).ToList(), switchWidth: switchWidth, lineThickness: lineThickness, lineBrush: lineBrush, backgroundBrush: backgroundBrush )); }
public void TestLogBrushOfInt() { var res = BrushFactory.LogBrushOfInt(1, 4096, BrushFactory.GrayThenBlueToRedBrushes()); }