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); }
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); }
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); }
public CoordinatePoint(float x, float y, CoordinatePointStyle style) { X = x; Y = y; Style = style; }
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; }
public CoordinatePlane AddFunction(Func <float, float> func, CoordinateLineStyle style, CoordinatePointStyle pointsStyle) { entities.Add(new CoordinateFunction(func, style, pointsStyle)); return(this); }
public CoordinatePlane AddPoint(float x, float y, CoordinatePointStyle style) { entities.Add(new CoordinatePoint(x, y, style)); return(this); }
public CoordinatePlane AddLegendItem(CoordinatePointStyle style, string name) { Legend.AddItem(style, name); UpdatePlane(); return(this); }