Esempio n. 1
0
        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;
            }
        }
Esempio n. 2
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; });
            }
        }