private void currentBright_MouseMove(object sender, PointerRoutedEventArgs e) { LynxPhotoViewControl im = sender as LynxPhotoViewControl; WriteableBitmap b = im.getPhoto(); if (b != null) { Point?p = xt.PointToPix(b, im, e.GetCurrentPoint(im.getImage()).Position, false); if (p == null) { return; } DCTestLibrary.PhotoTest pt = new DCTestLibrary.PhotoTest(); Color c = pt.GetPixel(b, Convert.ToInt32(p.Value.X), Convert.ToInt32(p.Value.Y)); float ph, ps, pb; pt.RGB2HSB(Convert.ToInt32(c.R), Convert.ToInt32(c.G), Convert.ToInt32(c.B), out ph, out ps, out pb); textBoxCurrentBright.Text = pb.ToString(); } }
public void Init(AbstractTestChart Chart, LynxPhotoViewControl tlc) { lc = tlc; o = Chart; }