private void DrawTies(ScoreRendererBase renderer, Note element, double notePositionY) { if (element.TieType == NoteTieType.Start) { measurementService.TieStartPoint = new Point(scoreService.CursorPositionX, notePositionY); } else if (element.TieType != NoteTieType.None) //Stop or StopAndStartAnother / Stop lub StopAndStartAnother { double arcWidth = scoreService.CursorPositionX - measurementService.TieStartPoint.X - 12; double arcHeight = arcWidth * 0.7d; if (element.StemDirection == VerticalDirection.Down) { renderer.DrawArc(new Rectangle(measurementService.TieStartPoint.X + 16, measurementService.TieStartPoint.Y + 22, arcWidth, arcHeight), 180, 180, new Pen(renderer.CoalesceColor(element), 1.5), element); } else if (element.StemDirection == VerticalDirection.Up) { renderer.DrawArc(new Rectangle(measurementService.TieStartPoint.X + 16, measurementService.TieStartPoint.Y + 22, arcWidth, arcHeight), 0, 180, new Pen(renderer.CoalesceColor(element), 1.5), element); } if (element.TieType == NoteTieType.StopAndStartAnother) { measurementService.TieStartPoint = new Point(scoreService.CursorPositionX + 2, notePositionY); } } }