Ejemplo n.º 1
0
 public void WhiteOutSpecial()
 {
     CourseObj courseobj = new WhiteOutCourseObj(SpecialId(0), 1, specialAppearance, new PointF[5] { new PointF(-3.0F, -2.0F), new PointF(-2.5F, 1.5F), new PointF(2.5F, 1.0F), new PointF(3.0F, -2.0F), new PointF(-3.0F, -2.0F) });
     CheckRenderBitmap(courseobj, "whiteout_special", Color.YellowGreen);
     CheckRenderBitmapSmall(courseobj, "whiteout_special_small", Color.YellowGreen);
 }
Ejemplo n.º 2
0
 public void WhiteOutOffset()
 {
     CourseObj courseobj = new WhiteOutCourseObj(SpecialId(0), 1, defaultCourseAppearance, new PointF[5] { new PointF(-3.0F, -2.0F), new PointF(-2.5F, 1.5F), new PointF(2.5F, 1.0F), new PointF(3.0F, -2.0F), new PointF(-3.0F, -2.0F) });
     SingleObjectOffset(courseobj, "whiteout_offset");
 }
Ejemplo n.º 3
0
 public void WhiteOutDump()
 {
     CourseObj courseobj = new WhiteOutCourseObj(SpecialId(0), 0.5F, defaultCourseAppearance, new PointF[] { new PointF(3, 3), new PointF(1, 1), new PointF(4, 1), new PointF(3, 3) });
     AssertDump(courseobj, @"WhiteOut:       scale:0.5  path:N(3,3)--N(1,1)--N(4,1)--N(3,3)");
 }
Ejemplo n.º 4
0
 public void WhiteOutHighlightSpecial()
 {
     CourseObj courseobj = new WhiteOutCourseObj(SpecialId(0), 1, specialAppearance, new PointF[5] { new PointF(-3.0F, -2.0F), new PointF(-2.5F, 1.5F), new PointF(2.5F, 1.0F), new PointF(3.0F, -2.0F), new PointF(-3.0F, -2.0F) });
     SingleObjectHighlight(courseobj, "whiteout_highlight_special");
 }
Ejemplo n.º 5
0
 public void WhiteoutDistance()
 {
     CourseObj courseobj = new WhiteOutCourseObj(SpecialId(0), 0.5F, defaultCourseAppearance, new PointF[] { new PointF(3, 3), new PointF(1, 1), new PointF(4, 1), new PointF(3, 3) });
     Assert.AreEqual(Math.Round(1.414213, 3), Math.Round(courseobj.DistanceFromPoint(new PointF(1, 3)), 3));
     Assert.AreEqual(0.0, courseobj.DistanceFromPoint(new PointF(3.7F, 1.1F)));
     Assert.AreEqual(0.0, courseobj.DistanceFromPoint(new PointF(2F, 1.5F)));
     Assert.AreEqual(1.0, Math.Round(courseobj.DistanceFromPoint(new PointF(5, 1)), 3));
 }