public Circle[] ToDataPointMarks() { int n = DataPoints.Length ; double markSize = 0.05; List<Circle> pointMarks = new List<Circle>(); foreach (PointD p in DataPoints) { Circle aCircle = new Circle(p, markSize / 2) { Color = this.Color, LineWidth = 3}; pointMarks.Add(aCircle); } for (int i = 0; i < n+2; i++) { Circle aCircle = new Circle(ControlPoints[i], markSize / 2); aCircle.Color = System.Drawing.Color.Blue; pointMarks.Add(aCircle); } //foreach (PointD p in ControlPoints) //{ // Circle aCircle = new Circle(p, markSize / 2); // aCircle.Color = System.Drawing.Color.Blue; // pointMarks.Add(aCircle); //} return pointMarks.ToArray(); }
public DiametricDimension(Circle aCircle, double refDirection, PointD tTextReferpn, string tText, double tArrowSize) { double angle = DegToRad(refDirection); PointD V1 = (new PointD(Cos(angle), Sin(angle), 0)) * aCircle.Radius; Startpn = aCircle.Center - V1; Endpn = aCircle.Center + V1; TextReferP = tTextReferpn.Clone() as PointD; LeaderLength = Norm((this.TextReferP - (this.Startpn + this.Endpn) / 2.0)) - Value / 2.0; if (LeaderLength < 0) LeaderLength = 0; ArrowSize = tArrowSize; this.Text = tText; }
public override object Clone() { Circle aCircle = new Circle(); if (this.Name != null) aCircle.Name = this.Name; aCircle.Color = this._color; aCircle.LineType = this.LineType; aCircle.LineWidth = this.LineWidth; aCircle.Center = this.Center.Clone() as PointD; aCircle.Radius = this.Radius; return aCircle; }
public RadialDimension(Circle aCircle, double refDirection, PointD tTextReferpn, double tArrowSize) { double angle = DegToRad(refDirection); PointD V1 = (new PointD(Cos(angle), Sin(angle), 0)) * aCircle.Radius; Startpn = aCircle.Center.Clone() as PointD; Endpn = aCircle.Center + V1; TextReferP = tTextReferpn.Clone() as PointD; LeaderLength = Norm((this.Startpn - this.TextReferP)) - Value; if (LeaderLength < 0) LeaderLength = 0; ArrowSize = tArrowSize; }