private void UpdateMarkers() { double x1 = Line.Start.X; double y1 = Line.Start.Y; double x2 = Line.End.X; double y2 = Line.End.Y; if (Style.Stroke.StartArrow.ArrowType != ArrowType.None) { double a1 = Math.Atan2(y1 - y2, x1 - x2); StartMarker = CreateArrowMarker(x1, y1, a1, Style, Style.Stroke.StartArrow); StartMarker.UpdateStyle(); P0 = (StartMarker as MarkerBase).Point; } else { StartMarker = null; P0 = new SKPoint((float)x1, (float)y1); } if (Style.Stroke.EndArrow.ArrowType != ArrowType.None) { double a2 = Math.Atan2(y2 - y1, x2 - x1); EndMarker = CreateArrowMarker(x2, y2, a2, Style, Style.Stroke.EndArrow); EndMarker.UpdateStyle(); P1 = (EndMarker as MarkerBase).Point; } else { EndMarker = null; P1 = new SKPoint((float)x2, (float)y2); } }