Beispiel #1
0
 public static void DrawFigure(TestCaseUI ui)
 {
     ui.Line(-50, -10, -50, 10, TestCase.neutralPen);
     ui.Line(50, -10, 50, 10, TestCase.neutralPen);
     ui.Line(-50, 10, 0, 60, TestCase.neutralPen);
     ui.Line(50, 10, 0, 60, TestCase.neutralPen);
     ui.Arc(0, -10, 50, 180, 180, TestCase.neutralPen);
 }
Beispiel #2
0
        protected override void InternalVisualize(TestCaseUI ui)
        {
            ui.Line(-100, 0, 100, 0, neutralThinPen);
            ui.Line(0, -100, 0, 100, neutralThinPen);

            FigureShape.DrawFigure(ui);

            ui.Line(50, -10, 50, 10, neutralPen);
            ui.Line(-50, 10, 0, 60, neutralPen);
            ui.Line(50, 10, 0, 60, neutralPen);
            ui.Arc(0, -10, 50, 180, 180, neutralPen);

            ui.Circle(x, y, 1, neutralPen);
            ui.Circle(x, y, answer, new Pen(actualAnswerPen.Color, 1) {DashStyle = DashStyle.Custom, DashPattern = new float[]{4, 4}});
            ui.Circle(x, y, distance, new Pen(expectedAnswerPen.Color, 1) {DashStyle = DashStyle.Custom, DashPattern = new float[]{4, 4}});
            ui.Log("Point: ({0}, {1})", x, y);
            ui.Log("Calculated distance: {0}", answer);
        }