internal void Draw(WriteableBitmap wb, Color c) { if (P1 == null) { P1 = P2; } else if (P2.X < P1.X) { P2 = P1; } wb.DrawLineAa(P1.X, P1.Y, P2.X, P2.Y, c); }
private static EcgSample NormalizeSample(EcgSample sample) { // cyclic value sample.X = sample.X % _msLimit; sample.X = NormalizeXToBounds(sample.X); sample.Y = NormalizeYToBounds(sample.Y); // reverse value from normale coordinate system to wpf coordinate system. ( at avarage i get around 550 - (-150) Y - values) //sample.Y = height - sample.Y; return sample; }
internal static Delta Create(EcgSample P1, EcgSample P2) { return new Delta { P1 = P1, P2 = P2 }; }
private void Print(EcgSample s) { Debug.WriteLine("X : {0} , Y : {1} , TS : {2}", s.X, s.Y, s.TimeStamp); }