From b2f4850275978a1a1867b4e0b54a0326ec6154c7 Mon Sep 17 00:00:00 2001 From: David Zhao Date: Thu, 7 Mar 2019 17:25:51 +0900 Subject: [PATCH] Apply twice the line radius in order to properly account for diameter --- osu.Game/Graphics/UserInterface/LineGraph.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/osu.Game/Graphics/UserInterface/LineGraph.cs b/osu.Game/Graphics/UserInterface/LineGraph.cs index b64c1f28dc..27cdccd556 100644 --- a/osu.Game/Graphics/UserInterface/LineGraph.cs +++ b/osu.Game/Graphics/UserInterface/LineGraph.cs @@ -103,8 +103,9 @@ private void applyPath() for (int i = 0; i < values.Length; i++) { // Make sure that we are accounting for path width when calculating vertex positions - float x = (i + count - values.Length) / (float)(count - 1) * (DrawWidth - path.PathWidth); - float y = GetYPosition(values[i]) * (DrawHeight - path.PathWidth); + // We need to apply 2x the path radius to account for it because the full diameter of the line accounts into height + float x = (i + count - values.Length) / (float)(count - 1) * (DrawWidth - 2 * path.PathWidth); + float y = GetYPosition(values[i]) * (DrawHeight - 2 * path.PathWidth); path.AddVertex(new Vector2(x, y)); } }