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);
     }
 }
Example #2
0
 private void rbShaded_CheckedChanged(object sender, EventArgs e)
 {
     flagChoose = DEFINE.EChooseLine.Shaded;
 }
Example #3
0
 private void rbMidpoint_CheckedChanged(object sender, EventArgs e)
 {
     flagChoose = DEFINE.EChooseLine.Midpoint;
 }
Example #4
0
 private void rbDash_CheckedChanged(object sender, EventArgs e)
 {
     flagChoose = DEFINE.EChooseLine.Dash;
 }
Example #5
0
 private void rbBresenham_CheckedChanged(object sender, EventArgs e)
 {
     flagChoose = DEFINE.EChooseLine.Bresenham;
 }