public void SetToNextStyle(ShapeAndStyle template, int step, out int wraps) { this.Shape = template.Shape; this.Style = template.Style; if (template.Shape == Shape.NoSymbol) { wraps = 0; return; } // first increase the shape value, // if this is not possible set shape to first shape, and increase the // style value // note that the first member of the shape enum is NoSymbol, which should not be // used here int nshapes = System.Enum.GetValues(typeof(XYPlotScatterStyles.Shape)).Length - 1; int nstyles = System.Enum.GetValues(typeof(XYPlotScatterStyles.Style)).Length; int current = ((int)template.Style) * nshapes + ((int)template.Shape) - 1; int next = Calc.BasicFunctions.PMod(current + step, nshapes * nstyles); wraps = Calc.BasicFunctions.NumberOfWraps(nshapes * nstyles, current, step); int nstyle = Calc.BasicFunctions.PMod(next / nshapes, nstyles); int nshape = Calc.BasicFunctions.PMod(next, nshapes); Shape = (XYPlotScatterStyles.Shape)(nshape + 1); Style = (XYPlotScatterStyles.Style)nstyle; }
public void TransferFrom(IPlotGroupStyle fromb) { SymbolShapeStyleGroupStyle from = (SymbolShapeStyleGroupStyle)fromb; this._isInitialized = from._isInitialized; this._shapeAndStyle = new ShapeAndStyle(from._shapeAndStyle.Shape, from._shapeAndStyle.Style); }
public SymbolShapeStyleGroupStyle(SymbolShapeStyleGroupStyle from) { this._isInitialized = from._isInitialized; this._shapeAndStyle = new ShapeAndStyle(from._shapeAndStyle.Shape, from._shapeAndStyle.Style); }
public void Initialize(ShapeAndStyle s) { _isInitialized = true; _shapeAndStyle.Shape = s.Shape; _shapeAndStyle.Style = s.Style; }
public void SetToNextStyle(ShapeAndStyle template, int steps) { int wraps; SetToNextStyle(template, steps, out wraps); }
public void SetToNextStyle(ShapeAndStyle template) { SetToNextStyle(template, 1); }