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); } }
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); } }
public void TransferFrom(IPlotGroupStyle fromb) { var from = (LineConnection2DGroupStyle)fromb; _isInitialized = from._isInitialized; _lineConnectionStyle = from._lineConnectionStyle; }
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(); }
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)); }
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; }
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(); }
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(); }
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); } }
public LineConnection2DGroupStyle(LineConnection2DGroupStyle from) { _isInitialized = from._isInitialized; _lineConnectionStyle = from._lineConnectionStyle; }
public void Initialize(ILineConnectionStyle lineConnectionStyle, bool connectCircular) { _isInitialized = true; _lineConnectionStyle = lineConnectionStyle; _connectCircular = connectCircular; }
public LineConnection2DGroupStyle(LineConnection2DGroupStyle from) { this._isInitialized = from._isInitialized; this._lineConnectionStyle = from._lineConnectionStyle; }
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); } } }
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); } }
protected DropAreaPlotStyle(Altaxo.Serialization.Xml.IXmlDeserializationInfo info) { _connectionStyle = LineConnectionStyles.StraightConnection.Instance; }
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); } } }
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); } } }
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); } } }
public void TransferFrom(IPlotGroupStyle fromb) { LineConnection2DGroupStyle from = (LineConnection2DGroupStyle)fromb; this._isInitialized = from._isInitialized; _lineConnectionStyle = from._lineConnectionStyle; }