Пример #1
0
        private void drawScaleLine(Graphics g, double xLeft, double xRight, double y, double price)
        {
            ColorConfig config = colorConfig;

            g.DrawLine(config.Pen_CandleFrameScaleLine, new Point((int)xLeft, (int)y), new Point((int)xRight, (int)y));

            String label = price.ToString();

            g.DrawString(label, config.Font_CandleFrameScaleFont, config.Brush_CandleFrameScaleBrush, new Point((int)xLeft - label.Length * 8 - 5, (int)y - 5));
        }
Пример #2
0
        public void DrawFrame(Graphics g, Rectangle rect, PriceGraphicMapping priceMapping)
        {
            Rectangle rectangleScale = rect;

            g.DrawRectangle(colorConfig.Pen_FrameLine, rectangleScale);
            float       price  = priceMapping.PriceRect.PriceTop / 2;
            int         y      = (int)priceMapping.CalcY(price);
            ColorConfig config = colorConfig;

            g.DrawLine(config.Pen_CandleFrameScaleLine, new Point((int)rectangleScale.X, y), new Point((int)rectangleScale.Right, (int)y));

            String label = price.ToString();

            g.DrawString(label, config.Font_CandleFrameScaleFont, config.Brush_CandleFrameScaleBrush, new Point((int)rectangleScale.X - label.Length * 8 - 5, (int)y - 5));
        }
Пример #3
0
 public StockGraph_Abstract(IGraphicData_Candle data, ColorConfig config)
 {
     this.config = config;
     //this.displayRectangle = config.DisplayRectangle;
 }
Пример #4
0
 public CandleContentDrawer(ColorConfig colorConfig)
 {
     this.ColorConfig = colorConfig;
 }
Пример #5
0
 public CandleFrameDrawer(ColorConfig colorConfig)
 {
     this.colorConfig = colorConfig;
 }
Пример #6
0
 public CandleMountDrawer(ColorConfig colorConfig)
 {
     this.colorConfig = colorConfig;
 }