Merge pull request #10271 from RoosterDragon/point-sequencing

Support sending sequences of points when drawing lines
This commit is contained in:
Paul Chote
2015-12-28 19:36:49 +00:00
3 changed files with 23 additions and 11 deletions

View File

@@ -127,7 +127,7 @@ namespace OpenRA.Mods.Common.Widgets
lastX = x;
lastPoint = point;
return origin + new float2(x * xStep, -point * scale);
}).ToArray(), 1, color);
}), 1, color);
if (lastPoint != 0f)
tiny.DrawText(GetValueFormat().F(lastPoint), origin + new float2(lastX * xStep, -lastPoint * scale - 2), color);

View File

@@ -37,7 +37,7 @@ namespace OpenRA.Mods.Common.Widgets
foreach (var item in PerfHistory.Items.Values)
{
cr.DrawLine(item.Samples()
.Select((sample, i) => origin + new float2(i, (float)sample) * basis).ToArray(),
.Select((sample, i) => origin + new float2(i, (float)sample) * basis),
1, item.C);
var u = new float2(rect.Left, rect.Top);