コード例 #1
0
            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;
            }
コード例 #2
0
        public void TransferFrom(IPlotGroupStyle fromb)
        {
            SymbolShapeStyleGroupStyle from = (SymbolShapeStyleGroupStyle)fromb;

            this._isInitialized = from._isInitialized;
            this._shapeAndStyle = new ShapeAndStyle(from._shapeAndStyle.Shape, from._shapeAndStyle.Style);
        }
コード例 #3
0
 public SymbolShapeStyleGroupStyle(SymbolShapeStyleGroupStyle from)
 {
     this._isInitialized = from._isInitialized;
     this._shapeAndStyle = new ShapeAndStyle(from._shapeAndStyle.Shape, from._shapeAndStyle.Style);
 }
コード例 #4
0
 public void Initialize(ShapeAndStyle s)
 {
     _isInitialized       = true;
     _shapeAndStyle.Shape = s.Shape;
     _shapeAndStyle.Style = s.Style;
 }
コード例 #5
0
      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;
      }
コード例 #6
0
 public void SetToNextStyle(ShapeAndStyle template, int steps)
 {
   int wraps;
   SetToNextStyle(template, steps, out  wraps);
 }
コード例 #7
0
 public void SetToNextStyle(ShapeAndStyle template)
 {
   SetToNextStyle(template, 1);
 }
コード例 #8
0
            public void SetToNextStyle(ShapeAndStyle template, int steps)
            {
                int wraps;

                SetToNextStyle(template, steps, out wraps);
            }
コード例 #9
0
 public void SetToNextStyle(ShapeAndStyle template)
 {
     SetToNextStyle(template, 1);
 }