public static void AddShift(List <ScreenPoint> marker, EarType earType) { AGPoint shift = GetShift(earType); for (int i = 0; i < marker.Count; i++) { marker[i] = new ScreenPoint(marker[i].X + shift.X, marker[i].Y + shift.Y); } }
private static AGPoint GetShift(EarType earType) { const double shiftX = 0.2; const double shiftY = 0.1; AGPoint shift = new AGPoint(); if (earType == EarType.RightEar) { shift.X = -shiftX; shift.Y = shiftY; } else if (earType == EarType.LeftEar) { shift.X = shiftX; shift.Y = -shiftY; } else { throw new InvalidEnumArgumentException(); } return(shift); }