public static void DrawMMGrid(GraphicsInterface G, float PW, float width, float height, float minorGrid, float majorGrid) { if (minorGrid < 0) { return; } Pen P = new Pen(System.Drawing.ColorTranslator.FromHtml("#c4e5ff"), PW * 0.5f); for (float X = 0; X <= width; X += minorGrid) { G.DrawLine(P, X, 0, X, height); } for (float X = 0; X <= height; X += minorGrid) { G.DrawLine(P, 0.0f, X, width, X); } P = new Pen(System.Drawing.ColorTranslator.FromHtml("#bad7ed"), PW); for (float X = 0; X <= width; X += majorGrid) { G.DrawLine(P, X, 0, X, height); } for (float X = 0; X <= height; X += majorGrid) { G.DrawLine(P, 0.0f, X, width, X); } }
public void Render(GraphicsInterface G, Color FG, Color BG) { G.Clear(BG); Pen P = new Pen(FG, 1); foreach (var a in Lines) { G.DrawLine(P, a.Item1, a.Item2); } }