Пример #1
0
        /// <summary>
        /// Copy constructor.
        /// </summary>
        /// <param name="rhs">The <see c_ref="MinorTic" /> that is to be copied.</param>
        public MinorTic(MinorTic rhs)
        {
            _size     = rhs._size;
            _color    = rhs._color;
            _penWidth = rhs._penWidth;

            IsOutside       = rhs.IsOutside;
            IsInside        = rhs.IsInside;
            IsOpposite      = rhs.IsOpposite;
            _isCrossOutside = rhs._isCrossOutside;
            _isCrossInside  = rhs._isCrossInside;
        }
Пример #2
0
		/// <summary>
		/// Copy constructor.
		/// </summary>
		/// <param name="rhs">The <see c_ref="MinorTic" /> that is to be copied.</param>
		public MinorTic( MinorTic rhs )
		{
			_size = rhs._size;
			_color = rhs._color;
			_penWidth = rhs._penWidth;

			IsOutside = rhs.IsOutside;
			IsInside = rhs.IsInside;
			IsOpposite = rhs.IsOpposite;
			_isCrossOutside = rhs._isCrossOutside;
			_isCrossInside = rhs._isCrossInside;
		}
Пример #3
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 Axis( 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" );

			_cross = info.GetDouble( "cross" );
			_crossAuto = info.GetBoolean( "crossAuto" );

			_majorTic = (MajorTic)info.GetValue( "MajorTic", typeof( MajorTic ) );
			_minorTic = (MinorTic)info.GetValue( "MinorTic", typeof( MinorTic ) );
			_majorGrid = (MajorGrid)info.GetValue( "majorGrid", typeof( MajorGrid ) );
			_minorGrid = (MinorGrid)info.GetValue( "minorGrid", typeof( MinorGrid ) );

			_isVisible = info.GetBoolean( "isVisible" );

			_title = (AxisLabel) info.GetValue( "title", typeof( AxisLabel ) );

			_minSpace = info.GetSingle( "minSpace" );

			_color = (Color)info.GetValue( "color", typeof( Color ) );

			_isAxisSegmentVisible = info.GetBoolean( "isAxisSegmentVisible" );


			_axisGap = info.GetSingle( "axisGap" );

			_scale = (Scale)info.GetValue( "scale", typeof( Scale ) );
			_scale._ownerAxis = this;

		}
Пример #4
0
		/// <summary>
		/// The Copy Constructor.
		/// </summary>
		/// <param name="rhs">The Axis object from which to copy</param>
		public Axis( Axis rhs )
		{
			_scale = rhs._scale.Clone( this );

			_cross = rhs._cross;

			_crossAuto = rhs._crossAuto;

			_majorTic = rhs.MajorTic.Clone();
			_minorTic = rhs.MinorTic.Clone();

			_majorGrid = rhs._majorGrid.Clone();
			_minorGrid = rhs._minorGrid.Clone();

			_isVisible = rhs.IsVisible;

			_isAxisSegmentVisible = rhs._isAxisSegmentVisible;

			_title = rhs.Title.Clone();

			_axisGap = rhs._axisGap;

			_minSpace = rhs.MinSpace;

			_color = rhs.Color;
		}
Пример #5
0
		/// <summary>
		/// Default constructor for <see c_ref="Axis"/> that sets all axis properties
		/// to default values as defined in the <see c_ref="Default"/> class.
		/// </summary>
		public Axis()
		{
			_scale = new LinearScale( this );

			_cross = 0.0;

			_crossAuto = true;

			_majorTic = new MajorTic();
			_minorTic = new MinorTic();

			_majorGrid = new MajorGrid();
			_minorGrid = new MinorGrid();

			_axisGap = Default.AxisGap;

			_minSpace = Default.MinSpace;
			_isVisible = true;

			_isAxisSegmentVisible = Default.IsAxisSegmentVisible;

			_title = new AxisLabel( "", Default.TitleFontFamily, Default.TitleFontSize,
					Default.TitleFontColor, Default.TitleFontBold,
					Default.TitleFontUnderline, Default.TitleFontItalic );
			_title.FontSpec.Fill = new Fill( Default.TitleFillColor, Default.TitleFillBrush,
					Default.TitleFillType );

			_title.FontSpec.Border.IsVisible = false;


			_color = Default.Color;

		}