コード例 #1
0
 public Grid4DVm(P2 <int> strides, P2 <int> cursor, ColorLeg <T> colorLeg, string title = "")
 {
     X1Y1      = true;
     Strides   = strides;
     Cursor    = cursor;
     Values    = new List <LS2V <int, T> >();
     ColorLeg  = colorLeg;
     WbImageVm = new WbImageVm();
     Title     = title;
     LegendVm  = new LegendVm(
         minVal: "<" + colorLeg.minV,
         midVal: ColorSets.GetLegMidVal(colorLeg).ToString(),
         maxVal: ">" + colorLeg.maxV,
         minCol: colorLeg.minC,
         midColors: colorLeg.spanC,
         maxColor: colorLeg.maxC
         );
 }
コード例 #2
0
        public GraphLatticeVm(R <int> latticeBounds, string title = "Title", string titleX = "TitleX", string titleY = "TitleY")
        {
            _wbImageVm           = new WbImageVm();
            _imageSize           = new Sz2 <double>(1.0, 1.0);
            _wbImageVm.ImageData = Id.InitImageData();
            LatticeBounds        = latticeBounds;
            MinX = new IntRangeVm(min: LatticeBounds.MinX, max: LatticeBounds.MaxX, cur: LatticeBounds.MinX);
            MinX.OnCurValChanged.Subscribe(v => CurvalChanged());
            MaxX = new IntRangeVm(min: LatticeBounds.MinX, max: LatticeBounds.MaxX, cur: LatticeBounds.MaxX);
            MaxX.OnCurValChanged.Subscribe(v => CurvalChanged());
            MinY = new IntRangeVm(min: LatticeBounds.MinY, max: LatticeBounds.MaxY, cur: LatticeBounds.MinY);
            MinY.OnCurValChanged.Subscribe(v => CurvalChanged());
            MaxY = new IntRangeVm(min: LatticeBounds.MinY, max: LatticeBounds.MaxY, cur: LatticeBounds.MaxY);
            MaxY.OnCurValChanged.Subscribe(v => CurvalChanged());

            Title  = title;
            TitleX = titleX;
            TitleY = titleY;
        }
コード例 #3
0
ファイル: LegendVm.cs プロジェクト: tp-nscan/Mite
        public LegendVm(string minVal, string midVal, string maxVal,
                        Color minCol, Color[] midColors, Color maxColor)
        {
            WbImageVm  = new WbImageVm();
            _minVal    = minVal;
            _midVal    = midVal;
            _maxVal    = maxVal;
            _minCol    = minCol;
            _midColors = midColors;
            _maxColor  = maxColor;

            WbImageVm.ImageData = Id.MakeImageData(
                plotPoints: Enumerable.Empty <P2V <float, Color> >(),
                filledRects: PlotRectangles,
                openRects: Enumerable.Empty <RV <float, Color> >(),
                plotLines: Enumerable.Empty <LS2V <float, Color> >()
                );
            var c  = Color.FromRgb((byte)0, (byte)255, (byte)255);
            var c2 = Colors.MediumSeaGreen;
        }