Began DrawCircle function

This commit is contained in:
NuHash 2017-05-20 23:02:38 +01:00
parent dda88d4e1f
commit cbb2f4440a

View file

@ -84,6 +84,8 @@ namespace Cosmos.System.Graphics
}
}
public abstract void DrawPoint(Pen pen, int x, int y);
public abstract void DrawPoint(Pen pen, float x, float y);
@ -190,6 +192,23 @@ namespace Cosmos.System.Graphics
throw new NotImplementedException();
}
public void DrawCircle(Pen pen, int x_center, int y_center, int radius)
{
if (pen == null)
throw new ArgumentNullException(nameof(pen));
int r2 = radius * radius;
for (int i = 0; i <= radius; i++)
{
int xLocal = i;
int xLocal2 = i * i;
int yLocal2 = r2 - xLocal2;
int yLocal = Math.Sqrt(yLocal2);
}
}
public void DrawRectangle(Pen pen, int x, int y, int width, int height)
{
/*