当前位置: 首页>>代码示例>>C#>>正文


C# IPointList类代码示例

本文整理汇总了C#中IPointList的典型用法代码示例。如果您正苦于以下问题:C# IPointList类的具体用法?C# IPointList怎么用?C# IPointList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IPointList类属于命名空间,在下文中一共展示了IPointList类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AsEnumerable

 public static IEnumerable<PointPair> AsEnumerable(IPointList pointList)
 {
     for (int i = 0; i < pointList.Count; i++)
     {
         yield return pointList[i];
     }
 }
开发者ID:AlexandreBurel,项目名称:pwiz-mzdb,代码行数:7,代码来源:CurveDataHandler.cs

示例2: PointPairList

        /// <summary>
        /// Constructor to initialize the PointPairList from an IPointList
        /// </summary>
        public PointPairList( IPointList list )
        {
            int count = list.Count;
            for ( int i = 0; i < count; i++ )
                Add( list[i] );

            _sorted = false;
        }
开发者ID:JohnChantzis,项目名称:bark_GUI,代码行数:11,代码来源:PointPairList.cs

示例3: FilledLineItem

        /// <summary>
        /// Create a new <see cref="FilledLineItem"/> using the specified properties.
        /// </summary>
        /// <param name="label">The _label that will appear in the legend.</param>
        /// <param name="upperPoints">A <see cref="IPointList"/> of double precision value pairs that define
        /// the X and upper Y values for this curve</param>
        /// <param name="lowerPoints">A <see cref="IPointList"/> of double precision value pairs that define
        /// the X and lower Y values for this curve</param>
        /// <param name="color">A <see cref="System.Drawing.Color"/> value that will be applied to
        /// the <see cref="Line"/> and <see cref="Symbol"/> properties.
        /// </param>
        /// <param name="symbolType">A <see cref="SymbolType"/> enum specifying the
        /// type of symbol to use for this <see cref="LineItem"/>.  Use <see cref="SymbolType.None"/>
        /// to hide the symbols.</param>
        /// <param name="lineWidth">The width (in points) to be used for the <see cref="Line"/>.  This
        /// width is scaled based on <see cref="PaneBase.CalcScaleFactor"/>.  Use a value of zero to
        /// hide the line (see <see cref="ZedGraph.LineBase.IsVisible"/>).</param>
        public FilledLineItem( string label, IPointList upperPoints, IPointList lowerPoints, System.Drawing.Color color, SymbolType symbolType, float lineWidth )
            : base(label)
        {
            Points = upperPoints ?? new PointPairList();
            LowerPoints = lowerPoints ?? new PointPairList();

            _line = new FilledLine( color );
            if ( lineWidth == 0 )
                _line.IsVisible = false;
            else
                _line.Width = lineWidth;

            _symbol = new Symbol( symbolType, color );
        }
开发者ID:konrad-zielinski,项目名称:ZedGraph,代码行数:31,代码来源:FilledLineItem.cs

示例4: AddCurve

        /// <summary>
        /// Add a curve (<see cref="CurveItem"/> object) to the plot with
        /// the given data points (<see cref="IPointList"/>) and properties.
        /// This is simplified way to add curves without knowledge of the
        /// <see cref="CurveList"/> class.  An alternative is to use
        /// the <see cref="ZedGraph.CurveList" /> Add() method.
        /// </summary>
        /// <param name="label">The text label (string) for the curve that will be
        /// used as a <see cref="Legend"/> entry.</param>
        /// <param name="points">A <see cref="IPointList"/> of double precision value pairs that define
        /// the X and Y values for this curve</param>
        /// <param name="color">The color to used for the curve line,
        /// symbols, etc.</param>
        /// <param name="symbolType">A symbol type (<see cref="SymbolType"/>)
        /// that will be used for this curve.</param>
        /// <returns>A <see cref="CurveItem"/> class for the newly created curve.
        /// This can then be used to access all of the curve properties that
        /// are not defined as arguments to the
        /// <see cref="AddCurve(string,IPointList,Color,SymbolType)"/> method.</returns>
        public LineItem AddCurve( string label, IPointList points,
			Color color, SymbolType symbolType )
        {
            LineItem curve = new LineItem( label, points, color, symbolType );
            _curveList.Add( curve );

            return curve;
        }
开发者ID:cliffton2008,项目名称:JNMAutoTrader_Capital,代码行数:27,代码来源:GraphPane.cs

示例5: SpectrumItem

 public SpectrumItem(IPointList points, Color color, float width = 1)
 {
     _points = points;
     _color = color;
     LineWidth = Settings.Default.SpectrumLineWidth*width;
 }
开发者ID:lgatto,项目名称:proteowizard,代码行数:6,代码来源:GraphFullScan.cs

示例6: RollingPointPairList

        /// <summary>
        /// Constructs a buffer with a copy of the items within the provided
        /// <see cref="IPointList" />.
        /// The <see cref="Capacity" /> is set to the length of the provided list.
        /// </summary>
        /// <param name="rhs">The <see cref="IPointList" /> to be copied.</param>
        public RollingPointPairList( IPointList rhs )
        {
            _mBuffer = new PointPair[rhs.Count];

            for ( int i = 0; i < rhs.Count; i++ )
            {
                _mBuffer[i] = new PointPair( rhs[i] );
            }

            _headIdx = rhs.Count - 1;
            _tailIdx = 0;
        }
开发者ID:konrad-zielinski,项目名称:ZedGraph,代码行数:18,代码来源:RollingPointPairList.cs

示例7: BarItem

 /// <summary>
 /// Create a new <see cref="BarItem"/> using the specified properties.
 /// </summary>
 /// <param name="label">The label that will appear in the legend.</param>
 /// <param name="points">A <see cref="IPointList"/> of double precision value pairs that define
 /// the X and Y values for this curve</param>
 /// <param name="color">A <see cref="Color"/> value that will be applied to
 /// the <see cref="ZedGraph.Bar.Fill"/> and <see cref="ZedGraph.Bar.Border"/> properties.
 /// </param>
 public BarItem( string label, IPointList points, Color color )
     : base(label, points)
 {
     _bar = new Bar( color );
 }
开发者ID:nic0lae,项目名称:mathtoolbelt,代码行数:14,代码来源:BarItem.cs

示例8: AddJapaneseCandleStick

        /// <summary>
        /// Add a japanesecandlestick graph (<see cref="JapaneseCandleStickItem"/> object) to the plot with
        /// the given data points (<see cref="IPointList"/>) and properties.
        /// </summary>
        /// <remarks>
        /// This is simplified way to add curves without knowledge of the
        /// <see cref="CurveList"/> class.  An alternative is to use
        /// the <see cref="ZedGraph.CurveList" /> Add() method.
        /// Note that the <see cref="IPointList" />
        /// should contain <see cref="StockPt" /> objects instead of <see cref="PointPair" />
        /// objects in order to contain all the data values required for this curve type.
        /// </remarks>
        /// <param name="label">The text label (string) for the curve that will be
        /// used as a <see cref="Legend"/> entry.</param>
        /// <param name="points">A <see cref="IPointList"/> of double precision value pairs that define
        /// the X and Y values for this curve</param>
        /// <returns>A <see cref="CurveItem"/> class for the newly created curve.
        /// This can then be used to access all of the curve properties that
        /// are not defined as arguments to the
        /// <see cref="AddJapaneseCandleStick(string,IPointList)"/> method.</returns>
        public JapaneseCandleStickItem AddJapaneseCandleStick( string label, IPointList points )
        {
            JapaneseCandleStickItem curve = new JapaneseCandleStickItem( label, points );
            _curveList.Add( curve );

            return curve;
        }
开发者ID:cliffton2008,项目名称:JNMAutoTrader_Capital,代码行数:27,代码来源:GraphPane.cs

示例9: GetTagColumn

 /// <summary>
 /// If any of the <see cref="PointPair.Tag"/> properties on the point is a string,
 /// then this method returns a <see cref="DataColumn"/> containing those string values.
 /// If none of the tags are strings, then this method returns null.
 /// 
 /// A <see cref="ZedGraphControl"/> will show the tag as a tooltip if it is
 /// a string and <see cref="ZedGraphControl.IsShowPointValues"/> is true.
 /// </summary>
 protected virtual DataColumn GetTagColumn(IPointList points)
 {
     var values = AsEnumerable(points).Select(point => point.Tag as string).ToArray();
     if (values.All(value=>null == value))
     {
         return null;
     }
     return new DataColumn<string>("Label", values); // Not L10N
 }
开发者ID:AlexandreBurel,项目名称:pwiz-mzdb,代码行数:17,代码来源:CurveDataHandler.cs

示例10: GetZAxisColumn

 /// <summary>
 /// Returns a column with the data values in <see cref="PointPair.Z"/>.
 /// </summary>
 protected virtual DataColumn GetZAxisColumn(IPointList points)
 {
     var values = new double?[points.Count];
     for (int i = 0; i < points.Count; i++)
     {
         var point = points[i];
         if (point.IsMissing)
         {
             values[i] = null;
         }
         else
         {
             values[i] = point.Z;
         }
     }
     if (values.Contains(null))
     {
         return new DataColumn<double?>("Z", values); // Not L10N
     }
     return new DataColumn<double>("Z", values.Cast<double>()); // Not L10N
 }
开发者ID:AlexandreBurel,项目名称:pwiz-mzdb,代码行数:24,代码来源:CurveDataHandler.cs

示例11: CurveItem

        /// <summary>
        /// The Copy Constructor
        /// </summary>
        /// <param name="rhs">The CurveItem object from which to copy</param>
        public CurveItem( CurveItem rhs )
        {
            _label = rhs._label.Clone();
            _isY2Axis = rhs.IsY2Axis;
            _isX2Axis = rhs.IsX2Axis;
            _isVisible = rhs.IsVisible;
            _isOverrideOrdinal = rhs._isOverrideOrdinal;
            _yAxisIndex = rhs._yAxisIndex;

            if ( rhs.Tag is ICloneable )
                this.Tag = ((ICloneable) rhs.Tag).Clone();
            else
                this.Tag = rhs.Tag;

            _points = (IPointList) rhs.Points.Clone();

            _link = rhs._link.Clone();
        }
开发者ID:nic0lae,项目名称:mathtoolbelt,代码行数:22,代码来源:CurveItem.cs

示例12: Curve

 public Curve(IPointList points)
 {
     Points = new PointPairList(points);
     LibraryReferenceName = string.Empty;
 }
开发者ID:Jchuchla,项目名称:vixen,代码行数:5,代码来源:Curve.cs

示例13: PrepareData

        /// <summary>
        /// Подготавливает данные для их отображения на графике.
        /// </summary>
        private static IPointList[] PrepareData(IEnumerable<MergedNarrowPeak> peaks, int maxPeaksPerBar,
            ref int minPos, ref int maxPos, out int maxValue)
        {
            maxValue = 0;
            var minPos2 = int.MaxValue;
            var maxPos2 = int.MinValue;
            var data = new List<KeyValuePair<int, int>>[maxPeaksPerBar];
            for (int i = 0; i < data.Length; i++)
                data[i] = new List<KeyValuePair<int, int>>();
            foreach (var peak in peaks)
            {
                if(peak.StartPos < minPos)
                    continue;
                if (peak.EndPos > maxPos)
                    break;

                if (peak.StartPosMin < minPos2)
                    minPos2 = peak.StartPosMin;
                if (peak.EndPosMax > maxPos2)
                    maxPos2 = peak.EndPosMax;

                int id = 0;
                foreach (var p in peak.Values1.OrderByDescending(p => p).Take(maxPeaksPerBar))
                {
                    if (p > maxValue)
                        maxValue = (int)p;
                    data[id++].Add(new KeyValuePair<int, int>((peak.EndPos + peak.StartPos)/2, (int) Math.Round(p)));
                }
            }
            int cnt = data.Count(p => p.Count > 0);
            var ret = new IPointList[cnt];
            for (int i = 0; i < cnt; i++)
            {
                ret[i] = new PointPairList(data[i].Select(p => (double)p.Key).ToArray(),
                                           data[i].Select(p => (double)p.Value).ToArray());
            }
            minPos = minPos2;
            maxPos = maxPos2;
            return ret;
        }
开发者ID:supcry,项目名称:MotifSeeker,代码行数:43,代码来源:MergedBarGraph.cs

示例14: AddErrorBar

        /// <summary>
        /// Add an error bar set (<see cref="ErrorBarItem"/> object) to the plot with
        /// the given data points (<see cref="IPointList"/>) and properties.
        /// This is simplified way to add curves without knowledge of the
        /// <see cref="CurveList"/> class.  An alternative is to use
        /// the <see cref="ZedGraph.CurveList" /> Add() method.
        /// </summary>
        /// <param name="label">The text label (string) for the curve that will be
        /// used as a <see cref="Legend"/> entry.</param>
        /// <param name="points">A <see cref="IPointList"/> of double precision value pairs that define
        /// the X and Y values for this curve</param>
        /// <param name="color">The color to used for the curve line,
        /// symbols, etc.</param>
        /// <returns>An <see cref="ErrorBarItem"/> class for the newly created curve.
        /// This can then be used to access all of the curve properties that
        /// are not defined as arguments to the
        /// <see cref="AddErrorBar(string,IPointList,Color)"/> method.</returns>
        public ErrorBarItem AddErrorBar( string label, IPointList points, Color color )
        {
            ErrorBarItem curve = new ErrorBarItem( label, points, color );
            _curveList.Add( curve );

            return curve;
        }
开发者ID:cliffton2008,项目名称:JNMAutoTrader_Capital,代码行数:24,代码来源:GraphPane.cs

示例15: AddStick

        /// <summary>
        /// Add a stick graph (<see cref="StickItem"/> object) to the plot with
        /// the given data points (<see cref="IPointList"/>) and properties.
        /// This is simplified way to add curves without knowledge of the
        /// <see cref="CurveList"/> class.  An alternative is to use
        /// the <see cref="ZedGraph.CurveList" /> Add() method.
        /// </summary>
        /// <param name="label">The text label (string) for the curve that will be
        /// used as a <see cref="Legend"/> entry.</param>
        /// <param name="points">A <see cref="IPointList"/> of double precision value pairs that define
        /// the X and Y values for this curve</param>
        /// <param name="color">The color to used for the curve line,
        /// symbols, etc.</param>
        /// <returns>A <see cref="CurveItem"/> class for the newly created curve.
        /// This can then be used to access all of the curve properties that
        /// are not defined as arguments to the
        /// <see cref="AddStick(string,IPointList,Color)"/> method.</returns>
        public StickItem AddStick( string label, IPointList points, Color color )
        {
            StickItem curve = new StickItem( label, points, color );
            _curveList.Add( curve );

            return curve;
        }
开发者ID:cliffton2008,项目名称:JNMAutoTrader_Capital,代码行数:24,代码来源:GraphPane.cs


注:本文中的IPointList类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。