/// <summary> /// Constructor for deserializing objects /// </summary> /// <param name="info">A <see cref="SerializationInfo"/> instance that defines the serialized data /// </param> /// <param name="context">A <see cref="StreamingContext"/> instance that contains the serialized data /// </param> protected ErrorBar( SerializationInfo info, StreamingContext context ) { // The schema value is just a file version parameter. You can use it to make future versions // backwards compatible as new member variables are added to classes int sch = info.GetInt32( "schema" ); _isVisible = info.GetBoolean( "isVisible" ); _color = (Color) info.GetValue( "color", typeof(Color) ); _penWidth = info.GetSingle( "penWidth" ); _symbol = (Symbol) info.GetValue( "symbol", typeof(Symbol) ); }
/// <summary> /// Default constructor that sets the /// <see cref="Color"/> as specified, and the remaining /// <see cref="ErrorBar"/> properties to default /// values as defined in the <see cref="Default"/> class. /// </summary> /// <param name="color">A <see cref="Color"/> value indicating /// the color of the symbol /// </param> public ErrorBar( Color color ) { _symbol = new Symbol( Default.Type, color ); _symbol.Size = Default.Size; _color = color; _penWidth = Default.PenWidth; _isVisible = Default.IsVisible; }
/// <summary> /// The Copy Constructor /// </summary> /// <param name="rhs">The <see cref="ErrorBar"/> object from which to copy</param> public ErrorBar( ErrorBar rhs ) { _color = rhs.Color; _isVisible = rhs.IsVisible; _penWidth = rhs.PenWidth; _symbol = rhs.Symbol.Clone(); }
/// <summary> /// Create a new <see cref="LineItem"/>, specifying only the legend <see cref="CurveItem.Label" />. /// </summary> /// <param name="label">The _label that will appear in the legend.</param> public LineItem( string label ) : base(label) { _symbol = new Symbol(); _line = new Line(); }
/// <summary> /// Constructor for deserializing objects /// </summary> /// <param name="info">A <see cref="SerializationInfo"/> instance that defines the serialized data /// </param> /// <param name="context">A <see cref="StreamingContext"/> instance that contains the serialized data /// </param> protected LineItem( SerializationInfo info, StreamingContext context ) : base(info, context) { // The schema value is just a file version parameter. You can use it to make future versions // backwards compatible as new member variables are added to classes int sch = info.GetInt32( "schema2" ); _symbol = (Symbol) info.GetValue( "symbol", typeof(Symbol) ); _line = (Line) info.GetValue( "line", typeof(Line) ); }
/// <summary> /// The Copy Constructor /// </summary> /// <param name="rhs">The <see cref="LineItem"/> object from which to copy</param> public LineItem( LineItem rhs ) : base(rhs) { _symbol = new Symbol( rhs.Symbol ); _line = new Line( rhs.Line ); }
/// <summary> /// Create a new <see cref="LineItem"/> 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="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="LineBase.IsVisible"/>).</param> public LineItem( string label, IPointList points, Color color, SymbolType symbolType, float lineWidth ) : base(label, points) { _line = new Line( color ); if ( lineWidth == 0 ) _line.IsVisible = false; else _line.Width = lineWidth; _symbol = new Symbol( symbolType, color ); }
/// <summary> /// The Copy Constructor /// </summary> /// <param name="rhs">The Symbol object from which to copy</param> public Symbol( Symbol rhs ) { _size = rhs.Size; _type = rhs.Type; _isAntiAlias = rhs._isAntiAlias; _isVisible = rhs.IsVisible; _fill = rhs.Fill.Clone(); _border = rhs.Border.Clone(); if ( rhs.UserSymbol != null ) _userSymbol = rhs.UserSymbol.Clone() as GraphicsPath; else _userSymbol = null; }