Exemplo n.º 1
0
 public void PrepareScales(Graph3D.IPlotArea layer)
 {
     foreach (IGPlotItem pi in _plotItems)
     {
         pi.PrepareScales(layer);
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Prepares the scale of this plot style.
        /// </summary>
        /// <param name="layer">The parent layer.</param>
        public void PrepareScales(Graph3D.IPlotArea layer)
        {
            var dataColumn = DataColumn;

            if (null != dataColumn)
            {
                if (_doesScaleNeedsDataUpdate)
                {
                    InternalUpdateScaleWithNewData();
                }
            }
        }
Exemplo n.º 3
0
        public void Paint(IGraphicsContext3D g, IPaintContext context, Graph3D.IPlotArea layer, IGPlotItem previousPlotItem, IGPlotItem nextPlotItem)
        {
            var coordinateTransformingStyle = _plotGroupStyles.CoordinateTransformingStyle;

            for (int i = 0; i < _plotItems.Count; ++i)
            {
                if (null != coordinateTransformingStyle)
                {
                    coordinateTransformingStyle.PaintChild(g, context, layer, this, i);
                }
                else
                {
                    var previousItem = i == 0 ? null : _plotItems[i - 1];
                    var nextItem     = i == _plotItems.Count - 1 ? null : _plotItems[i + 1];
                    _plotItems[i].Paint(g, context, layer, previousItem, nextItem);
                }
            }
        }
Exemplo n.º 4
0
 /// <summary>
 /// Prepares the scale of this plot style. Since this style does not utilize a scale, this function does nothing.
 /// </summary>
 /// <param name="layer">The parent layer.</param>
 public void PrepareScales(Graph3D.IPlotArea layer)
 {
 }
Exemplo n.º 5
0
 public void Paint(IGraphicsContext3D g, Graph3D.IPlotArea layer, Graph3D.Plot.Data.Processed3DPlotData pdata, Graph3D.Plot.Data.Processed3DPlotData prevItemData, Graph3D.Plot.Data.Processed3DPlotData nextItemData)
 {
     // this is not a visible style, thus doing nothing
 }
Exemplo n.º 6
0
 public void PrepareGroupStyles(Graph3D.Plot.Groups.PlotGroupStyleCollection externalGroups, Graph3D.Plot.Groups.PlotGroupStyleCollection localGroups, Graph3D.IPlotArea layer, Graph3D.Plot.Data.Processed3DPlotData pdata)
 {
     VariableColorGroupStyle.PrepareStyle(externalGroups, localGroups, GetColor);
 }
Exemplo n.º 7
0
        /// <summary>
        /// Prepare group styles forward, from the first to the last item.
        /// The function is called recursively for child PlotItemCollections, but only up in the hierarchy.
        /// This function therefore has no influence on items down in hierarchie, i.e. parental PlotItemCollections.
        /// </summary>
        /// <param name="parentGroupStyles">The parent plot group style collection.</param>
        /// <param name="layer">The plot layer.</param>
        /// <remarks>The preparation is used for:
        /// <para>BarGraph: to count items, calculating the width and position of each item afterwards.</para>
        /// <para>It is <b>not</b> used to enumerate colors, line styles etc., since this is done during the Apply stage.</para>
        /// </remarks>
        protected void PrepareGroupStylesForward_HierarchyUpOnly(PlotGroupStyleCollection parentGroupStyles, Graph3D.IPlotArea layer)
        {
            bool transferFromParentStyles =
                parentGroupStyles != null &&
                parentGroupStyles.Count != 0 &&
                parentGroupStyles.DistributeToChildGroups &&
                _plotGroupStyles.InheritFromParentGroups;

            // Announce the local plot group styles, that we start preparing
            _plotGroupStyles.BeginPrepare();

            //string thisname = Main.DocumentPath.GetPathString(this, int.MaxValue);
            //System.Diagnostics.Debug.WriteLine(string.Format("{0}:Begin:PrepareFWHUO", thisname));

            // if TransferFromParentStyles was choosen, transfer some of the plot group settings of the parental plot group styles to the local styles
            if (transferFromParentStyles)
            {
                PlotGroupStyleCollection.TransferFromTo(parentGroupStyles, _plotGroupStyles);
                //System.Diagnostics.Debug.WriteLine(string.Format("{0}:Begin:PrepareFWHUO (transfer from parent style", thisname));
            }

            // for each PlotItem in this collection, announce the preparation, using the local plot group style collection
            // after each item, announce a step to the plot group styles, so that the properties (like color etc.) can be stepped forward
            int last = _plotItems.Count - 1;

            for (int i = 0; i <= last; i++)
            {
                IGPlotItem pi = _plotItems[i];
                if (pi is PlotItemCollection)
                {
                    var pic = (PlotItemCollection)pi;
                    pic.PrepareGroupStylesForward_HierarchyUpOnly(_plotGroupStyles, layer);
                    _plotGroupStyles.PrepareStepIfForeignSteppingFalse(((PlotItemCollection)pi)._plotGroupStyles);
                }
                else
                {
                    pi.PrepareGroupStyles(_plotGroupStyles, layer);
                    _plotGroupStyles.PrepareStep();
                }
            }

            // after all our own PlotItems are prepared now,
            // if TransferFromParentStyles was choosen, transfer our own plot group settings back to the parental plot group styles
            // so that the parental plot group can continue i.e. with the color etc.
            if (transferFromParentStyles)
            {
                PlotGroupStyleCollection.TransferFromTo(_plotGroupStyles, parentGroupStyles);
                //System.Diagnostics.Debug.WriteLine(string.Format("{0}:End:PrepareFWHUO (transfer back to parent style", thisname));
            }

            // after preparation of all plot items is done, announce the end of preparation,
            // some of the calculations can be done only now.
            _plotGroupStyles.EndPrepare();
            //System.Diagnostics.Debug.WriteLine(string.Format("{0}:End:PrepareFWHUO", thisname));
        }
Exemplo n.º 8
0
 public void PrepareGroupStyles(PlotGroupStyleCollection parentPlotGroupStyles, Graph3D.IPlotArea layer)
 {
     PrepareGroupStylesForward_HierarchyUpOnly(parentPlotGroupStyles, layer);
 }