public void ApplyGroupStyles(Altaxo.Graph.Gdi.Plot.Groups.PlotGroupStyleCollection externalGroups, Altaxo.Graph.Gdi.Plot.Groups.PlotGroupStyleCollection localGroups) { // color if (!_independentColor) { ColorGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(PlotColor c) { this._strokePen.Color = c; }); } // SkipFrequency should be the same for all sub plot styles, so there is no "private" property SkipFrequencyGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(int c) { this.SkipFrequency = c; }); // symbol size if (!_independentSymbolSize) { if (!SymbolSizeGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(float size) { this._symbolSize = size; })) { this._symbolSize = 0; } } // bar position BarWidthPositionGroupStyle bwp = PlotGroupStyle.GetStyleToApply <BarWidthPositionGroupStyle>(externalGroups, localGroups); if (null != bwp && !_doNotShiftHorizontalPosition) { double innerGapW, outerGapW, width, lpos; bwp.Apply(out innerGapW, out outerGapW, out width, out lpos); _cachedLogicalShiftOfIndependent = lpos + width / 2; } else { _cachedLogicalShiftOfIndependent = 0; } }
public void ApplyGroupStyles(PlotGroupStyleCollection externalGroups, PlotGroupStyleCollection localGroups) { BarWidthPositionGroupStyle bwp = PlotGroupStyle.GetStyleToApply <BarWidthPositionGroupStyle>(externalGroups, localGroups); if (null != bwp) { bwp.Apply(out _relInnerGapWidth, out _relOuterGapWidth, out _width, out _position); } if (this.IsColorReceiver) { ColorGroupStyle.ApplyStyle(externalGroups, localGroups, delegate(PlotColor c) { this._fillBrush.Color = c; }); } }
public void PrepareGroupStyles(PlotGroupStyleCollection externalGroups, PlotGroupStyleCollection localGroups, IPlotArea layer, Processed2DPlotData pdata) { // first, we have to calculate the span of logical values from the minimum logical value to the maximum logical value int numberOfItems = 0; double minLogical = double.MaxValue; double maxLogical = double.MinValue; foreach (int originalRowIndex in pdata.RangeList.OriginalRowIndices()) { double logicalX = layer.XAxis.PhysicalVariantToNormal(pdata.GetXPhysical(originalRowIndex)); numberOfItems++; if (logicalX < minLogical) { minLogical = logicalX; } if (logicalX > maxLogical) { maxLogical = logicalX; } } BarWidthPositionGroupStyle.IntendToApply(externalGroups, localGroups, numberOfItems, minLogical, maxLogical); BarWidthPositionGroupStyle bwp = PlotGroupStyle.GetStyleToInitialize <BarWidthPositionGroupStyle>(externalGroups, localGroups); if (null != bwp) { bwp.Initialize(_relInnerGapWidth, _relOuterGapWidth); } if (this.IsColorReceiver) { ColorGroupStyle.PrepareStyle(externalGroups, localGroups, delegate() { return(PlotColors.Colors.GetPlotColor(this._fillBrush.Color)); }); } }
public void CollectLocalGroupStyles(PlotGroupStyleCollection externalGroups, PlotGroupStyleCollection localGroups) { BarWidthPositionGroupStyle.AddLocalGroupStyle(externalGroups, localGroups); }
public void CollectExternalGroupStyles(PlotGroupStyleCollection externalGroups) { BarWidthPositionGroupStyle.AddExternalGroupStyle(externalGroups); }