/// <summary> /// Initializes a new instance of the <see cref="ErrorBar"/> class. /// 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) { this._symbol = new Symbol(Default.Type, color); this._symbol.Size = Default.Size; this._color = color; this._penWidth = Default.PenWidth; this._isVisible = Default.IsVisible; }
/// <summary> /// Initializes a new instance of the <see cref="LineItem"/> class. /// 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) { this._symbol = new Symbol(); this._line = new Line(); }
/// <summary> /// Initializes a new instance of the <see cref="LineItem"/> class. /// 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"); this._symbol = (Symbol)info.GetValue("symbol", typeof(Symbol)); this._line = (Line)info.GetValue("line", typeof(Line)); }
/// <summary> /// Initializes a new instance of the <see cref="LineItem"/> class. /// The Copy Constructor /// </summary> /// <param name="rhs"> /// The <see cref="LineItem"/> object from which to copy /// </param> public LineItem(LineItem rhs) : base(rhs) { this._symbol = new Symbol(rhs.Symbol); this._line = new Line(rhs.Line); }
/// <summary> /// Initializes a new instance of the <see cref="LineItem"/> class. /// 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) { this._line = new Line(color); if (lineWidth == 0) { this._line.IsVisible = false; } else { this._line.Width = lineWidth; } this._symbol = new Symbol(symbolType, color); }
/// <summary> /// Initializes a new instance of the <see cref="Symbol"/> class. /// The Copy Constructor /// </summary> /// <param name="rhs"> /// The Symbol object from which to copy /// </param> public Symbol(Symbol rhs) { this._size = rhs.Size; this._type = rhs.Type; this._isAntiAlias = rhs._isAntiAlias; this._isVisible = rhs.IsVisible; this._fill = rhs.Fill.Clone(); this._border = rhs.Border.Clone(); if (rhs.UserSymbol != null) { this._userSymbol = rhs.UserSymbol.Clone() as GraphicsPath; } else { this._userSymbol = null; } }
/// <summary> /// Initializes a new instance of the <see cref="ErrorBar"/> class. /// The Copy Constructor /// </summary> /// <param name="rhs"> /// The <see cref="ErrorBar"/> object from which to copy /// </param> public ErrorBar(ErrorBar rhs) { this._color = rhs.Color; this._isVisible = rhs.IsVisible; this._penWidth = rhs.PenWidth; this._symbol = rhs.Symbol.Clone(); }
/// <summary> /// Initializes a new instance of the <see cref="ErrorBar"/> class. /// 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"); this._isVisible = info.GetBoolean("isVisible"); this._color = (Color)info.GetValue("color", typeof(Color)); this._penWidth = info.GetSingle("penWidth"); this._symbol = (Symbol)info.GetValue("symbol", typeof(Symbol)); }