Hi,
Im trying to get the Bounds for my Text in a path, but its not working.
I wrote following code according to the MSDN Example for a Ellipse..
I can see the Text, but the Messagebox Shows "{X=0,Y=0,Width=0,Heigth=0}" . I tried it also with an Ellipse and this worked fine..
Any suggestions?
Im trying to get the Bounds for my Text in a path, but its not working.
I wrote following code according to the MSDN Example for a Ellipse..
PHP:
pth = new GraphicsPath();
p=new Pen(Sermon.TextColor[j],1.0f);
pth.AddString("This is just a text", new FontFamily("Arial"),0,20,new Point(10,10),StringFormat.GenericTypographic);
graphics.DrawPath(p,pth);
MessageBox.Show(Convert.ToString(pth.GetBounds()));
I can see the Text, but the Messagebox Shows "{X=0,Y=0,Width=0,Heigth=0}" . I tried it also with an Ellipse and this worked fine..
Any suggestions?