private void DoDrawGrid(GraphicsEx g, Pen pen, RectF area) { foreach (var element in m_currentState.XPhysicalDashes) { float x = g.TransformX(element.X); float y = g.TransformY(element.Y); g.DrawLine(pen, x, y, x, 0); } foreach (var element in m_currentState.YPhysicalDashes) { float x = g.TransformX(element.X); float y = g.TransformY(element.Y); g.DrawLine(pen, 0, y, x, y); } }
private void DoDrawAxes(GraphicsEx g, Pen pen, Brush brush, RectF area) { float w = (float)this.Width; float h = (float)this.Height; g.DrawLine(pen, 0, h - cBottomOffset, w, h - cBottomOffset); g.DrawLine(pen, w - cArrowOffset, h - cBottomOffset - cArrowOffset / 2, w, h - cBottomOffset); g.DrawLine(pen, w - cArrowOffset, h - cBottomOffset + cArrowOffset / 2, w, h - cBottomOffset); foreach(var element in m_currentState.XPhysicalDashes) { float x = g.TransformX(element.X); float y = g.TransformY(element.Y); g.DrawLine(pen, x, y - cArrowSize, x, y + cArrowSize); g.DrawString(element.X.ToString(), this.Font, brush, x - cLeftOffset, y + cBottomOffset / 3); } g.DrawLine(pen, w - cRightOffset, 0, w - cRightOffset, h); g.DrawLine(pen, w - cRightOffset - cArrowOffset / 2, cArrowOffset, w - cRightOffset, 0); g.DrawLine(pen, w - cRightOffset + cArrowOffset / 2, cArrowOffset, w - cRightOffset, 0); foreach (var element in m_currentState.YPhysicalDashes) { float x = g.TransformX(element.X); float y = g.TransformY(element.Y); g.DrawLine(pen, x - cArrowSize, y, x + cArrowSize, y); g.DrawString(element.Y.ToString(m_parameters.PriceFormat), this.Font, brush, x, y + +cBottomOffset / 3); } }