System.Drawing.Graphics.DrawString C# (CSharp) Method

DrawString() public method

public DrawString ( string s, Font font, Brush brush, PointF point, StringFormat format = null ) : void
s string
font Font
brush Brush
point PointF
format StringFormat
return void
        public void DrawString(string s, Font font, Brush brush, PointF point, StringFormat format = null)
        {
            DrawString(s, font, brush, new RectangleF(point.X, point.Y, 0, 0), format);
        }

Same methods

Graphics::DrawString ( string s, Font font, Brush brush, RectangleF layoutRectangle, StringFormat format = null ) : void
Graphics::DrawString ( string s, Font font, Brush brush, float x, float y, StringFormat format = null ) : void

Usage Example

Example #1
7
 private void DrawInput(Graphics g)
 {
     var point = GetPoint();
     g.FillEllipse(Brushes.Chartreuse, point.X, point.Y, 10, 10);
     g.DrawString(string.Format("Frequency: {0,7:####0.0}hz", _frequency), _font, Brushes.BlueViolet, 5f, 5f);
     g.DrawString(string.Format("Volume: {0:0.00}", _volume), _font, Brushes.BlueViolet, 5f, 20f);
 }
All Usage Examples Of System.Drawing.Graphics::DrawString