public static void DrawLine(int x1, int y1, int x2, int y2, Color color, ref Bitmap bm, DEFINE.EChooseLine chooseLine) { if (chooseLine == DEFINE.EChooseLine.DDA) { DDA(x1, y1, x2, y2, color, ref bm); } else if (chooseLine == DEFINE.EChooseLine.Bresenham) { Bresenham(x1, y1, x2, y2, color, ref bm); } else if (chooseLine == DEFINE.EChooseLine.Midpoint) { Midpoint(x1, y1, x2, y2, color, ref bm); } else if (chooseLine == DEFINE.EChooseLine.Bold) { Bold(x1, y1, x2, y2, color, ref bm); } else if (chooseLine == DEFINE.EChooseLine.Dash) { Dash(x1, y1, x2, y2, color, ref bm); } else if (chooseLine == DEFINE.EChooseLine.Shaded) { Shaded(x1, y1, x2, y2, color, ref bm); } }
private void rbShaded_CheckedChanged(object sender, EventArgs e) { flagChoose = DEFINE.EChooseLine.Shaded; }
private void rbMidpoint_CheckedChanged(object sender, EventArgs e) { flagChoose = DEFINE.EChooseLine.Midpoint; }
private void rbDash_CheckedChanged(object sender, EventArgs e) { flagChoose = DEFINE.EChooseLine.Dash; }
private void rbBresenham_CheckedChanged(object sender, EventArgs e) { flagChoose = DEFINE.EChooseLine.Bresenham; }