My develope environment is .Net8.0, I need to draw the path from a character (for example, to draw the outlines of a character or make some matrix transformation of the font then draw it)
but when I use the [XGraphicsPath.AddString(...)] method to convert the font to path, it did not work, the output file does not have any about the character.
(I tried to use breakpoint debugging then I find the Parameter CorePath.PathPoints of XGraphicsPath object did not have any point after the [XGraphicsPath.AddString(...)] method done.)
This question have puzzled me three whole days...
BTW:
I can successfully use [GraphicsPath.AddString(...)] method in [system.draw]package to convert font to path then draw it in winform.
I tried to find method which can convert GraphicsPath to XGraphicsPath but failed.
My English is not well, please forgive the grammar mistake.
Code:
//Code of try to draw the outline, but failed.
XGraphicsPath path2 = new XGraphicsPath();
string text = "Hello";
XFontFamily family = new XFontFamily("Arial");
path2.AddString(text, family, XFontStyleEx.Regular, 80, new XRect(100, 100, 250, 140), XStringFormats.Center);
gfx.DrawPath(new XPen(XColors.Blue, 5), XBrushes.DarkOrchid, path2);