Example #1
0
        public void Paint(Graphics g, IPlotArea layer, Processed2DPlotData pdata, Processed2DPlotData prevItemData, Processed2DPlotData nextItemData)
        {
            // adjust the skip frequency if it was not set appropriate
            if (_skipFrequency <= 0)
            {
                _skipFrequency = 1;
            }

            if (_independentOnShiftingGroupStyles)
            {
                _cachedLogicalShiftX = _cachedLogicalShiftY = 0;
            }

            PlotRangeList rangeList = pdata.RangeList;

            if (_ignoreMissingDataPoints)
            {
                // in case we ignore the missing points, all ranges can be plotted
                // as one range, i.e. continuously
                // for this, we create the totalRange, which contains all ranges
                var totalRange = new PlotRangeCompound(rangeList);
                PaintOneRange(g, layer, totalRange, pdata);
            }
            else // we not ignore missing points, so plot all ranges separately
            {
                for (int i = 0; i < rangeList.Count; i++)
                {
                    PaintOneRange(g, layer, rangeList[i], pdata);
                }
            }
        }
Example #2
0
        public void Paint(Graphics g, IPlotArea layer, Processed2DPlotData pdata, Processed2DPlotData prevItemData, Processed2DPlotData nextItemData)
        {
            if (_connectionStyle is LineConnectionStyles.NoConnection)
            {
                return;
            }

            PointF[] plotPositions = pdata.PlotPointsInAbsoluteLayerCoordinates;

            if (_independentOnShiftingGroupStyles)
            {
                _cachedLogicalShiftX = _cachedLogicalShiftY = 0;
            }

            if (0 != _cachedLogicalShiftX || 0 != _cachedLogicalShiftY)
            {
                plotPositions = Processed2DPlotData.GetPlotPointsInAbsoluteLayerCoordinatesWithShift(pdata, layer, _cachedLogicalShiftX, _cachedLogicalShiftY);
            }

            // ensure that brush and pen are cached
            if (null != _framePen)
            {
                _framePen.Cached = true;
            }

            if (null != _fillBrush)
            {
                _fillBrush.SetEnvironment(new RectangleD2D(PointD2D.Empty, layer.Size), BrushX.GetEffectiveMaximumResolution(g, 1));
            }

            _fillDirection = layer.UpdateCSPlaneID(_fillDirection);

            var gp = new GraphicsPath();

            PlotRangeList rangeList = pdata.RangeList;

            if (_ignoreMissingDataPoints)
            {
                // in case we ignore the missing points, all ranges can be plotted
                // as one range, i.e. continuously
                // for this, we create the totalRange, which contains all ranges
                IPlotRange totalRange = new PlotRangeCompound(rangeList);
                _connectionStyle.FillOneRange(gp, pdata, totalRange, layer, _fillDirection, _ignoreMissingDataPoints, _connectCircular, plotPositions, _cachedLogicalShiftX, _cachedLogicalShiftY);
            }
            else // we not ignore missing points, so plot all ranges separately
            {
                for (int i = 0; i < rangeList.Count; i++)
                {
                    _connectionStyle.FillOneRange(gp, pdata, rangeList[i], layer, _fillDirection, _ignoreMissingDataPoints, _connectCircular, plotPositions, _cachedLogicalShiftX, _cachedLogicalShiftY);
                }
            }

            g.FillPath(_fillBrush, gp);

            g.DrawPath(_framePen, gp);
        }
Example #3
0
        public void Paint(Graphics g, IPlotArea layer, Processed2DPlotData pdata, Processed2DPlotData prevItemData, Processed2DPlotData nextItemData)
        {
            // adjust the skip frequency if it was not set appropriate
            if (_skipFreq <= 0)
            {
                _skipFreq = 1;
            }

            if (_scatterSymbol is NoSymbol)
            {
                return;
            }

            var cachedPathData  = new CachedPathData();
            var cachedBrushData = new CachedBrushData();

            PlotRangeList rangeList = pdata.RangeList;

            PointF[] plotPositions = pdata.PlotPointsInAbsoluteLayerCoordinates;

            if (!_independentOnShiftingGroupStyles && (0 != _cachedLogicalShiftX || 0 != _cachedLogicalShiftY))
            {
                plotPositions = Processed2DPlotData.GetPlotPointsInAbsoluteLayerCoordinatesWithShift(pdata, layer, _cachedLogicalShiftX, _cachedLogicalShiftY);
            }

            // Calculate current scatterSymbol overridden with frame and inset
            var scatterSymbol = CalculateOverriddenScatterSymbol();

            if (_ignoreMissingDataPoints)
            {
                // in case we ignore the missing points, all ranges can be plotted
                // as one range, i.e. continuously
                // for this, we create the totalRange, which contains all ranges
                var totalRange = new PlotRangeCompound(rangeList);
                PaintOneRange(g, layer, plotPositions, totalRange, scatterSymbol, ref cachedPathData, ref cachedBrushData);
            }
            else // we not ignore missing points, so plot all ranges separately
            {
                for (int i = 0; i < rangeList.Count; i++)
                {
                    PaintOneRange(g, layer, plotPositions, rangeList[i], scatterSymbol, ref cachedPathData, ref cachedBrushData);
                }
            }

            cachedBrushData.Clear();
            cachedPathData.Clear();
        }
Example #4
0
		public void Paint(Graphics g, IPlotArea layer, Processed2DPlotData pdata, Processed2DPlotData prevItemData, Processed2DPlotData nextItemData)
		{
			if (this._connectionStyle is LineConnectionStyles.NoConnection)
				return;

			PointF[] plotPositions = pdata.PlotPointsInAbsoluteLayerCoordinates;

			if(_independentOnShiftingGroupStyles)
			{
				_cachedLogicalShiftX = _cachedLogicalShiftY = 0;
			}

			if (0 != _cachedLogicalShiftX || 0 != _cachedLogicalShiftY)
			{
				plotPositions = Processed2DPlotData.GetPlotPointsInAbsoluteLayerCoordinatesWithShift(pdata, layer, _cachedLogicalShiftX, _cachedLogicalShiftY);
			}

			// ensure that brush and pen are cached
			if (null != _framePen) _framePen.Cached = true;

			if (null != _fillBrush)
				_fillBrush.SetEnvironment(new RectangleD2D(PointD2D.Empty, layer.Size), BrushX.GetEffectiveMaximumResolution(g, 1));

			_fillDirection = layer.UpdateCSPlaneID(_fillDirection);

			var gp = new GraphicsPath();

			PlotRangeList rangeList = pdata.RangeList;
			if (this._ignoreMissingDataPoints)
			{
				// in case we ignore the missing points, all ranges can be plotted
				// as one range, i.e. continuously
				// for this, we create the totalRange, which contains all ranges
				IPlotRange totalRange = new PlotRangeCompound(rangeList);
				_connectionStyle.FillOneRange(gp, pdata, totalRange, layer, _fillDirection, _ignoreMissingDataPoints, _connectCircular, plotPositions, _cachedLogicalShiftX, _cachedLogicalShiftY);
			}
			else // we not ignore missing points, so plot all ranges separately
			{
				for (int i = 0; i < rangeList.Count; i++)
				{
					_connectionStyle.FillOneRange(gp, pdata, rangeList[i], layer, _fillDirection, _ignoreMissingDataPoints, _connectCircular, plotPositions, _cachedLogicalShiftX, _cachedLogicalShiftY);
				}
			}

			g.FillPath(_fillBrush, gp);

			g.DrawPath(_framePen, gp);
		}
Example #5
0
		public void Paint(Graphics g, IPlotArea layer, Processed2DPlotData pdata, Processed2DPlotData prevItemData, Processed2DPlotData nextItemData)
		{
			if (this._connectionStyle is LineConnectionStyles.NoConnection)
				return;

			if (_independentOnShiftingGroupStyles)
			{
				_cachedLogicalShiftX = _cachedLogicalShiftY = 0;
			}

			PointF[] plotPositions = pdata.PlotPointsInAbsoluteLayerCoordinates;

			if (0 != _cachedLogicalShiftX || 0 != _cachedLogicalShiftY)
			{
				plotPositions = Processed2DPlotData.GetPlotPointsInAbsoluteLayerCoordinatesWithShift(pdata, layer, _cachedLogicalShiftX, _cachedLogicalShiftY);
			}

			Func<int, double> symbolGapFunction = null;

			if (_useSymbolGap)
			{
				if (null != _cachedSymbolSizeForIndexFunction && !_independentSymbolSize)
				{
					symbolGapFunction = (idx) => _symbolGapOffset + _symbolGapFactor * _cachedSymbolSizeForIndexFunction(idx);
				}
				else if (0 != _symbolGapOffset || 0 != _symbolGapFactor * _symbolSize)
				{
					symbolGapFunction = (idx) => _symbolGapOffset + _symbolGapFactor * _symbolSize;
				}
				else
				{
					symbolGapFunction = null;
				}
			}

			// ensure that brush and pen are cached
			if (null != _linePen)
				_linePen.Cached = true;

			PlotRangeList rangeList = pdata.RangeList;
			if (this._ignoreMissingDataPoints)
			{
				// in case we ignore the missing points, all ranges can be plotted
				// as one range, i.e. continuously
				// for this, we create the totalRange, which contains all ranges
				var totalRange = new PlotRangeCompound(rangeList);
				_connectionStyle.PaintOneRange(g, plotPositions, totalRange, layer, _linePen, symbolGapFunction, _skipFrequency, _connectCircular, this);
			}
			else // we not ignore missing points, so plot all ranges separately
			{
				for (int i = 0; i < rangeList.Count; i++)
				{
					_connectionStyle.PaintOneRange(g, plotPositions, rangeList[i], layer, _linePen, symbolGapFunction, _skipFrequency, _connectCircular, this);
				}
			}
		}
Example #6
0
		public void Paint(Graphics g, IPlotArea layer, Processed2DPlotData pdata, Processed2DPlotData prevItemData, Processed2DPlotData nextItemData)
		{
			// adjust the skip frequency if it was not set appropriate
			if (_skipFrequency <= 0)
				_skipFrequency = 1;

			if (_independentOnShiftingGroupStyles)
			{
				_cachedLogicalShiftX = _cachedLogicalShiftY = 0;
			}


			PlotRangeList rangeList = pdata.RangeList;



			if (this._ignoreMissingDataPoints)
			{
				// in case we ignore the missing points, all ranges can be plotted
				// as one range, i.e. continuously
				// for this, we create the totalRange, which contains all ranges
				var totalRange = new PlotRangeCompound(rangeList);
				this.PaintOneRange(g, layer, totalRange, pdata);
			}
			else // we not ignore missing points, so plot all ranges separately
			{
				for (int i = 0; i < rangeList.Count; i++)
				{
					this.PaintOneRange(g, layer, rangeList[i], pdata);
				}
			}
		}
Example #7
0
		public void Paint(Graphics g, IPlotArea layer, Processed2DPlotData pdata, Processed2DPlotData prevItemData, Processed2DPlotData nextItemData)
		{
			// adjust the skip frequency if it was not set appropriate
			if (_skipFreq <= 0)
				_skipFreq = 1;

			if (this._scatterSymbol is NoSymbol)
				return;

			CachedPathData cachedPathData = new CachedPathData();
			CachedBrushData cachedBrushData = new CachedBrushData();

			PlotRangeList rangeList = pdata.RangeList;
			PointF[] plotPositions = pdata.PlotPointsInAbsoluteLayerCoordinates;

			if (!_independentOnShiftingGroupStyles && (0 != _cachedLogicalShiftX || 0 != _cachedLogicalShiftY))
			{
				plotPositions = Processed2DPlotData.GetPlotPointsInAbsoluteLayerCoordinatesWithShift(pdata, layer, _cachedLogicalShiftX, _cachedLogicalShiftY);
			}



			// Calculate current scatterSymbol overridden with frame and inset
			var scatterSymbol = CalculateOverriddenScatterSymbol();


			if (this._ignoreMissingDataPoints)
			{
				// in case we ignore the missing points, all ranges can be plotted
				// as one range, i.e. continuously
				// for this, we create the totalRange, which contains all ranges
				var totalRange = new PlotRangeCompound(rangeList);
				this.PaintOneRange(g, layer, plotPositions, totalRange, scatterSymbol, ref cachedPathData, ref cachedBrushData);
			}
			else // we not ignore missing points, so plot all ranges separately
			{
				for (int i = 0; i < rangeList.Count; i++)
				{
					this.PaintOneRange(g, layer, plotPositions, rangeList[i], scatterSymbol, ref cachedPathData, ref cachedBrushData);
				}
			}


			cachedBrushData.Clear();
			cachedPathData.Clear();
		}
Example #8
0
        public void Paint(Graphics g, IPlotArea layer, Processed2DPlotData pdata, Processed2DPlotData prevItemData, Processed2DPlotData nextItemData)
        {
            if (_connectionStyle is LineConnectionStyles.NoConnection)
            {
                return;
            }

            if (_independentOnShiftingGroupStyles)
            {
                _cachedLogicalShiftX = _cachedLogicalShiftY = 0;
            }

            PointF[] plotPositions = pdata.PlotPointsInAbsoluteLayerCoordinates;

            if (0 != _cachedLogicalShiftX || 0 != _cachedLogicalShiftY)
            {
                plotPositions = Processed2DPlotData.GetPlotPointsInAbsoluteLayerCoordinatesWithShift(pdata, layer, _cachedLogicalShiftX, _cachedLogicalShiftY);
            }

            Func <int, double> symbolGapFunction = null;

            if (_useSymbolGap)
            {
                if (null != _cachedSymbolSizeForIndexFunction && !_independentSymbolSize)
                {
                    symbolGapFunction = (idx) => _symbolGapOffset + _symbolGapFactor * _cachedSymbolSizeForIndexFunction(idx);
                }
                else if (0 != _symbolGapOffset || 0 != _symbolGapFactor * _symbolSize)
                {
                    symbolGapFunction = (idx) => _symbolGapOffset + _symbolGapFactor * _symbolSize;
                }
                else
                {
                    symbolGapFunction = null;
                }
            }

            // ensure that brush and pen are cached
            if (null != _linePen)
            {
                _linePen.Cached = true;
            }

            PlotRangeList rangeList = pdata.RangeList;

            if (_ignoreMissingDataPoints)
            {
                // in case we ignore the missing points, all ranges can be plotted
                // as one range, i.e. continuously
                // for this, we create the totalRange, which contains all ranges
                var totalRange = new PlotRangeCompound(rangeList);
                _connectionStyle.PaintOneRange(g, plotPositions, totalRange, layer, _linePen, symbolGapFunction, _skipFrequency, _connectCircular, this);
            }
            else // we not ignore missing points, so plot all ranges separately
            {
                for (int i = 0; i < rangeList.Count; i++)
                {
                    _connectionStyle.PaintOneRange(g, plotPositions, rangeList[i], layer, _linePen, symbolGapFunction, _skipFrequency, _connectCircular, this);
                }
            }
        }