public static void Draw(DealEventSymbolType evType, DealType side, double chartX, double chartY, RectangleD worldRect, Rectangle canvasRect, Graphics g, Pen pen, Brush foreBrush, Brush backBrush) { var center = Conversion.WorldToScreen(new PointD(chartX, chartY), worldRect, canvasRect); Draw(evType, side, (int)center.X, (int)center.Y, g, pen, foreBrush, backBrush); }
public static void Draw(DealEventSymbolType evType, DealType side, int x, int y, Graphics g, Pen pen, Brush foreBrush, Brush backBrush) { g.DrawLine(pen, x - 5, y, x + 5, y); switch (evType) { case DealEventSymbolType.Open: DrawEnterSign(side, x, y, g, pen, foreBrush); break; case DealEventSymbolType.Close: DrawClose(x, y, g, pen); break; case DealEventSymbolType.OpenLocking: DrawEnterLock(side, x, y, g, pen, foreBrush); break; case DealEventSymbolType.Unlock: DrawUnlock(x, y, g, pen); break; } }
public static void Draw(DealEventSymbolType evType, DealType side, double chartX, double chartY, RectangleD worldRect, Rectangle canvasRect, Graphics g, Pen pen, Brush foreBrush, Brush backBrush) { var center = Conversion.WorldToScreen(new PointD(chartX, chartY), worldRect, canvasRect); Draw(evType, side, (int) center.X, (int) center.Y, g, pen, foreBrush, backBrush); }