Monday, 12 November 2007

Chapter 6, Lesson 3 - Formatting Text & adding to images.

Adding Text to Graphics
  • Cretae Graphics obj.
  • Create Font obj. - e.g. Font f = new Font("Arial",12,FontStyle.Bold);
  • Create Brush obj. (to describe how text will be filled) OR provide System.Drawing.Brushes property - Graphics g = this.CreateGraphics(); Font f = new Font("Arial",40,FontStyle.Bold); g.DrawString("Hello",f,Brushes.Blue,10,10);

No comments: