public void Rectangle(double x11, double y11, double x12, double y12, double?lw1, AngularUnit u1, string color1, bool?fill1, double x21, double y21, double x22, double y22, double?lw2, AngularUnit u2, string color2, bool?fill2, bool equals) { var e1 = new ReticleRectangle() { TopLeft = new ReticlePosition(x11, y11, u1), Size = new ReticlePosition(x12, y12, u1), LineWidth = lw1 == null ? null : u1.New(lw1.Value), Color = color1, Fill = fill1 }; var e2 = new ReticleRectangle() { TopLeft = new ReticlePosition(x21, y21, u2), Size = new ReticlePosition(x22, y22, u2), LineWidth = lw2 == null ? null : u1.New(lw2.Value), Color = color2, Fill = fill2 }; e1.Equals(e2).Should().Be(equals); e2.Equals(e1).Should().Be(equals); }
public void Circle(double x1, double y1, double r1, double?lw1, AngularUnit u1, string color1, bool?fill1, double x2, double y2, double r2, double?lw2, AngularUnit u2, string color2, bool?fill2, bool equals) { var e1 = new ReticleCircle() { Center = new ReticlePosition(x1, y1, u1), Radius = u1.New(r1), LineWidth = lw1 == null ? null : u1.New(lw1.Value), Color = color1, Fill = fill1 }; var e2 = new ReticleCircle() { Center = new ReticlePosition(x2, y2, u2), Radius = u2.New(r2), LineWidth = lw2 == null ? null : u2.New(lw2.Value), Color = color2, Fill = fill2 }; e1.Equals(e2).Should().Be(equals); e2.Equals(e1).Should().Be(equals); }
public void Path(double x11, double y11, double x12, double y12, double?lw1, AngularUnit u1, string color1, bool?fill1, double x21, double y21, double x22, double y22, double?lw2, AngularUnit u2, string color2, bool?fill2, bool equals) { var e1 = new ReticlePath() { LineWidth = lw1 == null ? null : u1.New(lw1.Value), Color = color1, Fill = fill1 }; e1.Elements.Add(new ReticlePathElementMoveTo() { Position = new ReticlePosition(x11, y11, u1) }); e1.Elements.Add(new ReticlePathElementLineTo() { Position = new ReticlePosition(x12, y12, u1) }); var e2 = new ReticlePath() { LineWidth = lw2 == null ? null : u1.New(lw2.Value), Color = color2, Fill = fill2 }; e2.Elements.Add(new ReticlePathElementMoveTo() { Position = new ReticlePosition(x21, y21, u2) }); e2.Elements.Add(new ReticlePathElementLineTo() { Position = new ReticlePosition(x22, y22, u2) }); e1.Equals(e2).Should().Be(equals); e2.Equals(e1).Should().Be(equals); }
public void Line(double x11, double y11, double x12, double y12, double?lw1, AngularUnit u1, string color1, double x21, double y21, double x22, double y22, double?lw2, AngularUnit u2, string color2, bool equals) { var e1 = new ReticleLine() { Start = new ReticlePosition(x11, y11, u1), End = new ReticlePosition(x12, y12, u1), LineWidth = lw1 == null ? null : u1.New(lw1.Value), Color = color1, }; var e2 = new ReticleLine() { Start = new ReticlePosition(x21, y21, u2), End = new ReticlePosition(x22, y22, u2), LineWidth = lw2 == null ? null : u1.New(lw2.Value), Color = color2, }; e1.Equals(e2).Should().Be(equals); e2.Equals(e1).Should().Be(equals); }
public void Text(double x1, double y1, double h1, AngularUnit u1, string color1, string text1, double x2, double y2, double h2, AngularUnit u2, string color2, string text2, bool equals) { var e1 = new ReticleText() { Position = new ReticlePosition(x1, y1, u1), TextHeight = u1.New(h1), Color = color1, Text = text1, }; var e2 = new ReticleText() { Position = new ReticlePosition(x2, y2, u2), TextHeight = u2.New(h2), Color = color2, Text = text2, }; e1.Equals(e2).Should().Be(equals); e2.Equals(e1).Should().Be(equals); }
/// <summary> /// Constructor for the coordinates specified as numbers /// </summary> /// <param name="x">The x-coordinate</param> /// <param name="y">The y-coordinate</param> /// <param name="unit">The unit. </param> public ReticlePosition(double x, double y, AngularUnit unit) { X = unit.New(x); Y = unit.New(y); }