예제 #1
0
        public Scale(Scale rhs, Axis owner)
        {
            _ownerAxis = owner;

            _min       = rhs._min;
            _max       = rhs._max;
            _majorStep = rhs._majorStep;
            _minorStep = rhs._minorStep;
            _exponent  = rhs._exponent;
            _baseTic   = rhs._baseTic;

            _minAuto       = rhs._minAuto;
            _maxAuto       = rhs._maxAuto;
            _majorStepAuto = rhs._majorStepAuto;
            _minorStepAuto = rhs._minorStepAuto;
            _magAuto       = rhs._magAuto;
            _formatAuto    = rhs._formatAuto;

            _isMinLabelVisible = rhs._isMinLabelVisible;
            _isMaxLabelVisible = rhs._isMaxLabelVisible;

            _majorUnit = rhs._majorUnit;
            _minorUnit = rhs._minorUnit;

            _format = rhs._format;

            _align          = rhs._align;
            _alignH         = rhs._alignH;
            _alignHMaxLabel = rhs._alignHMaxLabel;
            _alignHMinLabel = rhs._alignHMinLabel;

            if (rhs._textLabels != null)
            {
                _textLabels = (string[])rhs._textLabels.Clone();
            }
            else
            {
                _textLabels = null;
            }
        }
예제 #2
0
파일: Scale.cs 프로젝트: sntree/ZedGraph
        /// <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 Scale( 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" );

            _min = info.GetDouble( "min" );
            _max = info.GetDouble( "max" );
            _majorStep = info.GetDouble( "majorStep" );
            _minorStep = info.GetDouble( "minorStep" );
            _exponent = info.GetDouble( "exponent" );
            _baseTic = info.GetDouble( "baseTic" );

            _minAuto = info.GetBoolean( "minAuto" );
            _maxAuto = info.GetBoolean( "maxAuto" );
            _majorStepAuto = info.GetBoolean( "majorStepAuto" );
            _minorStepAuto = info.GetBoolean( "minorStepAuto" );
            _magAuto = info.GetBoolean( "magAuto" );
            _formatAuto = info.GetBoolean( "formatAuto" );

            _minGrace = info.GetDouble( "minGrace" );
            _maxGrace = info.GetDouble( "maxGrace" );

            _mag = info.GetInt32( "mag" );

            _isReverse = info.GetBoolean( "isReverse" );
            _isPreventLabelOverlap = info.GetBoolean( "isPreventLabelOverlap" );
            _isUseTenPower = info.GetBoolean( "isUseTenPower" );

            _isVisible = true;
            _isVisible = info.GetBoolean( "isVisible" );

            _isSkipFirstLabel = info.GetBoolean( "isSkipFirstLabel" );
            _isSkipLastLabel = info.GetBoolean( "isSkipLastLabel" );
            _isSkipCrossLabel = info.GetBoolean( "isSkipCrossLabel" );

            _textLabels = (string[]) info.GetValue( "textLabels", typeof(string[]) );
            _format = info.GetString( "format" );

            _majorUnit = (DateUnit) info.GetValue( "majorUnit", typeof(DateUnit) );
            _minorUnit = (DateUnit) info.GetValue( "minorUnit", typeof(DateUnit) );

            _isLabelsInside = info.GetBoolean( "isLabelsInside" );
            _align = (AlignP)info.GetValue( "align", typeof( AlignP ) );
            if ( schema >= 11 )
                _alignH = (AlignH)info.GetValue( "alignH", typeof( AlignH ) );

            _fontSpec = (FontSpec)info.GetValue( "fontSpec", typeof( FontSpec ) );
            _labelGap = info.GetSingle( "labelGap" );
        }
예제 #3
0
파일: Scale.cs 프로젝트: sntree/ZedGraph
        /// <summary>
        /// Copy Constructor.  Create a new <see cref="Scale" /> object based on the specified
        /// existing one.
        /// </summary>
        /// <param name="rhs">The <see cref="Scale" /> object to be copied.</param>
        /// <param name="owner">The <see cref="Axis" /> object that will own the
        /// new instance of <see cref="Scale" /></param>
        public Scale( Scale rhs, Axis owner )
        {
            _ownerAxis = owner;

            _min = rhs._min;
            _max = rhs._max;
            _majorStep = rhs._majorStep;
            _minorStep = rhs._minorStep;
            _exponent = rhs._exponent;
            _baseTic = rhs._baseTic;

            _minAuto = rhs._minAuto;
            _maxAuto = rhs._maxAuto;
            _majorStepAuto = rhs._majorStepAuto;
            _minorStepAuto = rhs._minorStepAuto;
            _magAuto = rhs._magAuto;
            _formatAuto = rhs._formatAuto;

            _minGrace = rhs._minGrace;
            _maxGrace = rhs._maxGrace;

            _mag = rhs._mag;

            _isUseTenPower = rhs._isUseTenPower;
            _isReverse = rhs._isReverse;
            _isPreventLabelOverlap = rhs._isPreventLabelOverlap;
            _isVisible = rhs._isVisible;
            _isSkipFirstLabel = rhs._isSkipFirstLabel;
            _isSkipLastLabel = rhs._isSkipLastLabel;
            _isSkipCrossLabel = rhs._isSkipCrossLabel;

            _majorUnit = rhs._majorUnit;
            _minorUnit = rhs._minorUnit;

            _format = rhs._format;

            _isLabelsInside = rhs._isLabelsInside;
            _align = rhs._align;
            _alignH = rhs._alignH;

            _fontSpec = (FontSpec) rhs._fontSpec.Clone();

            _labelGap = rhs._labelGap;

            if ( rhs._textLabels != null )
                _textLabels = (string[])rhs._textLabels.Clone();
            else
                _textLabels = null;
        }
예제 #4
0
파일: Scale.cs 프로젝트: sntree/ZedGraph
        /// <summary>
        /// Basic constructor -- requires that the <see cref="Scale" /> object be intialized with
        /// a pre-existing owner <see cref="Axis" />.
        /// </summary>
        /// <param name="ownerAxis">The <see cref="Axis" /> object that is the owner of this
        /// <see cref="Scale" /> instance.</param>
        public Scale( Axis ownerAxis )
        {
            _ownerAxis = ownerAxis;

            _min = 0.0;
            _max = 1.0;
            _majorStep = 0.1;
            _minorStep = 0.1;
            _exponent = 1.0;
            _mag = 0;
            _baseTic = PointPair.Missing;

            _minGrace = Default.MinGrace;
            _maxGrace = Default.MaxGrace;

            _minAuto = true;
            _maxAuto = true;
            _majorStepAuto = true;
            _minorStepAuto = true;
            _magAuto = true;
            _formatAuto = true;

            _isReverse = Default.IsReverse;
            _isUseTenPower = true;
            _isPreventLabelOverlap = true;
            _isVisible = true;
            _isSkipFirstLabel = false;
            _isSkipLastLabel = false;
            _isSkipCrossLabel = false;

            _majorUnit = DateUnit.Day;
            _minorUnit = DateUnit.Day;

            _format = null;
            _textLabels = null;

            _isLabelsInside = Default.IsLabelsInside;
            _align = Default.Align;
            _alignH = Default.AlignH;

            _fontSpec = new FontSpec(
                Default.FontFamily, Default.FontSize,
                Default.FontColor, Default.FontBold,
                Default.FontUnderline, Default.FontItalic,
                Default.FillColor, Default.FillBrush,
                Default.FillType );

            _fontSpec.Border.IsVisible = false;
            _labelGap = Default.LabelGap;
        }
예제 #5
0
파일: Axis.cs 프로젝트: InsungChoi/dddd
        /// <summary>
        /// The Copy Constructor.
        /// </summary>
        /// <param name="rhs">The Axis object from which to copy</param>
        public Axis( Axis rhs )
        {
            min = rhs.Min;
            max = rhs.Max;
            step = rhs.Step;
            minorStep = rhs.MinorStep;
            minAuto = rhs.MinAuto;
            maxAuto = rhs.MaxAuto;
            stepAuto = rhs.StepAuto;
            minorStepAuto = rhs.MinorStepAuto;
            numDecAuto = rhs.NumDecAuto;
            scaleMagAuto = rhs.ScaleMagAuto;
            scaleFormatAuto = rhs.ScaleFormatAuto;

            minGrace = rhs.MinGrace;
            maxGrace = rhs.MaxGrace;

            numDec = rhs.numDec;
            scaleMag = rhs.scaleMag;
            isVisible = rhs.IsVisible;
            isShowTitle = rhs.IsShowTitle;
            isShowGrid = rhs.IsShowGrid;
            isShowMinorGrid = rhs.IsShowMinorGrid;
            isZeroLine = rhs.IsZeroLine;
            isTic = rhs.IsTic;
            isInsideTic = rhs.IsInsideTic;
            isOppositeTic = rhs.IsOppositeTic;
            isMinorTic = rhs.IsMinorTic;
            isMinorInsideTic = rhs.IsMinorInsideTic;
            isMinorOppositeTic = rhs.IsMinorOppositeTic;
            isTicsBetweenLabels = rhs.IsTicsBetweenLabels;
            isUseTenPower = rhs.IsUseTenPower;

            isReverse = rhs.IsReverse;
            isOmitMag = rhs.IsOmitMag;
            title = rhs.Title;

            type = rhs.Type;

            majorUnit = rhs.MajorUnit;
            minorUnit = rhs.MinorUnit;

            if ( rhs.TextLabels != null )
                TextLabels = (string[]) rhs.TextLabels.Clone();
            else
                TextLabels = null;

            scaleFormat = rhs.scaleFormat;
            scaleAlign = rhs.scaleAlign;

            titleFontSpec = (FontSpec) rhs.TitleFontSpec.Clone();
            scaleFontSpec = (FontSpec) rhs.ScaleFontSpec.Clone();

            ticPenWidth = rhs.TicPenWidth;
            ticSize = rhs.TicSize;
            minorTicSize = rhs.MinorTicSize;
            gridDashOn = rhs.GridDashOn;
            gridDashOff = rhs.GridDashOff;
            gridPenWidth = rhs.GridPenWidth;
            minorGridDashOn = rhs.MinorGridDashOn;
            minorGridDashOff = rhs.MinorGridDashOff;
            minorGridPenWidth = rhs.MinorGridPenWidth;

            minSpace = rhs.MinSpace;

            color = rhs.Color;
            gridColor = rhs.GridColor;
            minorGridColor = rhs.MinorGridColor;
        }
예제 #6
0
파일: Axis.cs 프로젝트: InsungChoi/dddd
        /// <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()
        {
            this.min = 0.0;
            this.max = 1.0;
            this.step = 0.1;
            this.minorStep = 0.1;

            this.minGrace = Default.MinGrace;
            this.maxGrace = Default.MaxGrace;

            this.minAuto = true;
            this.maxAuto = true;
            this.stepAuto = true;
            this.minorStepAuto = true;
            this.numDecAuto = true;
            this.scaleMagAuto = true;
            this.scaleFormatAuto = true;

            this.numDec = 0;
            this.scaleMag = 0;

            this.ticSize = Default.TicSize;
            this.minorTicSize = Default.MinorTicSize;
            this.gridDashOn = Default.GridDashOn;
            this.gridDashOff = Default.GridDashOff;
            this.gridPenWidth = Default.GridPenWidth;
            this.minorGridDashOn = Default.MinorGridDashOn;
            this.minorGridDashOff = Default.MinorGridDashOff;
            this.minorGridPenWidth = Default.MinorGridPenWidth;

            this.minSpace = Default.MinSpace;
            this.isVisible = true;
            this.isShowTitle = Default.IsShowTitle;
            this.isShowGrid = Default.IsShowGrid;
            this.isShowMinorGrid = Default.IsShowMinorGrid;
            this.isReverse = Default.IsReverse;
            this.isOmitMag = false;
            this.isTic = Default.IsTic;
            this.isInsideTic = Default.IsInsideTic;
            this.isOppositeTic = Default.IsOppositeTic;
            this.isMinorTic = Default.IsMinorTic;
            this.isMinorInsideTic = Default.IsMinorInsideTic;
            this.isMinorOppositeTic = Default.IsMinorOppositeTic;
            this.isTicsBetweenLabels = false;
            this.isUseTenPower = true;

            this.type = Default.Type;
            this.title = "";
            this.TextLabels = null;
            this.scaleFormat = null;
            this.scaleAlign = Default.ScaleAlign;

            this.majorUnit = DateUnit.Year;
            this.minorUnit = DateUnit.Year;

            this.ticPenWidth = Default.TicPenWidth;
            this.color = Default.Color;
            this.gridColor = Default.GridColor;
            this.minorGridColor = Default.MinorGridColor;

            this.titleFontSpec = new FontSpec(
                    Default.TitleFontFamily, Default.TitleFontSize,
                    Default.TitleFontColor, Default.TitleFontBold,
                    Default.TitleFontUnderline, Default.TitleFontItalic,
                    Default.TitleFillColor, Default.TitleFillBrush,
                    Default.TitleFillType );

            this.titleFontSpec.Border.IsVisible = false;

            this.scaleFontSpec = new FontSpec(
                Default.ScaleFontFamily, Default.ScaleFontSize,
                Default.ScaleFontColor, Default.ScaleFontBold,
                Default.ScaleFontUnderline, Default.ScaleFontItalic,
                Default.ScaleFillColor, Default.ScaleFillBrush,
                Default.ScaleFillType );
            this.scaleFontSpec.Border.IsVisible = false;
        }