T
Tony Johansson
Hi!
If I set sf.Alignment = StringAlignment.Near; it will draw at the far left
which is correct
But when I set the sf.Alignment = StringAlignment.Far; in the code below no
text is displayed.
so I wonder if I don't specify a rectangle what is the area that .NET will
use to draw ?
Graphics g = this.CreateGraphics();
FontFamily fm = new FontFamily("Arial");
Font f = new Font(fm, 10);
StringFormat sf = new StringFormat();
sf.Alignment = StringAlignment.Near;
g.DrawString("GDI+ in Microsoft .NET", f, Brushes.Red, 0, 0, sf);
//Tony
If I set sf.Alignment = StringAlignment.Near; it will draw at the far left
which is correct
But when I set the sf.Alignment = StringAlignment.Far; in the code below no
text is displayed.
so I wonder if I don't specify a rectangle what is the area that .NET will
use to draw ?
Graphics g = this.CreateGraphics();
FontFamily fm = new FontFamily("Arial");
Font f = new Font(fm, 10);
StringFormat sf = new StringFormat();
sf.Alignment = StringAlignment.Near;
g.DrawString("GDI+ in Microsoft .NET", f, Brushes.Red, 0, 0, sf);
//Tony