public void initChanel(Graphics g, Rectangle DrawArea, yAxis YAxis, xAxis XAxis, Point Origin) { _YAxis = YAxis; _XAxis = XAxis; _Origin = Origin; _DrawArea = DrawArea; _hDc = g; isFirstPoint = true; }
private void initAxis() { b = new Bitmap(this.Width, this.Height, System.Drawing.Imaging.PixelFormat.Format24bppRgb); g = Graphics.FromImage(b); g.Clear(_DrawBackColor); YAxis = new yAxis(g, new Rectangle(this.ClientRectangle.Left, this.ClientRectangle.Top, this.ClientRectangle.Width - _rightChanelNameWidth, this.ClientRectangle.Height), _linePen, origin, Height - 2 * origin.Y, _yMin, _yMax, _yPart, _yTitle, _lineFont, _PartLineFont, _lineColor, _IsMainNet, _IsMinorNet, _MainDashStyle, _MinorDashStyle, true); XAxis = new xAxis(g, new Rectangle(this.ClientRectangle.Left, this.ClientRectangle.Top, this.ClientRectangle.Width - _rightChanelNameWidth, this.ClientRectangle.Height), _linePen, origin, Width - RightChanelNameWidth - 2 * origin.X, _xMin, _xMax, _xPart, _xTitle, _lineFont, _PartLineFont, _lineColor, _IsMainNet, _IsMinorNet, _MainDashStyle, _MinorDashStyle); if (_isTwoYAxis) { YAxisRight = new yAxis(g, new Rectangle(this.ClientRectangle.Left, this.ClientRectangle.Top, this.ClientRectangle.Width - _rightChanelNameWidth, this.ClientRectangle.Height), _linePen, origin, Height - 2 * origin.Y, _yMinRight, _yMaxRight, _yPart, _yTitleRight, _lineFont, _PartLineFont, _lineColor, _IsMainNet, _IsMinorNet, _MainDashStyle, _MinorDashStyle, false); YAxisRight.Draw(); } YAxis.Draw(); XAxis.Draw(); }