예제 #1
0
파일: StageVm.cs 프로젝트: tp-nscan/archean
 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
            ));
 }
예제 #2
0
 public void TestLogBrushOfInt()
 {
     var res = BrushFactory.LogBrushOfInt(1, 4096, BrushFactory.GrayThenBlueToRedBrushes());
 }