PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sat Nov 09, 2024 1:56 am

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: Fri Aug 09, 2024 6:27 pm 
Offline

Joined: Fri Aug 09, 2024 6:21 pm
Posts: 4
Hi all,

I'm new to PDFSharp and am just starting to integrate it within our CAD application.

Most of the drawing objects we handle use GraphicsPath class from .Net to be rendered on Screen. So I was wondering if there might be a known method embedded within the PDFSharp tools to convert a GraphicsPath object to a XGraphicsPath? (Which would save me a tone of coding...)

Or alternatively, has anyone here shared such a method they coded themselves?

Thanks in advance!


Top
 Profile  
Reply with quote  
PostPosted: Mon Aug 12, 2024 7:54 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3111
Location: Cologne, Germany
Hi!

There is a c'tor that takes a PathGeometry object.
Code:
public XGraphicsPath(PathGeometry geometry)


There isn't a c'tor that takes a GraphicsPath yet.
I'll discuss this with Stefan.
If you come up with useful code for that purpose, maybe we can build up on your code.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Mon Aug 12, 2024 2:12 pm 
Offline

Joined: Fri Aug 09, 2024 6:21 pm
Posts: 4
Thanks for the reply.

By "c'tor", do you mean a constructor? If so, I couldn't get this to work. (XGraphicsPath only seem to have one constructor with no parameter...)

But maybe I'm doing somethng wrong....

Thomas Hoevel wrote:
If you come up with useful code for that purpose, maybe we can build up on your code.


Not having a better solution, I've decided to choose a different route, and rather create XGraphicsPath for all my object types (line segment, circles, rectangles, etc...)


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 19 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