Beispiel #1
0
        /// <summary>
        /// Copy constructor
        /// </summary>
        /// <param name="rhs">The source <see cref="MinorGrid" /> to be copied.</param>
        public MinorGrid(MinorGrid rhs)
        {
            _dashOn   = rhs._dashOn;
            _dashOff  = rhs._dashOff;
            _penWidth = rhs._penWidth;

            _isVisible = rhs._isVisible;

            _color = rhs._color;
        }
Beispiel #2
0
        /// <summary>
        /// Copy constructor
        /// </summary>
        /// <param name="rhs">The source <see cref="MinorGrid" /> to be copied.</param>
        public MinorGrid( MinorGrid rhs )
        {
            _dashOn = rhs._dashOn;
            _dashOff = rhs._dashOff;
            _penWidth = rhs._penWidth;

            _isVisible = rhs._isVisible;

            _color = rhs._color;
        }
Beispiel #3
0
        /// <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 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;
        }
Beispiel #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 = (AxisLabel) rhs.Title.Clone();

            _axisGap = rhs._axisGap;

            _minSpace = rhs.MinSpace;

            _color = rhs.Color;
        }
Beispiel #5
0
        /// <summary>
        /// Default constructor for <see cref="Axis"/> that sets all axis properties
        /// to default values as defined in the <see cref="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;
        }