Esempio n. 1
0
        public void DrawColorDisCurve(int cNo, WriteableBitmap b, string ChartType)//绘制单个色差
        {
            this.ChartType = ChartType;
            List <List <Color> > al = new List <List <Color> >();

            if (ChartType == "XMark")
            {
                XMarkChart xm = new XMarkChart(b);
                al  = xm.getCurveColorDis();
                cNo = cNo - 7;
            }
            if (ChartType == "XRite")
            {
                XRiteColorChart x = new XRiteColorChart(b);
                al  = x.getCurveColorDis();
                cNo = cNo - 1;
            }
            DrawGraphic dg = new DrawGraphic(DrawCanvas);

            dg.DrawColorCy(0.9f);

            List <Color> tal = al[cNo];
            Color        c0  = (Color)tal[0];
            Color        c1  = (Color)tal[1];

            //picS.BackColor = c0;
            //picV.BackColor = c1;
            dg.DrawColorMoveHue(c0, c1, 0.9f);
        }
Esempio n. 2
0
        Color cc = Colors.Transparent; //当前颜色
        void li_MouseLeftButtonDown(object sender, PointerRoutedEventArgs e)
        {
            Image im = sender as Image;

            currentImage = im;
            Color?tl = im.Tag as Color?;

            if (tl != null)
            {
                sc = tl.Value;
            }
            ShowSourceInfor(sc);

            WriteableBitmap tb = im.Source as WriteableBitmap;

            if (tb == null)
            {
                return;
            }
            lChartPhoto.Source = (tb);
            cc = pt.getAverageColor(tb);
            ShowTrueColorInfor(cc);

            ShowTrueColorDiffrent(cc, sc);

            DrawGraphic dg = new DrawGraphic(CC);

            CC.Children.Clear();
            dg.DrawColorCy(0.9f);
            dg.DrawColorMoveHue(sc, cc, 0.9f);
        }
Esempio n. 3
0
        public void DrawColorDisCurve(WriteableBitmap b, string ChartType)//绘制描述色差的图形
        {
            this.ChartType = ChartType;
            List <List <Color> > al = new List <List <Color> >();

            if (ChartType == "XMark")
            {
                XMarkChart xm = new XMarkChart(b);
                al = xm.getCurveColorDis();
            }
            if (ChartType == "XRite")
            {
                XRiteColorChart x = new XRiteColorChart(b);
                al = x.getCurveColorDis();
            }
            DrawGraphic dg = new DrawGraphic(DrawCanvas);

            dg.DrawColorCy(0.9f);
            for (int i = 7; i < 19; i++)
            {
                List <Color> tal = al[i - 7];
                Color        c0  = (Color)tal[0];
                Color        c1  = (Color)tal[1];
                //picS.BackColor = c0;
                //picV.BackColor = c1;
                dg.DrawColorMoveHue(c0, c1, 0.9f);
            }
        }
Esempio n. 4
0
 void RefreshShow()
 {
     currentImage = null;
     CC.Children.Clear();
     dg.DrawColorCy(0.9f);
     stackBitmapList.Children.Clear();
     for (int i = 1; i <= pl.Count; i++)
     {
         WriteableBitmap bi = pl[i - 1];
         Image           li = new Image();
         li.Width  = stackBitmapList.Width / pl.Count;
         li.Height = stackBitmapList.Height;
         double w = li.Height * bi.PixelWidth / bi.PixelHeight;
         if (li.Width > w)
         {
             li.Width = w;
         }
         li.Source = bi;
         li.Tag    = sl[i - 1];//附属的是原始的理论颜色
         stackBitmapList.Children.Add(li);
         li.PointerPressed += (li_MouseLeftButtonDown);
         dg.DrawColorMoveHue(sl[i - 1], pt.getAverageColor(bi), 0.9f);
     }
 }