Beispiel #1
0
        private static PriceShape_Rect GetRect()
        {
            PriceShape_Rect rect = new PriceShape_Rect();

            rect.Color       = Color.Blue;
            rect.FillRect    = true;
            rect.PriceLeft   = 123;
            rect.PriceTop    = 33;
            rect.PriceRight  = 444;
            rect.PriceBottom = 11;
            return(rect);
        }
Beispiel #2
0
        private void DrawPlatform(Platform platform, IStrategyDrawer_PriceRect drawHelper)
        {
            PriceShape_Rect priceRect = new PriceShape_Rect();

            priceRect.PriceLeft   = platform.StartIndex;
            priceRect.PriceTop    = platform.TopList[2].KLineBar.High;
            priceRect.PriceRight  = platform.EndIndex;
            priceRect.PriceBottom = platform.BottomList[2].KLineBar.Low;
            priceRect.Color       = System.Drawing.Color.Red;
            //priceRect.FillRect = true;
            drawHelper.DrawRect(priceRect);
        }
Beispiel #3
0
        public void Paint(Graphics g, PriceGraphicMapping priceGraphic, IPriceShape shape)
        {
            PriceShape_Rect point = (PriceShape_Rect)shape;
            float           x1    = priceGraphic.CalcX(point.PriceLeft);
            float           y1    = priceGraphic.CalcY(point.PriceTop);
            float           x2    = priceGraphic.CalcX(point.PriceRight);
            float           y2    = priceGraphic.CalcY(point.PriceBottom);

            if (!point.FillRect)
            {
                g.DrawRectangle(new Pen(point.Color), x1, y1, x2 - x1, y2 - y1);
            }
            else
            {
                g.FillRectangle(new SolidBrush(point.Color), x1, y1, x2 - x1, y2 - y1);
            }
        }
Beispiel #4
0
 public void DrawRect(PriceShape_Rect priceRect)
 {
     RecordShape(priceRect);
 }
 public void DrawRect(PriceShape_Rect priceRect)
 {
 }
Beispiel #6
0
 /// <summary>
 /// 画
 /// </summary>
 /// <param name="priceRect"></param>
 public void DrawRect(PriceShape_Rect priceRect)
 {
     this.strategyGraphic.Shapes.AddPriceShape(priceRect);
 }