PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sun Jul 14, 2024 9:55 pm

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: Thu Apr 28, 2011 2:17 pm 
Offline

Joined: Wed Apr 13, 2011 6:39 pm
Posts: 21
Sometimes I have problems with converting one MigraDoc-Objekt to a PDFSharp-Objekt.
Both Have similar Properties which couldn't be converted in each other.
One examples for that is the color-property.
I want to write code like this:
Code:
Dim MigraColor As Color
Dim SharpColor as XColor
SharpColor = MigraColor

Maybe I haven't found the correct convert-method for that?

How do you solve these conversion problems?


Top
 Profile  
Reply with quote  
PostPosted: Thu Apr 28, 2011 3:06 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3101
Location: Cologne, Germany
An untested code snippet in C# notation:

SharpColor = XColor.FromArgb(MigraColor.Argb);

This or something similar should work.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
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: Google [Bot] and 21 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