https://bugzilla.novell.com/show_bug.cgi?id=457021
Summary: GraphicsPath.AddString does not respect StringFormat
Alignments
Product: Mono: Class Libraries
Version: unspecified
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Sys.Drawing.
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
QAContact: [email protected]
Found By: ---
Created an attachment (id=258425)
--> (https://bugzilla.novell.com/attachment.cgi?id=258425)
Mono output
You can pass GraphicsPath.AddString a StringFormat object, but setting the
alignments does not work on Mono. Test code:
Bitmap b = new Bitmap(400, 400);
using (Graphics g = Graphics.FromImage(b))
{
Rectangle r = new Rectangle(50, 50, 300, 100);
StringFormat sf = new StringFormat();
sf.LineAlignment = StringAlignment.Center;
sf.Alignment = StringAlignment.Center;
GraphicsPath gp = new GraphicsPath();
gp.AddString("Hi There", FontFamily.GenericMonospace, 0, 24, r, sf);
g.DrawPath(new Pen(Color.Black), gp);
g.DrawRectangle(new Pen(Color.Red), r);
}
b.Save("out.png");
Attached are examples of both mono and ms.net
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs