PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Sep 26, 2024 10:04 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Wed Sep 04, 2024 3:41 pm 
Offline

Joined: Wed Sep 04, 2024 3:11 pm
Posts: 2
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);


Attachments:
File comment: Debug Message
无标题.png
无标题.png [ 182.3 KiB | Viewed 7826 times ]
Top
 Profile  
Reply with quote  
PostPosted: Mon Sep 09, 2024 9:55 am 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 984
Location: CCAA
IIRC this is one of the features that work with the GDI and WPF builds, but not (yet) with the Core build.
For applications that run under Windows only, you can use either the GDI or WPF build.

_________________
Best regards
Thomas
(Freelance Software Developer with several years of MigraDoc/PDFsharp experience)


Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 12, 2024 2:15 am 
Offline

Joined: Wed Sep 04, 2024 3:11 pm
Posts: 2
TH-Soft wrote:
IIRC this is one of the features that work with the GDI and WPF builds, but not (yet) with the Core build.
For applications that run under Windows only, you can use either the GDI or WPF build.


Thank you very much for your answer.
Wish this feature work with Core could come soon.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 77 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group