public override void PaintValue(PaintValueEventArgs e) { ObjectBrush ob = (ObjectBrush)e.Value; e.Graphics.FillRectangle(ob.GetBrush(e.Bounds), e.Bounds); base.PaintValue(e); }
public void DrawString(string s, Graphics g, RectangleF Rect) { StringFormat sf = new StringFormat(); sf.Alignment = alignment; sf.LineAlignment = lineAlignment; g.DrawString(s, textFont, textBrush.GetBrush(), Rect, sf); }