private static PriceShape_Label GetLabel() { PriceShape_Label label = new PriceShape_Label(); label.Color = Color.Red; label.Point = new PricePoint(12, 12); label.Text = "test"; return(label); }
public void Paint(Graphics g, PriceGraphicMapping priceGraphic, IPriceShape shape) { PriceShape_Label label = (PriceShape_Label)shape; float x1 = priceGraphic.CalcX(label.Point.X); float y1 = priceGraphic.CalcY(label.Point.Y); Font font = label.Font != null ? label.Font : new Font("宋体", 14.2f, FontStyle.Regular); StringFormat sf = label.StringFormat != null ? label.StringFormat : new StringFormat(StringFormatFlags.DirectionVertical); g.DrawString(label.Text, font, new SolidBrush(label.Color), new PointF(x1, y1), sf); }
public void DrawLabel(PriceShape_Label label) { PriceShape_Label shape = new PriceShape_Label(); shape.Color = label.Color; shape.Text = label.Text; shape.Point = GetPoint(label.Point.X, label.Point.Y); if (shape.Point == null) { return; } RecordShape(label); }
public void DrawLabels(List <float> positions, List <string> txts, Color color) { PriceShape_Label shape = new PriceShape_Label(); //shape.Color = label.Color; //shape.Text = label.Text; //shape.Point = GetPoint(label.Time, label.Price); if (shape.Point == null) { return; } drawer.DrawPriceShape(shape); }
public void DrawLabel(PriceLabel label) { PriceShape_Label shape = new PriceShape_Label(); shape.Color = label.Color; shape.Text = label.Text; shape.Point = GetPoint(label.Time, label.Price); if (shape.Point == null) { return; } drawer.DrawPriceShape(shape); }
public void DrawLabel(PriceShape_Label label) { }
/// <summary> /// 写文字 /// </summary> /// <param name="label"></param> public void DrawLabel(PriceShape_Label label) { this.strategyGraphic.Shapes.AddPriceShape(label); }