Merge pull request #10271 from RoosterDragon/point-sequencing
Support sending sequences of points when drawing lines
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user