/// <summary> /// отрисовать все три центра /// отрисовать радиусы для scan0 и scan1 /// </summary> /// <param name="preciseMapBmp"></param> /// <param name="graphics"></param> private void interfaceDrawing(Bitmap preciseMapBmp, Graphics graphics) { try { Pen pen; int X0 = currentRobotPosX; int Y0 = currentRobotPosY; int X1 = crosslinker.getXY1()[0]; int Y1 = crosslinker.getXY1()[1]; int X2 = crosslinker.getXY2()[0]; int Y2 = crosslinker.getXY2()[1]; if ((X0 >= 0) && (Y0 >= 0)) { preciseMapBmp.SetPixel(X0, Y0, Parameters.startColor); pen = new Pen(Parameters.startColor); graphics.DrawEllipse(pen, X0 - Parameters.getR_scan(), Y0 - Parameters.getR_scan(), Parameters.getD_scan(), Parameters.getD_scan()); graphics.DrawEllipse(pen, X0 - Parameters.getR_robot(), Y0 - Parameters.getR_robot(), Parameters.getD_robot(), Parameters.getD_robot()); } if ((X1 >= 0) && (Y1 >= 0)) { preciseMapBmp.SetPixel(X1, Y1, Parameters.finishColor); pen = new Pen(Parameters.finishColor); graphics.DrawEllipse(pen, X1 - Parameters.getR_scan(), Y1 - Parameters.getR_scan(), Parameters.getD_scan(), Parameters.getD_scan()); graphics.DrawEllipse(pen, X1 - Parameters.getR_robot(), Y1 - Parameters.getR_robot(), Parameters.getD_robot(), Parameters.getD_robot()); } if ((X2 >= 0) && (Y2 >= 0)) { preciseMapBmp.SetPixel(X2, Y2, Parameters.routeColor); } } catch (Exception ex) { } mainForm.drawBitmapOnPictureBox1(preciseMapBmp); }