Esempio n. 1
0
 public CoordinatePoint SetStyle(CoordinatePointStyle style)
 {
     if (style != null)
     {
         Style = style;
     }
     return(this);
 }
        public void AddItem(CoordinatePointStyle style, string name)
        {
            if (items.Exists(item =>
                             item.GetType() == typeof(CoordinatePlaneLegendPoint) &&
                             style == ((CoordinatePlaneLegendPoint)item).PointStyle))
            {
                return;
            }

            items.Add(new CoordinatePlaneLegendPoint(name, style, Style));
        }
 public CoordinateFunction(Func <float, float> func, float minX, float maxX, float minY, float maxY, CoordinateLineStyle style, CoordinatePointStyle pointsStyle)
 {
     Function    = func;
     Style       = style;
     PointsStyle = pointsStyle;
     this.minX   = minX;
     this.maxX   = maxX;
     this.minY   = minY;
     this.maxY   = maxY;
     Lines       = CalculateLines(func, minX, maxX, minY, maxY);
 }
Esempio n. 4
0
        public CoordinatePlane AddPoints(PointF[] points, CoordinatePointStyle style)
        {
            var ps = points.Select(p => new CoordinatePoint(p.X, p.Y, style));

            if (locked)
            {
                foreach (var point in ps)
                {
                    entities.Add(point);
                }
            }
            else
            {
                LockUpdate();
                foreach (var point in ps)
                {
                    entities.Add(point);
                }
                UnlockUpdate();
            }
            return(this);
        }
Esempio n. 5
0
        public CoordinatePlane AddPoints(float[] xs, float[] ys, CoordinatePointStyle style)
        {
            var points = xs.Select((x, i) => new CoordinatePoint(x, ys[i], style));

            if (locked)
            {
                foreach (var point in points)
                {
                    entities.Add(point);
                }
            }
            else
            {
                LockUpdate();
                foreach (var point in points)
                {
                    entities.Add(point);
                }
                UnlockUpdate();
            }
            return(this);
        }
Esempio n. 6
0
 public CoordinatePoint(float x, float y, CoordinatePointStyle style)
 {
     X     = x;
     Y     = y;
     Style = style;
 }
Esempio n. 7
0
 public CoordinatePoint(float x, float y)
 {
     X     = x;
     Y     = y;
     Style = new CoordinatePointStyle();
 }
 public CoordinatePlaneLegendPoint(string name, CoordinatePointStyle pointStyle, CoordinatePlaneLegendStyle legendStyle)
 {
     this.name  = name;
     PointStyle = pointStyle;
     Style      = legendStyle;
 }
 public CoordinateFunction(Func <float, float> func, CoordinateLineStyle style, CoordinatePointStyle pointsStyle)
 {
     Function    = func;
     Style       = style;
     PointsStyle = pointsStyle;
 }
Esempio n. 10
0
 public CoordinatePlane AddFunction(Func <float, float> func, CoordinateLineStyle style, CoordinatePointStyle pointsStyle)
 {
     entities.Add(new CoordinateFunction(func, style, pointsStyle));
     return(this);
 }
Esempio n. 11
0
 public CoordinatePlane AddPoint(float x, float y, CoordinatePointStyle style)
 {
     entities.Add(new CoordinatePoint(x, y, style));
     return(this);
 }
Esempio n. 12
0
 public CoordinatePlane AddLegendItem(CoordinatePointStyle style, string name)
 {
     Legend.AddItem(style, name);
     UpdatePlane();
     return(this);
 }