public override void Draw(Graphics g, VisualGraph drawArea) { Pen pen = new Pen(Color, PenWidth); g.DrawEllipse(pen, DrawRectangle.GetNormalizedRectangle(ShapeRect)); pen.Dispose(); }
public override void Draw(Graphics g, VisualGraph drawArea) { SolidBrush drawBrush = new SolidBrush(Color.Black); Pen fontPen = new Pen(Color, PenWidth); if (_stringFormat == null) { _stringFormat = new StringFormat(); _stringFormat.Alignment = StringAlignment.Center; _stringFormat.LineAlignment = StringAlignment.Center; } Font drawFont = new Font("Arial", 12); g.DrawString(CurText, drawFont, drawBrush, ShapeRect, _stringFormat); if (_Show) { g.DrawRectangle(fontPen, DrawRectangle.GetNormalizedRectangle(ShapeRect)); } drawFont.Dispose(); drawBrush.Dispose(); fontPen.Dispose(); }
public override void Normalize() { ShapeRect = DrawRectangle.GetNormalizedRectangle(ShapeRect); }