mirror of https://github.com/ppy/osu
Apply twice the line radius in order to properly account for diameter
This commit is contained in:
parent
d97c070ef1
commit
b2f4850275
|
@ -103,8 +103,9 @@ private void applyPath()
|
||||||
for (int i = 0; i < values.Length; i++)
|
for (int i = 0; i < values.Length; i++)
|
||||||
{
|
{
|
||||||
// Make sure that we are accounting for path width when calculating vertex positions
|
// 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);
|
// We need to apply 2x the path radius to account for it because the full diameter of the line accounts into height
|
||||||
float y = GetYPosition(values[i]) * (DrawHeight - path.PathWidth);
|
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));
|
path.AddVertex(new Vector2(x, y));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue