PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sun Mar 29, 2020 8:47 am

All times are UTC

Forum rules

Please read this before posting on this forum: Forum Rules

Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Wed Jun 14, 2017 11:53 am 

Joined: Mon Mar 20, 2017 1:08 pm
Posts: 4

Is there a way to work in PDFsharp with path markup syntax?

In WPF I work with these Code
string test = "F1 M 39.2598,21.6194C 47.9001,21.6194 55.3802,24.406 59,28.4646L 59,33.4834C 56.3537,29.575 49.2267,26.7756 40.85,26.7756C 30.2185,26.7756 21.6,31.285 21.6,36.8475C 21.6,40.4514 25.2176,43.6131 30.6564,45.3929C 22.7477,43.5121 17.2,39.1167 17.2,33.9944C 17.2,27.1599 27.0765,21.6194 39.2598,21.6194 Z M 35.8402,51.9929C 27.1999,51.9929 19.7198,49.2063 16.1,45.1478L 15,40.129C 17.6463,44.0373 25.8733,46.8367 34.25,46.8367C 44.8815,46.8367 53.5,42.3274 53.5,36.7648C 53.5,33.161 49.8824,29.9992 44.4436,28.2194C 52.3523,30.1002 57.9,34.4956 57.9,39.6179C 57.9,46.4525 48.0235,51.9929 35.8402,51.9929 Z ";

PathGeometry geo = new PathGeometry();
Path p = new Path();
PathFigureCollectionConverter pConv = new PathFigureCollectionConverter();
GeometryConverter gConv = new GeometryConverter();
Geometry ggg = (Geometry)gConv.ConvertFromInvariantString(test);
p.Data = ggg;
p.Stroke = Brushes.Black;
p.StrokeThickness = 1;

Is there a way to implement this with PDFsharp?

Best Regards,

Reply with quote  
PostPosted: Wed Jun 14, 2017 3:32 pm 
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3040
Location: Cologne, Germany

Not my area of expertise.

The class "XGraphicsPath" uses a "PathGeometry" object internally, but does not take "PathGeometry" as an input parameter.

So maybe check the "XGraphicsPath.cs" file.

"PathGeometry" could be a red herring in your code snippet.

Thomas Hoevel
PDFsharp Team

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

All times are UTC

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 4 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:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group