示例#1
0
 /// <overloads>
 /// Constructors for the <see cref="LineObj"/> object
 /// </overloads>
 /// <summary>
 /// Initializes a new instance of the <see cref="LineObj"/> class. 
 /// A constructor that allows the position, color, and size of the
 /// <see cref="LineObj"/> to be pre-specified.
 /// </summary>
 /// <param name="color">
 /// An arbitrary <see cref="System.Drawing.Color"/> specification for the arrow
 /// </param>
 /// <param name="x1">
 /// The x position of the starting point that defines the line.  The units of this position are specified by the
 /// <see cref="Location.CoordinateFrame"/> property.
 /// </param>
 /// <param name="y1">
 /// The y position of the starting point that defines the line.  The units of this position are specified by the
 /// <see cref="Location.CoordinateFrame"/> property.
 /// </param>
 /// <param name="x2">
 /// The x position of the ending point that defines the line.  The units of this position are specified by the
 /// <see cref="Location.CoordinateFrame"/> property.
 /// </param>
 /// <param name="y2">
 /// The y position of the ending point that defines the line.  The units of this position are specified by the
 /// <see cref="Location.CoordinateFrame"/> property.
 /// </param>
 public LineObj(Color color, double x1, double y1, double x2, double y2)
     : base(x1, y1, x2 - x1, y2 - y1)
 {
     this._line = new LineBase(color);
     this.Location.AlignH = AlignH.Left;
     this.Location.AlignV = AlignV.Top;
 }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LineObj"/> class. 
 /// The Copy Constructor
 /// </summary>
 /// <param name="rhs">
 /// The <see cref="LineObj"/> object from which to copy
 /// </param>
 public LineObj(LineObj rhs)
     : base(rhs)
 {
     this._line = new LineBase(rhs._line);
 }
示例#3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="LineObj"/> 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 LineObj(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._line = (LineBase)info.GetValue("line", typeof(LineBase));
        }
示例#4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="LineBase"/> class. 
        /// The Copy Constructor
        /// </summary>
        /// <param name="rhs">
        /// The LineBase object from which to copy
        /// </param>
        public LineBase(LineBase rhs)
        {
            this._width = rhs._width;
            this._style = rhs._style;
            this._dashOn = rhs._dashOn;
            this._dashOff = rhs._dashOff;

            this._isVisible = rhs._isVisible;
            this._color = rhs._color;

            this._isAntiAlias = rhs._isAntiAlias;
            this._gradientFill = new Fill(rhs._gradientFill);
        }