コード例 #1
0
ファイル: DropAreaPlotStyle.cs プロジェクト: olesar/Altaxo
        public void CopyFrom(DropAreaPlotStyle from, Main.EventFiring eventFiring)
        {
            if (object.ReferenceEquals(this, from))
            {
                return;
            }

            using (var suspendToken = SuspendGetToken())
            {
                _connectionStyle                  = from._connectionStyle;
                _connectCircular                  = from._connectCircular;
                _ignoreMissingDataPoints          = from._ignoreMissingDataPoints;
                _independentOnShiftingGroupStyles = from._independentOnShiftingGroupStyles;

                _fillDirection = from._fillDirection;
                _fillRule      = from._fillRule;
                ChildCopyToMember(ref _fillBrush, from._fillBrush);
                _fillColorLinkage = from._fillColorLinkage;
                ChildCopyToMember(ref _framePen, from._framePen);
                _frameColorLinkage = from._frameColorLinkage;

                EhSelfChanged();

                suspendToken.Resume(eventFiring);
            }
        }
コード例 #2
0
        public void CopyFrom(LinePlotStyle from, Main.EventFiring eventFiring)
        {
            if (object.ReferenceEquals(this, from))
            {
                return;
            }

            using (var suspendToken = SuspendGetToken())
            {
                _independentSkipFrequency = from._independentSkipFrequency;
                _skipFrequency            = from._skipFrequency;

                _ignoreMissingDataPoints          = from._ignoreMissingDataPoints;
                _independentOnShiftingGroupStyles = from._independentOnShiftingGroupStyles;

                _connectCircular = from._connectCircular;
                _connectionStyle = from._connectionStyle;

                _linePen = null == from._linePen ? null : from._linePen.Clone();
                _independentDashStyle = from._independentDashStyle;
                _independentColor     = from._independentColor;

                _independentSymbolSize = from._independentSymbolSize;
                _symbolSize            = from._symbolSize;

                _useSymbolGap    = from._useSymbolGap;
                _symbolGapOffset = from._symbolGapOffset;
                _symbolGapFactor = from._symbolGapFactor;

                EhSelfChanged();

                suspendToken.Resume(eventFiring);
            }
        }
コード例 #3
0
        public void TransferFrom(IPlotGroupStyle fromb)
        {
            var from = (LineConnection2DGroupStyle)fromb;

            _isInitialized       = from._isInitialized;
            _lineConnectionStyle = from._lineConnectionStyle;
        }
コード例 #4
0
        public LinePlotStyle(Altaxo.Main.Properties.IReadOnlyPropertyBag context)
        {
            var penWidth = GraphDocument.GetDefaultPenWidth(context);
            var color    = GraphDocument.GetDefaultPlotColor(context);

            _linePen         = new PenX3D(color, penWidth).WithLineJoin(PenLineJoin.Bevel);
            _connectionStyle = new LineConnectionStyles.StraightConnection();
        }
コード例 #5
0
ファイル: DropAreaPlotStyle.cs プロジェクト: olesar/Altaxo
 public DropAreaPlotStyle(ILineConnectionStyle connection, bool ignoreMissingDataPoints, bool connectCircular, CSPlaneID direction, BrushX fillBrush, ColorLinkage fillColorLinkage)
 {
     _connectionStyle         = connection;
     _ignoreMissingDataPoints = ignoreMissingDataPoints;
     _connectCircular         = connectCircular;
     _fillDirection           = direction;
     _fillColorLinkage        = fillColorLinkage;
     ChildCopyToMember(ref _fillBrush, fillBrush);
     ChildSetMember(ref _framePen, new PenX(NamedColors.Transparent, 1));
 }
コード例 #6
0
ファイル: DropAreaPlotStyle.cs プロジェクト: olesar/Altaxo
        public DropAreaPlotStyle(Altaxo.Main.Properties.IReadOnlyPropertyBag context)
        {
            var penWidth = GraphDocument.GetDefaultPenWidth(context);
            var color    = GraphDocument.GetDefaultPlotColor(context);

            ChildSetMember(ref _framePen, new PenX(NamedColors.Transparent, penWidth)
            {
                LineJoin = LineJoin.Bevel
            });
            _ignoreMissingDataPoints = false;
            ChildSetMember(ref _fillBrush, new BrushX(color));
            _fillDirection   = new CSPlaneID(1, 0);
            _connectionStyle = LineConnectionStyles.StraightConnection.Instance;
        }
コード例 #7
0
        public LinePlotStyle(Altaxo.Main.Properties.IReadOnlyPropertyBag context)
        {
            var penWidth = GraphDocument.GetDefaultPenWidth(context);
            var color    = GraphDocument.GetDefaultPlotColor(context);

            _linePen = new PenX(color, penWidth)
            {
                LineJoin = LineJoin.Bevel
            };
            _ignoreMissingDataPoints = false;
            _connectionStyle         = LineConnectionStyles.StraightConnection.Instance;
            _independentColor        = false;

            CreateEventChain();
        }
コード例 #8
0
        internal LinePlotStyle(Altaxo.Serialization.Xml.IXmlDeserializationInfo info, bool oldDeserializationRequiresFullConstruction)
        {
            var penWidth = 1;
            var color    = ColorSetManager.Instance.BuiltinDarkPlotColors[0];

            _linePen = new PenX(color, penWidth)
            {
                LineJoin = LineJoin.Bevel
            };
            _useSymbolGap            = true;
            _ignoreMissingDataPoints = false;
            _connectionStyle         = LineConnectionStyles.StraightConnection.Instance;
            _independentColor        = false;

            CreateEventChain();
        }
コード例 #9
0
ファイル: DropAreaPlotStyle.cs プロジェクト: Altaxo/Altaxo
		public void CopyFrom(DropAreaPlotStyle from, Main.EventFiring eventFiring)
		{
			if (object.ReferenceEquals(this, from))
				return;

			using (var suspendToken = SuspendGetToken())
			{
				this._connectionStyle = from._connectionStyle;
				this._connectCircular = from._connectCircular;
				this._ignoreMissingDataPoints = from._ignoreMissingDataPoints;
				this._independentOnShiftingGroupStyles = from._independentOnShiftingGroupStyles;

				this._fillDirection = from._fillDirection;
				this._fillRule = from._fillRule;
				ChildCopyToMember(ref _fillBrush, from._fillBrush);
				this._fillColorLinkage = from._fillColorLinkage;
				ChildCopyToMember(ref _framePen, from._framePen);
				this._frameColorLinkage = from._frameColorLinkage;

				EhSelfChanged();

				suspendToken.Resume(eventFiring);
			}
		}
コード例 #10
0
 public LineConnection2DGroupStyle(LineConnection2DGroupStyle from)
 {
     _isInitialized       = from._isInitialized;
     _lineConnectionStyle = from._lineConnectionStyle;
 }
コード例 #11
0
 public void Initialize(ILineConnectionStyle lineConnectionStyle, bool connectCircular)
 {
     _isInitialized       = true;
     _lineConnectionStyle = lineConnectionStyle;
     _connectCircular     = connectCircular;
 }
コード例 #12
0
		public LineConnection2DGroupStyle(LineConnection2DGroupStyle from)
		{
			this._isInitialized = from._isInitialized;
			this._lineConnectionStyle = from._lineConnectionStyle;
		}
コード例 #13
0
ファイル: LinePlotStyle.cs プロジェクト: Altaxo/Altaxo
		public void ApplyGroupStyles(PlotGroupStyleCollection externalGroups, PlotGroupStyleCollection localGroups)
		{
			// IgnoreMissingDataPoints is the same for all sub plot styles
			IgnoreMissingDataPointsGroupStyle.ApplyStyle(externalGroups, localGroups, (ignoreMissingDataPoints) => this._ignoreMissingDataPoints = ignoreMissingDataPoints);

			// LineConnectionStyle is the same for all sub plot styles
			LineConnection2DGroupStyle.ApplyStyle(externalGroups, localGroups, (lineConnection, connectCircular) => { this._connectionStyle = lineConnection; this._connectCircular = connectCircular; });

			// SkipFrequency should be the same for all sub plot styles
			if (!_independentSkipFrequency)
			{
				_skipFrequency = 1;
				SkipFrequencyGroupStyle.ApplyStyle(externalGroups, localGroups, delegate (int c) { this._skipFrequency = c; });
			}

			if (this.IsColorReceiver)
				ColorGroupStyle.ApplyStyle(externalGroups, localGroups, delegate (NamedColor c) { this.Color = c; });

			if (!_independentDashStyle)
				DashPatternGroupStyle.ApplyStyle(externalGroups, localGroups, delegate (IDashPattern c) { this._linePen.DashPattern = c; });

			if (!_independentSymbolSize)
			{
				_symbolSize = 0;
				SymbolSizeGroupStyle.ApplyStyle(externalGroups, localGroups, delegate (double size) { this._symbolSize = size; });
			}

			// symbol size
			if (!_independentSymbolSize)
			{
				this._symbolSize = 0;
				SymbolSizeGroupStyle.ApplyStyle(externalGroups, localGroups, delegate (double size) { this._symbolSize = size; });

				// but if there is an symbol size evaluation function, then use this with higher priority.
				_cachedSymbolSizeForIndexFunction = null;
				VariableSymbolSizeGroupStyle.ApplyStyle(externalGroups, localGroups, delegate (Func<int, double> evalFunc) { _cachedSymbolSizeForIndexFunction = evalFunc; });
			}
			else
			{
				_cachedSymbolSizeForIndexFunction = null;
			}

			// Shift the items ?
			_cachedLogicalShiftX = 0;
			_cachedLogicalShiftY = 0;
			if (!_independentOnShiftingGroupStyles)
			{
				var shiftStyle = PlotGroupStyle.GetFirstStyleToApplyImplementingInterface<IShiftLogicalXYGroupStyle>(externalGroups, localGroups);
				if (null != shiftStyle)
				{
					shiftStyle.Apply(out _cachedLogicalShiftX, out _cachedLogicalShiftY);
				}
			}
		}
コード例 #14
0
ファイル: LinePlotStyle.cs プロジェクト: Altaxo/Altaxo
		public LinePlotStyle(Altaxo.Main.Properties.IReadOnlyPropertyBag context)
		{
			var penWidth = GraphDocument.GetDefaultPenWidth(context);
			var color = GraphDocument.GetDefaultPlotColor(context);

			_linePen = new PenX(color, penWidth) { LineJoin = LineJoin.Bevel };
			_ignoreMissingDataPoints = false;
			_connectionStyle = LineConnectionStyles.StraightConnection.Instance;
			_independentColor = false;

			CreateEventChain();
		}
コード例 #15
0
ファイル: LinePlotStyle.cs プロジェクト: Altaxo/Altaxo
		internal LinePlotStyle(Altaxo.Serialization.Xml.IXmlDeserializationInfo info, bool oldDeserializationRequiresFullConstruction)
		{
			var penWidth = 1;
			var color = ColorSetManager.Instance.BuiltinDarkPlotColors[0];

			_linePen = new PenX(color, penWidth) { LineJoin = LineJoin.Bevel };
			_useSymbolGap = true;
			_ignoreMissingDataPoints = false;
			_connectionStyle = LineConnectionStyles.StraightConnection.Instance;
			_independentColor = false;

			CreateEventChain();
		}
コード例 #16
0
ファイル: LinePlotStyle.cs プロジェクト: Altaxo/Altaxo
		public void CopyFrom(LinePlotStyle from, Main.EventFiring eventFiring)
		{
			if (object.ReferenceEquals(this, from))
				return;

			using (var suspendToken = SuspendGetToken())
			{
				this._independentSkipFrequency = from._independentSkipFrequency;
				this._skipFrequency = from._skipFrequency;

				this._ignoreMissingDataPoints = from._ignoreMissingDataPoints;
				this._independentOnShiftingGroupStyles = from._independentOnShiftingGroupStyles;

				this._connectCircular = from._connectCircular;
				this._connectionStyle = from._connectionStyle;

				this._linePen = null == from._linePen ? null : (PenX)from._linePen.Clone();
				this._independentDashStyle = from._independentDashStyle;
				this._independentColor = from._independentColor;

				this._independentSymbolSize = from._independentSymbolSize;
				this._symbolSize = from._symbolSize;

				this._useSymbolGap = from._useSymbolGap;
				this._symbolGapOffset = from._symbolGapOffset;
				this._symbolGapFactor = from._symbolGapFactor;

				EhSelfChanged();

				suspendToken.Resume(eventFiring);
			}
		}
コード例 #17
0
		public void Initialize(ILineConnectionStyle lineConnectionStyle, bool connectCircular)
		{
			_isInitialized = true;
			_lineConnectionStyle = lineConnectionStyle;
			_connectCircular = connectCircular;
		}
コード例 #18
0
ファイル: DropAreaPlotStyle.cs プロジェクト: Altaxo/Altaxo
		public DropAreaPlotStyle(Altaxo.Main.Properties.IReadOnlyPropertyBag context)
		{
			var penWidth = GraphDocument.GetDefaultPenWidth(context);
			var color = GraphDocument.GetDefaultPlotColor(context);

			ChildSetMember(ref _framePen, new PenX(NamedColors.Transparent, penWidth) { LineJoin = LineJoin.Bevel });
			_ignoreMissingDataPoints = false;
			ChildSetMember(ref _fillBrush, new BrushX(color));
			_fillDirection = new CSPlaneID(1, 0);
			_connectionStyle = LineConnectionStyles.StraightConnection.Instance;
		}
コード例 #19
0
ファイル: DropAreaPlotStyle.cs プロジェクト: Altaxo/Altaxo
		protected DropAreaPlotStyle(Altaxo.Serialization.Xml.IXmlDeserializationInfo info)
		{
			_connectionStyle = LineConnectionStyles.StraightConnection.Instance;
		}
コード例 #20
0
ファイル: DropAreaPlotStyle.cs プロジェクト: olesar/Altaxo
 protected DropAreaPlotStyle(Altaxo.Serialization.Xml.IXmlDeserializationInfo info)
 {
     _connectionStyle = LineConnectionStyles.StraightConnection.Instance;
 }
コード例 #21
0
ファイル: LinePlotStyle.cs プロジェクト: Altaxo/Altaxo
		public LinePlotStyle(Altaxo.Main.Properties.IReadOnlyPropertyBag context)
		{
			var penWidth = GraphDocument.GetDefaultPenWidth(context);
			var color = GraphDocument.GetDefaultPlotColor(context);

			_linePen = new PenX3D(color, penWidth).WithLineJoin(PenLineJoin.Bevel);
			_connectionStyle = new LineConnectionStyles.StraightConnection();
		}
コード例 #22
0
        public void ApplyGroupStyles(PlotGroupStyleCollection externalGroups, PlotGroupStyleCollection localGroups)
        {
            // IgnoreMissingDataPoints is the same for all sub plot styles
            IgnoreMissingDataPointsGroupStyle.ApplyStyle(externalGroups, localGroups, (ignoreMissingDataPoints) => _ignoreMissingDataPoints = ignoreMissingDataPoints);

            // LineConnectionStyle is the same for all sub plot styles
            LineConnection2DGroupStyle.ApplyStyle(externalGroups, localGroups, (lineConnection, connectCircular) => { _connectionStyle = lineConnection; _connectCircular = connectCircular; });

            // SkipFrequency should be the same for all sub plot styles
            if (!_independentSkipFrequency)
            {
                _skipFrequency = 1;
                SkipFrequencyGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(int c)
                                                   { _skipFrequency = c; });
            }

            if (IsColorReceiver)
            {
                ColorGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(NamedColor c)
                                           { Color = c; });
            }

            if (!_independentDashStyle)
            {
                DashPatternGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(IDashPattern c)
                                                 { _linePen.DashPattern = c; });
            }

            if (!_independentSymbolSize)
            {
                _symbolSize = 0;
                SymbolSizeGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(double size)
                                                { _symbolSize = size; });
            }

            // symbol size
            if (!_independentSymbolSize)
            {
                _symbolSize = 0;
                SymbolSizeGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(double size)
                                                { _symbolSize = size; });

                // but if there is an symbol size evaluation function, then use this with higher priority.
                _cachedSymbolSizeForIndexFunction = null;
                VariableSymbolSizeGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(Func <int, double> evalFunc)
                                                        { _cachedSymbolSizeForIndexFunction = evalFunc; });
            }
            else
            {
                _cachedSymbolSizeForIndexFunction = null;
            }

            // Shift the items ?
            _cachedLogicalShiftX = 0;
            _cachedLogicalShiftY = 0;
            if (!_independentOnShiftingGroupStyles)
            {
                var shiftStyle = PlotGroupStyle.GetFirstStyleToApplyImplementingInterface <IShiftLogicalXYGroupStyle>(externalGroups, localGroups);
                if (null != shiftStyle)
                {
                    shiftStyle.Apply(out _cachedLogicalShiftX, out _cachedLogicalShiftY);
                }
            }
        }
コード例 #23
0
ファイル: DropAreaPlotStyle.cs プロジェクト: Altaxo/Altaxo
		public DropAreaPlotStyle(ILineConnectionStyle connection, bool ignoreMissingDataPoints, bool connectCircular, CSPlaneID direction, BrushX fillBrush, ColorLinkage fillColorLinkage)
		{
			_connectionStyle = connection;
			_ignoreMissingDataPoints = ignoreMissingDataPoints;
			_connectCircular = connectCircular;
			_fillDirection = direction;
			_fillColorLinkage = fillColorLinkage;
			ChildCopyToMember(ref _fillBrush, fillBrush);
			ChildSetMember(ref _framePen, new PenX(NamedColors.Transparent, 1));
		}
コード例 #24
0
ファイル: DropAreaPlotStyle.cs プロジェクト: olesar/Altaxo
        public void ApplyGroupStyles(PlotGroupStyleCollection externalGroups, PlotGroupStyleCollection localGroups)
        {
            // IgnoreMissingDataPoints is the same for all sub plot styles
            IgnoreMissingDataPointsGroupStyle.ApplyStyle(externalGroups, localGroups, (ignoreMissingDataPoints) => _ignoreMissingDataPoints = ignoreMissingDataPoints);

            // LineConnectionStyle is the same for all sub plot styles
            LineConnection2DGroupStyle.ApplyStyle(externalGroups, localGroups, (lineConnection, connectCircular) => { _connectionStyle = lineConnection; _connectCircular = connectCircular; });

            if (ColorLinkage.Independent != _fillColorLinkage)
            {
                if (null == _fillBrush)
                {
                    _fillBrush = new BrushX(NamedColors.Black);
                }

                if (_fillColorLinkage == ColorLinkage.Dependent)
                {
                    ColorGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(NamedColor c)
                                               { _fillBrush.Color = c; });
                }
                else if (ColorLinkage.PreserveAlpha == _fillColorLinkage)
                {
                    ColorGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(NamedColor c)
                                               { _fillBrush.Color = c.NewWithAlphaValue(_fillBrush.Color.Color.A); });
                }
            }
            if (ColorLinkage.Independent != _frameColorLinkage)
            {
                if (null == _framePen)
                {
                    ChildSetMember(ref _framePen, new PenX(NamedColors.Black));
                }

                if (_frameColorLinkage == ColorLinkage.Dependent)
                {
                    ColorGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(NamedColor c)
                                               { _framePen.Color = c; });
                }
                else if (ColorLinkage.PreserveAlpha == _fillColorLinkage)
                {
                    ColorGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(NamedColor c)
                                               { _framePen.Color = c.NewWithAlphaValue(_framePen.Color.Color.A); });
                }
            }

            // Shift the items ?
            _cachedLogicalShiftX = 0;
            _cachedLogicalShiftY = 0;
            if (!_independentOnShiftingGroupStyles)
            {
                var shiftStyle = PlotGroupStyle.GetFirstStyleToApplyImplementingInterface <IShiftLogicalXYGroupStyle>(externalGroups, localGroups);
                if (null != shiftStyle)
                {
                    shiftStyle.Apply(out _cachedLogicalShiftX, out _cachedLogicalShiftY);
                }
            }
        }
コード例 #25
0
ファイル: DropAreaPlotStyle.cs プロジェクト: Altaxo/Altaxo
		public void ApplyGroupStyles(PlotGroupStyleCollection externalGroups, PlotGroupStyleCollection localGroups)
		{
			// IgnoreMissingDataPoints is the same for all sub plot styles
			IgnoreMissingDataPointsGroupStyle.ApplyStyle(externalGroups, localGroups, (ignoreMissingDataPoints) => this._ignoreMissingDataPoints = ignoreMissingDataPoints);

			// LineConnectionStyle is the same for all sub plot styles
			LineConnection2DGroupStyle.ApplyStyle(externalGroups, localGroups, (lineConnection, connectCircular) => { this._connectionStyle = lineConnection; this._connectCircular = connectCircular; });

			if (ColorLinkage.Independent != _fillColorLinkage)
			{
				if (null == _fillBrush)
					_fillBrush = new BrushX(NamedColors.Black);

				if (_fillColorLinkage == ColorLinkage.Dependent)
					ColorGroupStyle.ApplyStyle(externalGroups, localGroups, delegate (NamedColor c) { _fillBrush.Color = c; });
				else if (ColorLinkage.PreserveAlpha == _fillColorLinkage)
					ColorGroupStyle.ApplyStyle(externalGroups, localGroups, delegate (NamedColor c) { _fillBrush.Color = c.NewWithAlphaValue(_fillBrush.Color.Color.A); });
			}
			if (ColorLinkage.Independent != _frameColorLinkage)
			{
				if (null == _framePen)
					ChildSetMember(ref _framePen, new PenX(NamedColors.Black));

				if (_frameColorLinkage == ColorLinkage.Dependent)
					ColorGroupStyle.ApplyStyle(externalGroups, localGroups, delegate (NamedColor c) { _framePen.Color = c; });
				else if (ColorLinkage.PreserveAlpha == _fillColorLinkage)
					ColorGroupStyle.ApplyStyle(externalGroups, localGroups, delegate (NamedColor c) { _framePen.Color = c.NewWithAlphaValue(_framePen.Color.Color.A); });
			}

			// Shift the items ?
			_cachedLogicalShiftX = 0;
			_cachedLogicalShiftY = 0;
			if (!_independentOnShiftingGroupStyles)
			{
				var shiftStyle = PlotGroupStyle.GetFirstStyleToApplyImplementingInterface<IShiftLogicalXYGroupStyle>(externalGroups, localGroups);
				if (null != shiftStyle)
				{
					shiftStyle.Apply(out _cachedLogicalShiftX, out _cachedLogicalShiftY);
				}
			}
		}
コード例 #26
0
		public void TransferFrom(IPlotGroupStyle fromb)
		{
			LineConnection2DGroupStyle from = (LineConnection2DGroupStyle)fromb;
			this._isInitialized = from._isInitialized;
			_lineConnectionStyle = from._lineConnectionStyle;
		}