PDFsharp & MigraDoc Foundation https://forum.pdfsharp.net/ |
|
Convert Types from MigraDoc to PDFSharp and vice versa https://forum.pdfsharp.net/viewtopic.php?f=2&t=1640 |
Page 1 of 1 |
Author: | ReinerWolff [ Thu Apr 28, 2011 2:17 pm ] |
Post subject: | Convert Types from MigraDoc to PDFSharp and vice versa |
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? |
Author: | Thomas Hoevel [ Thu Apr 28, 2011 3:06 pm ] |
Post subject: | Re: Convert Types from MigraDoc to PDFSharp and vice versa |
An untested code snippet in C# notation: SharpColor = XColor.FromArgb(MigraColor.Argb); This or something similar should work. |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |