Bigger spawn points, numbers within.

This commit is contained in:
matija-hustic
2014-05-03 18:38:30 +01:00
parent a0f6038ea6
commit ae149c420e
12 changed files with 515 additions and 29 deletions

View File

@@ -90,6 +90,19 @@ namespace OpenRA.Graphics
DrawLine(new float2(r.Left, y), new float2(r.Right, y), color, color);
}
public void FillEllipse(RectangleF r, Color color)
{
var a = (r.Right - r.Left) / 2;
var b = (r.Bottom - r.Top) / 2;
var xc = (r.Right + r.Left) / 2;
var yc = (r.Bottom + r.Top) / 2;
for (var y = r.Top; y <= r.Bottom; y++)
{
var dx = a * System.Convert.ToSingle(System.Math.Sqrt(1 - (y - yc) * (y - yc) / b / b));
DrawLine(new float2(xc - dx, y), new float2(xc + dx, y), color, color);
}
}
public void SetViewportParams(Size screen, float zoom, float2 scroll)
{
shader.SetVec("Scroll", (int)scroll.X, (int)scroll.Y);