Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
        private void DoDrawEmpty(GraphicsEx g)
        {
            SizeF size = g.MeasureString(cOffQuotes, this.Font);
            float w    = (float)this.Width;
            float h    = (float)this.Height;

            float x = (w - size.Width) / 2;
            float y = (h - size.Height) / 2;

            g.DrawString(cOffQuotes, this.Font, m_settings.ForegroundColor, x, y);
        }