mirror of
https://github.com/osukey/osukey.git
synced 2025-05-05 21:57:24 +09:00
Account for path width correctly in LineGraph
This commit is contained in:
parent
00cdb3a44a
commit
d97c070ef1
@ -102,9 +102,9 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
|
|
||||||
for (int i = 0; i < values.Length; i++)
|
for (int i = 0; i < values.Length; i++)
|
||||||
{
|
{
|
||||||
float x = (i + count - values.Length) / (float)(count - 1) * DrawWidth - 1;
|
// Make sure that we are accounting for path width when calculating vertex positions
|
||||||
float y = GetYPosition(values[i]) * DrawHeight - 1;
|
float x = (i + count - values.Length) / (float)(count - 1) * (DrawWidth - path.PathWidth);
|
||||||
// the -1 is for inner offset in path (actually -PathWidth)
|
float y = GetYPosition(values[i]) * (DrawHeight - path.PathWidth);
|
||||||
path.AddVertex(new Vector2(x, y));
|
path.AddVertex(new Vector2(x, y));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user