Exemple #1
0
 /// <overloads>Constructors for the <see c_ref="LineObj"/> object</overloads>
 /// <summary>
 /// A constructor that allows the position, color, and size of the
 /// <see c_ref="LineObj"/> to be pre-specified.
 /// </summary>
 /// <param name="color">An arbitrary <see c_ref="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 c_ref="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 c_ref="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 c_ref="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 c_ref="Location.CoordinateFrame"/> property.</param>
 public LineObj(Color color, double x1, double y1, double x2, double y2)
     : base(x1, y1, x2 - x1, y2 - y1)
 {
     _line           = new LineBase(color);
     Location.AlignH = AlignH.Left;
     Location.AlignV = AlignV.Top;
 }
Exemple #2
0
        /// <summary>
        /// Constructor for deserializing objects
        /// </summary>
        /// <param name="info">A <see c_ref="SerializationInfo"/> instance that defines the serialized data
        /// </param>
        /// <param name="context">A <see c_ref="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");

            _line = (LineBase)info.GetValue("line", typeof(LineBase));
        }
Exemple #3
0
        /// <summary>
        /// The Copy Constructor
        /// </summary>
        /// <param name="rhs">The LineBase object from which to copy</param>
        public LineBase(LineBase rhs)
        {
            _width   = rhs._width;
            _style   = rhs._style;
            _dashOn  = rhs._dashOn;
            _dashOff = rhs._dashOff;

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

            _isAntiAlias  = rhs._isAntiAlias;
            _gradientFill = new Fill(rhs._gradientFill);
        }
Exemple #4
0
		/// <overloads>Constructors for the <see c_ref="LineObj"/> object</overloads>
		/// <summary>
		/// A constructor that allows the position, color, and size of the
		/// <see c_ref="LineObj"/> to be pre-specified.
		/// </summary>
		/// <param name="color">An arbitrary <see c_ref="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 c_ref="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 c_ref="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 c_ref="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 c_ref="Location.CoordinateFrame"/> property.</param>
		public LineObj( Color color, double x1, double y1, double x2, double y2 )
			: base( x1, y1, x2 - x1, y2 - y1 )
		{
			_line = new LineBase( color );
			Location.AlignH = AlignH.Left;
			Location.AlignV = AlignV.Top;
		}
Exemple #5
0
		/// <summary>
		/// Constructor for deserializing objects
		/// </summary>
		/// <param name="info">A <see c_ref="SerializationInfo"/> instance that defines the serialized data
		/// </param>
		/// <param name="context">A <see c_ref="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" );

			_line = (LineBase)info.GetValue( "line", typeof( LineBase ) );
		}
Exemple #6
0
		/// <summary>
		/// The Copy Constructor
		/// </summary>
		/// <param name="rhs">The <see c_ref="LineObj"/> object from which to copy</param>
		public LineObj( LineObj rhs ) : base( rhs )
		{
			_line = new LineBase( rhs._line );
		}
Exemple #7
0
 /// <summary>
 /// The Copy Constructor
 /// </summary>
 /// <param name="rhs">The <see c_ref="LineObj"/> object from which to copy</param>
 public LineObj(LineObj rhs) : base(rhs)
 {
     _line = new LineBase(rhs._line);
 }
Exemple #8
0
		/// <summary>
		/// The Copy Constructor
		/// </summary>
		/// <param name="rhs">The LineBase object from which to copy</param>
		public LineBase( LineBase rhs )
		{
			_width = rhs._width;
			_style = rhs._style;
			_dashOn = rhs._dashOn;
			_dashOff = rhs._dashOff;

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

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