/// <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 JapaneseCandleStick( 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" );

            _risingFill = (Fill)info.GetValue( "risingFill", typeof( Fill ) );
            _fallingFill = (Fill)info.GetValue( "fallingFill", typeof( Fill ) );
            _risingBorder = (Border)info.GetValue( "risingBorder", typeof( Border ) );
            _fallingBorder = (Border)info.GetValue( "fallingBorder", typeof( Border ) );

            if ( schema2 >= 11 )
                _fallingColor = (Color) info.GetValue( "fallingColor", typeof( Color ) );
        }
Beispiel #2
0
        /// <summary>
        /// The Copy Constructor
        /// </summary>
        /// <param name="rhs">The FontSpec object from which to copy</param>
        public FontSpec( FontSpec rhs )
        {
            _fontColor = rhs.FontColor;
            _family = rhs.Family;
            _isBold = rhs.IsBold;
            _isItalic = rhs.IsItalic;
            _isUnderline = rhs.IsUnderline;
            _fill = rhs.Fill.Clone();
            _border = rhs.Border.Clone();
            _isAntiAlias = rhs._isAntiAlias;

            _stringAlignment = rhs.StringAlignment;
            _angle = rhs.Angle;
            _size = rhs.Size;

            _isDropShadow = rhs._isDropShadow;
            _dropShadowColor = rhs._dropShadowColor;
            _dropShadowAngle = rhs._dropShadowAngle;
            _dropShadowOffset = rhs._dropShadowOffset;

            _scaledSize = rhs._scaledSize;
            Remake( 1.0F, _size, ref _scaledSize, ref _font );
        }
Beispiel #3
0
 /// <summary>
 /// The Copy Constructor
 /// </summary>
 /// <param name="rhs">The Border object from which to copy</param>
 public Border( Border rhs )
     : base(rhs)
 {
     _inflateFactor = rhs._inflateFactor;
 }
Beispiel #4
0
 /// <summary>
 /// Create a new <see cref="GasGaugeRegion"/>
 /// </summary>
 /// <param name="label">The value associated with this <see cref="GasGaugeRegion"/> instance.</param>
 /// <param name="color">The display color for this <see cref="GasGaugeRegion"/> instance.</param>
 /// <param name="minVal">The minimum value of this <see cref="GasGaugeNeedle"/>.</param>
 /// <param name="maxVal">The maximum value of this <see cref="GasGaugeNeedle"/>.</param>
 public GasGaugeRegion( string label, double minVal, double maxVal, Color color )
     : base(label)
 {
     MinValue = minVal;
     MaxValue = maxVal;
     RegionColor = color;
     StartAngle = 0f;
     SweepAngle = 0f;
     _border = new Border( Default.BorderColor, Default.BorderWidth );
     _labelDetail = new TextObj();
     _labelDetail.FontSpec.Size = Default.FontSize;
     _slicePath = null;
 }
Beispiel #5
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 GasGaugeRegion( 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" );

            _labelDetail = (TextObj)info.GetValue( "labelDetail", typeof( TextObj ) );
            _fill = (Fill)info.GetValue( "fill", typeof( Fill ) );
            _border = (Border)info.GetValue( "border", typeof( Border ) );
            _color = (Color)info.GetValue( "color", typeof( Color ) );
            _minValue = info.GetDouble( "minValue" );
            _maxValue = info.GetDouble( "maxValue" );
            _startAngle = (float)info.GetDouble( "startAngle" );
            _sweepAngle = (float)info.GetDouble( "sweepAngle" );
            _boundingRectangle = (RectangleF)info.GetValue( "boundingRectangle", typeof( RectangleF ) );
            _slicePath = (GraphicsPath)info.GetValue( "slicePath", typeof( GraphicsPath ) );
        }
Beispiel #6
0
 /// <summary>
 /// Default constructor that sets the 
 /// <see cref="Color"/> as specified, and the remaining
 /// <see cref="Bar"/> properties to default
 /// values as defined in the <see cref="Default"/> class.
 /// The specified color is only applied to the
 /// <see cref="ZedGraph.Fill.Color"/>, and the <see cref="ZedGraph.LineBase.Color"/>
 /// will be defaulted.
 /// </summary>
 /// <param name="color">A <see cref="Color"/> value indicating
 /// the <see cref="ZedGraph.Fill.Color"/>
 /// of the Bar.
 /// </param>
 public Bar( Color color )
 {
     _border = new Border( Default.IsBorderVisible, Default.BorderColor, Default.BorderWidth );
     _fill = new Fill( color.IsEmpty ? Default.FillColor : color,
                             Default.FillBrush, Default.FillType );
 }
Beispiel #7
0
        /// <summary>
        /// The Copy Constructor
        /// </summary>
        /// <param name="rhs">The <see cref="PaneBase"/> object from which to copy</param>
        public PaneBase( PaneBase rhs )
        {
            // copy over all the value types
            _isFontsScaled = rhs._isFontsScaled;
            _isPenWidthScaled = rhs._isPenWidthScaled;

            _titleGap = rhs._titleGap;
            _baseDimension = rhs._baseDimension;
            _margin = rhs._margin.Clone();
            _rect = rhs._rect;

            // Copy the reference types by cloning
            _fill = rhs._fill.Clone();
            _border = rhs._border.Clone();
            _title = rhs._title.Clone();

            _legend = rhs.Legend.Clone();
            _title = rhs._title.Clone();
            _graphObjList = rhs._graphObjList.Clone();

            if ( rhs._tag is ICloneable )
                _tag = ((ICloneable) rhs._tag).Clone();
            else
                _tag = rhs._tag;
        }
Beispiel #8
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 PieItem( 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" );

            _displacement = info.GetDouble( "displacement" );
            _labelDetail = (TextObj)info.GetValue( "labelDetail", typeof( TextObj ) );
            _fill = (Fill)info.GetValue( "fill", typeof( Fill ) );
            _border = (Border)info.GetValue( "border", typeof( Border ) );
            _pieValue = info.GetDouble( "pieValue" );
            _labelType = (PieLabelType)info.GetValue( "labelType", typeof( PieLabelType ) );
            _intersectionPoint = (PointF)info.GetValue( "intersectionPoint", typeof( PointF ) );
            _boundingRectangle = (RectangleF)info.GetValue( "boundingRectangle", typeof( RectangleF ) );
            _pivotPoint = (PointF)info.GetValue( "pivotPoint", typeof( PointF ) );
            _endPoint = (PointF)info.GetValue( "endPoint", typeof( PointF ) );
            // _slicePath = (GraphicsPath)info.GetValue( "slicePath", typeof( GraphicsPath ) );
            _startAngle = (float)info.GetDouble( "startAngle" );
            _sweepAngle = (float)info.GetDouble( "sweepAngle" );
            _midAngle = (float)info.GetDouble( "midAngle" );
            _labelStr = info.GetString( "labelStr" );
            _valueDecimalDigits = info.GetInt32( "valueDecimalDigits" );
            _percentDecimalDigits = info.GetInt32( "percentDecimalDigits" );
        }
Beispiel #9
0
        /// <summary>
        /// Default constructor that sets all <see cref="Legend"/> properties to default
        /// values as defined in the <see cref="Default"/> class.
        /// </summary>
        public Legend()
        {
            _position = Default.Position;
            _isHStack = Default.IsHStack;
            _isVisible = Default.IsVisible;
            this.Location = new Location( 0, 0, CoordType.PaneFraction );

            _fontSpec = new FontSpec( Default.FontFamily, Default.FontSize,
                Default.FontColor, Default.FontBold,
                Default.FontItalic, Default.FontUnderline,
                Default.FontFillColor, Default.FontFillBrush,
                Default.FontFillType );
            _fontSpec.Border.IsVisible = false;

            _border = new Border( Default.IsBorderVisible, Default.BorderColor, Default.BorderWidth );
            _fill = new Fill( Default.FillColor, Default.FillBrush, Default.FillType );

            _gap = Default.Gap;

            _isReverse = Default.IsReverse;

            _isShowLegendSymbols = Default.IsShowLegendSymbols;
        }
Beispiel #10
0
 /// <summary>
 /// The Copy Constructor
 /// </summary>
 /// <param name="ggn">The <see cref="GasGaugeNeedle"/> object from which to copy</param>
 public GasGaugeNeedle( GasGaugeNeedle ggn )
     : base(ggn)
 {
     NeedleValue = ggn.NeedleValue;
     NeedleColor = ggn.NeedleColor;
     NeedleWidth = ggn.NeedleWidth;
     SweepAngle = ggn.SweepAngle;
     _border = ggn.Border.Clone();
     _labelDetail = ggn.LabelDetail.Clone();
     _labelDetail.FontSpec.Size = ggn.LabelDetail.FontSpec.Size;
 }
Beispiel #11
0
 /// <summary>
 /// Create a new <see cref="PieItem"/>.
 /// </summary>
 /// <param name="pieValue">The value associated with this <see cref="PieItem"/> instance.</param>
 /// <param name="color">The display color for this <see cref="PieItem"/> instance.</param>
 /// <param name="displacement">The amount this <see cref="PieItem"/>  instance will be 
 /// displaced from the center point.</param>
 /// <param name="label">Text label for this <see cref="PieItem"/> instance.</param>
 public PieItem( double pieValue, Color color, double displacement, string label )
     : base(label)
 {
     _pieValue = pieValue;
     _fill = new Fill( color.IsEmpty ? _rotator.NextColor : color );
     _displacement = displacement;
     _border = new Border( Default.BorderColor, Default.BorderWidth );
     _labelDetail = new TextObj();
     _labelDetail.FontSpec.Size = Default.FontSize;
     _labelType = Default.LabelType;
     _valueDecimalDigits = Default.ValueDecimalDigits;
     _percentDecimalDigits = Default.PercentDecimalDigits;
     _slicePath = null;
 }
Beispiel #12
0
 /// <summary>
 /// Create a new <see cref="GasGaugeNeedle"/>
 /// </summary>
 /// <param name="label">The value associated with this <see cref="GasGaugeNeedle"/>
 /// instance.</param>
 /// <param name="color">The display color for this <see cref="GasGaugeNeedle"/>
 /// instance.</param>
 /// <param name="val">The value of this <see cref="GasGaugeNeedle"/>.</param>
 public GasGaugeNeedle( string label, double val, Color color )
     : base(label)
 {
     NeedleValue = val;
     NeedleColor = color;
     NeedleWidth = Default.NeedleWidth;
     SweepAngle = 0f;
     _border = new Border( Default.BorderColor, Default.BorderWidth );
     _labelDetail = new TextObj();
     _labelDetail.FontSpec.Size = Default.FontSize;
     _slicePath = null;
 }
        /// <summary>
        /// Default constructor that sets all <see cref="JapaneseCandleStick"/> properties to
        /// default values as defined in the <see cref="Default"/> class.
        /// </summary>
        public JapaneseCandleStick()
            : base()
        {
            _risingFill = new Fill( Default.RisingColor );
            _fallingFill = new Fill( Default.FallingColor );

            _risingBorder = new Border( Default.RisingBorder, LineBase.Default.Width );
            _fallingBorder = new Border( Default.FallingBorder, LineBase.Default.Width );

            _fallingColor = Default.FallingColor;
        }
        /// <summary>
        /// Draw the <see cref="JapaneseCandleStick"/> to the specified <see cref="Graphics"/>
        /// device at the specified location.
        /// </summary>
        /// <param name="g">
        /// A graphic device object to be drawn into.  This is normally e.Graphics from the
        /// PaintEventArgs argument to the Paint() method.
        /// </param>
        /// <param name="pane">
        /// A reference to the <see cref="GraphPane"/> object that is the parent or
        /// owner of this object.
        /// </param>
        /// <param name="isXBase">boolean value that indicates if the "base" axis for this
        /// <see cref="JapaneseCandleStick"/> is the X axis.  True for an <see cref="XAxis"/> base,
        /// false for a <see cref="YAxis"/> or <see cref="Y2Axis"/> base.</param>
        /// <param name="pixBase">The independent axis position of the center of the candlestick in
        /// pixel units</param>
        /// <param name="pixHigh">The high value position of the candlestick in
        /// pixel units</param>
        /// <param name="pixLow">The low value position of the candlestick in
        /// pixel units</param>
        /// <param name="pixOpen">The opening value position of the candlestick in
        /// pixel units</param>
        /// <param name="pixClose">The closing value position of the candlestick in
        /// pixel units</param>
        /// <param name="halfSize">The scaled width of one-half of a bar, in pixels</param>
        /// <param name="scaleFactor">
        /// The scaling factor for the features of the graph based on the <see cref="PaneBase.BaseDimension"/>.  This
        /// scaling factor is calculated by the <see cref="PaneBase.CalcScaleFactor"/> method.  The scale factor
        /// represents a linear multiple to be applied to font sizes, symbol sizes, etc.</param>
        /// <param name="pen">A pen with the <see cref="Color"/> attribute for this
        /// <see cref="JapaneseCandleStick"/></param>
        /// <param name="fill">
        /// The <see cref="Fill" /> instance to be used for filling this
        /// <see cref="JapaneseCandleStick" />
        /// </param>
        /// <param name="border">The <see cref="Border" /> instance to be used for drawing the
        /// border around the <see cref="JapaneseCandleStick" /> filled box</param>
        /// <param name="pt">The <see cref="PointPair" /> to be used for determining the
        /// <see cref="Fill" />, just in case it's a <see cref="FillType.GradientByX" />,
        /// <see cref="FillType.GradientByY" />, or
        /// <see cref="FillType.GradientByZ" /> <see cref="FillType" /></param>
        public void Draw( Graphics g, GraphPane pane, bool isXBase,
								float pixBase, float pixHigh, float pixLow,
								float pixOpen, float pixClose, float halfSize,
								float scaleFactor, Pen pen, Fill fill, Border border, PointPair pt )
        {
            //float halfSize = (int) ( _size * scaleFactor / 2.0f + 0.5f );

            if ( pixBase != PointPair.Missing && Math.Abs( pixLow ) < 1000000 &&
                        Math.Abs( pixHigh ) < 1000000)
            {
                RectangleF rect;
                if ( isXBase )
                {
                    rect = new RectangleF( pixBase - halfSize, Math.Min( pixOpen, pixClose ),
                                halfSize * 2.0f, Math.Abs( pixOpen - pixClose ) );

                    g.DrawLine( pen, pixBase, pixHigh, pixBase, pixLow );
                }
                else
                {
                    rect = new RectangleF( Math.Min( pixOpen, pixClose ), pixBase - halfSize,
                                Math.Abs( pixOpen - pixClose ), halfSize * 2.0f );

                    g.DrawLine( pen, pixHigh, pixBase, pixLow, pixBase );
                }

                if ( _isOpenCloseVisible && Math.Abs( pixOpen ) < 1000000 &&
                            Math.Abs( pixClose ) < 1000000 )
                {
                    if ( rect.Width == 0 )
                        rect.Width = 1;
                    if ( rect.Height == 0 )
                        rect.Height = 1;

                    fill.Draw( g, rect, pt );
                    border.Draw( g, pane, scaleFactor, rect );
                }
            }
        }
Beispiel #15
0
 /// <summary>
 /// Copy constructor
 /// </summary>
 /// <param name="rhs">The source <see cref="Chart" /> to be copied.</param>
 public Chart( Chart rhs )
 {
     _border = rhs._border.Clone();
     _fill = rhs._fill.Clone();
     _rect = rhs._rect;
     _isRectAuto = rhs._isRectAuto;
 }
Beispiel #16
0
        /// <summary>
        /// The Copy Constructor
        /// </summary>
        /// <param name="rhs">The XAxis object from which to copy</param>
        public Legend( Legend rhs )
        {
            _rect = rhs.Rect;
            _position = rhs.Position;
            _isHStack = rhs.IsHStack;
            _isVisible = rhs.IsVisible;

            _location = rhs.Location;
            _border = rhs.Border.Clone();
            _fill = rhs.Fill.Clone();

            _fontSpec = rhs.FontSpec.Clone();

            _gap = rhs._gap;

            _isReverse = rhs._isReverse;

            _isShowLegendSymbols = rhs._isShowLegendSymbols;
        }
Beispiel #17
0
 /// <summary>
 /// The Copy Constructor
 /// </summary>
 /// <param name="rhs">The Bar object from which to copy</param>
 public Bar( Bar rhs )
 {
     _border = (Border) rhs.Border.Clone();
     _fill = (Fill) rhs.Fill.Clone();
 }
Beispiel #18
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 Legend( 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" );

            _position = (LegendPos)info.GetValue( "position", typeof( LegendPos ) );
            _isHStack = info.GetBoolean( "isHStack" );
            _isVisible = info.GetBoolean( "isVisible" );
            _fill = (Fill)info.GetValue( "fill", typeof( Fill ) );
            _border = (Border)info.GetValue( "border", typeof( Border ) );
            _fontSpec = (FontSpec)info.GetValue( "fontSpec", typeof( FontSpec ) );
            _location = (Location)info.GetValue( "location", typeof( Location ) );

            _gap = info.GetSingle( "gap" );

            if ( schema >= 11 )
                _isReverse = info.GetBoolean( "isReverse" );

            if ( schema >= 12 )
                _isShowLegendSymbols = info.GetBoolean( "isShowLegendSymbols" );
        }
Beispiel #19
0
        /// <summary>
        /// Default constructor for the <see cref="PaneBase"/> class.  Specifies the <see cref="Title"/> of
        /// the <see cref="PaneBase"/>, and the size of the <see cref="Rect"/>.
        /// </summary>
        public PaneBase( string title, RectangleF paneRect )
        {
            _rect = paneRect;

            _legend = new Legend();

            _baseDimension = Default.BaseDimension;
            _margin = new Margin();
            _titleGap = Default.TitleGap;

            _isFontsScaled = Default.IsFontsScaled;
            _isPenWidthScaled = Default.IsPenWidthScaled;
            _fill = new Fill( Default.FillColor );
            _border = new Border( Default.IsBorderVisible, Default.BorderColor,
                Default.BorderPenWidth );

            _title = new GapLabel( title, Default.FontFamily,
                Default.FontSize, Default.FontColor, Default.FontBold,
                Default.FontItalic, Default.FontUnderline );
            _title._fontSpec.Fill.IsVisible = false;
            _title._fontSpec.Border.IsVisible = false;

            _graphObjList = new GraphObjList();

            _tag = null;
        }
Beispiel #20
0
 /// <summary>
 /// Default constructor that sets the <see cref="SymbolType"/> and
 /// <see cref="Color"/> as specified, and the remaining
 /// <see cref="Symbol"/> properties to default
 /// values as defined in the <see cref="Default"/> class.
 /// </summary>
 /// <param name="type">A <see cref="SymbolType"/> enum value
 /// indicating the shape of the symbol</param>
 /// <param name="color">A <see cref="Color"/> value indicating
 /// the color of the symbol
 /// </param>
 public Symbol( SymbolType type, Color color )
 {
     _size = Default.Size;
     _type = type;
     _isAntiAlias = Default.IsAntiAlias;
     _isVisible = Default.IsVisible;
     _border = new Border( Default.IsBorderVisible, color, Default.PenWidth );
     _fill = new Fill( color, Default.FillBrush, Default.FillType );
     _userSymbol = null;
 }
Beispiel #21
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 PaneBase( 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" );

            _rect = (RectangleF) info.GetValue( "rect", typeof(RectangleF) );
            _legend = (Legend) info.GetValue( "legend", typeof(Legend) );
            _title = (GapLabel) info.GetValue( "title", typeof(GapLabel) );
            //this.isShowTitle = info.GetBoolean( "isShowTitle" );
            _isFontsScaled = info.GetBoolean( "isFontsScaled" );
            _isPenWidthScaled = info.GetBoolean( "isPenWidthScaled" );
            //this.fontSpec = (FontSpec) info.GetValue( "fontSpec" , typeof(FontSpec) );
            _titleGap = info.GetSingle( "titleGap" );
            _fill = (Fill) info.GetValue( "fill", typeof(Fill) );
            _border = (Border) info.GetValue( "border", typeof(Border) );
            _baseDimension = info.GetSingle( "baseDimension" );
            _margin = (Margin)info.GetValue( "margin", typeof( Margin ) );
            _graphObjList = (GraphObjList) info.GetValue( "graphObjList", typeof(GraphObjList) );

            _tag = info.GetValue( "tag", typeof(object) );
        }
Beispiel #22
0
        /// <summary>
        /// The Copy Constructor
        /// </summary>
        /// <param name="rhs">The Symbol object from which to copy</param>
        public Symbol( Symbol rhs )
        {
            _size = rhs.Size;
            _type = rhs.Type;
            _isAntiAlias = rhs._isAntiAlias;
            _isVisible = rhs.IsVisible;
            _fill = rhs.Fill.Clone();
            _border = rhs.Border.Clone();

            if ( rhs.UserSymbol != null )
                _userSymbol = rhs.UserSymbol.Clone() as GraphicsPath;
            else
                _userSymbol = null;
        }
Beispiel #23
0
 /// <summary>
 /// The Copy Constructor
 /// </summary>
 /// <param name="ggr">The <see cref="GasGaugeRegion"/> object from which to copy</param>
 public GasGaugeRegion( GasGaugeRegion ggr )
     : base(ggr)
 {
     _minValue = ggr._minValue;
     _maxValue = ggr._maxValue;
     _color = ggr._color;
     _startAngle = ggr._startAngle;
     _sweepAngle = ggr._sweepAngle;
     _border = ggr._border.Clone();
     _labelDetail = ggr._labelDetail.Clone();
 }
Beispiel #24
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 Symbol( 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" );

            _size = info.GetSingle( "size" );
            _type = (SymbolType) info.GetValue( "type", typeof(SymbolType) );
            _isAntiAlias = info.GetBoolean( "isAntiAlias" );
            _isVisible = info.GetBoolean( "isVisible" );
            _fill = (Fill) info.GetValue( "fill", typeof(Fill) );
            _border = (Border) info.GetValue( "border", typeof(Border) );

            if ( sch >= 11 )
                _userSymbol = (GraphicsPath)info.GetValue( "userSymbol", typeof( GraphicsPath ) );
            else
                _userSymbol = null;
        }
Beispiel #25
0
        private void Init( string family, float size, Color color, bool isBold,
			bool isItalic, bool isUnderline, Color fillColor, Brush fillBrush,
			FillType fillType )
        {
            _fontColor = color;
            _family = family;
            _isBold = isBold;
            _isItalic = isItalic;
            _isUnderline = isUnderline;
            _size = size;
            _angle = 0F;

            _isAntiAlias = Default.IsAntiAlias;
            _stringAlignment = Default.StringAlignment;
            _isDropShadow = Default.IsDropShadow;
            _dropShadowColor = Default.DropShadowColor;
            _dropShadowAngle = Default.DropShadowAngle;
            _dropShadowOffset = Default.DropShadowOffset;

            _fill = new Fill( fillColor, fillBrush, fillType );
            _border = new Border( true, Color.Black, 1.0F );

            _scaledSize = -1;
            Remake( 1.0F, _size, ref _scaledSize, ref _font );
        }
Beispiel #26
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 Chart( 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" );

            _rect = (RectangleF)info.GetValue( "rect", typeof( RectangleF ) );
            _fill = (Fill)info.GetValue( "fill", typeof( Fill ) );
            _border = (Border)info.GetValue( "border", typeof( Border ) );
            _isRectAuto = info.GetBoolean( "isRectAuto" );
        }
Beispiel #27
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 FontSpec( 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" );

            _fontColor = (Color)info.GetValue( "fontColor", typeof( Color ) );
            _family = info.GetString( "family" );
            _isBold = info.GetBoolean( "isBold" );
            _isItalic = info.GetBoolean( "isItalic" );
            _isUnderline = info.GetBoolean( "isUnderline" );
            _isAntiAlias = info.GetBoolean( "isAntiAlias" );

            _fill = (Fill)info.GetValue( "fill", typeof( Fill ) );
            _border = (Border)info.GetValue( "border", typeof( Border ) );
            _angle = info.GetSingle( "angle" );
            _stringAlignment = (StringAlignment)info.GetValue( "stringAlignment", typeof( StringAlignment ) );
            _size = info.GetSingle( "size" );

            _isDropShadow = info.GetBoolean( "isDropShadow" );
            _dropShadowColor = (Color)info.GetValue( "dropShadowColor", typeof( Color ) );
            _dropShadowAngle = info.GetSingle( "dropShadowAngle" );
            _dropShadowOffset = info.GetSingle( "dropShadowOffset" );

            _scaledSize = -1;
            Remake( 1.0F, _size, ref _scaledSize, ref _font );
        }
Beispiel #28
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 public Chart()
 {
     _isRectAuto = true;
     _border = new Border( Default.IsBorderVisible, Default.BorderColor, Default.BorderPenWidth );
     _fill = new Fill( Default.FillColor, Default.FillBrush, Default.FillType );
 }
Beispiel #29
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 BoxObj( 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" );

            _fill = (Fill) info.GetValue( "fill", typeof(Fill) );
            _border = (Border) info.GetValue( "border", typeof(Border) );
        }
        /// <summary>
        /// The Copy Constructor
        /// </summary>
        /// <param name="rhs">The <see cref="JapaneseCandleStick"/> object from which to copy</param>
        public JapaneseCandleStick( JapaneseCandleStick rhs )
            : base(rhs)
        {
            _risingFill = rhs._risingFill.Clone();
            _fallingFill = rhs._fallingFill.Clone();

            _risingBorder = rhs._risingBorder.Clone();
            _fallingBorder = rhs._fallingBorder.Clone();

            _fallingColor = rhs._fallingColor;
        }