CADImport.NET and SvgNet
Posted: 08 Jan 2007, 12:08
Hello,
I have a CADImport.Net related issue, that I hope can be resolved with your help:
I am using CADImport.Net and intended to convert a DWG file to SVG format by reading the DWG with CADImport.Net and writing it with the free SVG library SvgNet (http://www.codeproject.com/csharp/svgnet.asp) to SVG format. SvgNet provides a GDI+ to SVG bridge (SvgGraphics), that uses the *exact* same interface as a GDI+ System.Drawing.Graphics object that does not render to the screen but outputs an SVG file.
Unfortunately, the Graphics class is a sealed class, so the SvgGraphics class cannot be a direct subclass of the Graphics class. As a result an SvgGraphics object cannot be passed to the CADImport.Net CADImage.Draw() method, despite the fact that it provides the exact same methods as System.Drawing.Graphics.
To resolve this problem, I could imagine, that CADImport.Net provides an interface that is similar or identical to the System.Drawing.Graphics class, that is supported by a CadImage.Draw method. Using this interface I would be able to write a wrapper for the SvgGraphics class and use CadImport.Net to output SVG graphics.
Do you see any opportunity that CADImport.Net could support such functionality and open up new possibilities (not only for this issue) regarding the application area of CADImport.Net?
Thanks in advance,
Nicolas Goell
I have a CADImport.Net related issue, that I hope can be resolved with your help:
I am using CADImport.Net and intended to convert a DWG file to SVG format by reading the DWG with CADImport.Net and writing it with the free SVG library SvgNet (http://www.codeproject.com/csharp/svgnet.asp) to SVG format. SvgNet provides a GDI+ to SVG bridge (SvgGraphics), that uses the *exact* same interface as a GDI+ System.Drawing.Graphics object that does not render to the screen but outputs an SVG file.
Unfortunately, the Graphics class is a sealed class, so the SvgGraphics class cannot be a direct subclass of the Graphics class. As a result an SvgGraphics object cannot be passed to the CADImport.Net CADImage.Draw() method, despite the fact that it provides the exact same methods as System.Drawing.Graphics.
To resolve this problem, I could imagine, that CADImport.Net provides an interface that is similar or identical to the System.Drawing.Graphics class, that is supported by a CadImage.Draw method. Using this interface I would be able to write a wrapper for the SvgGraphics class and use CadImport.Net to output SVG graphics.
Do you see any opportunity that CADImport.Net could support such functionality and open up new possibilities (not only for this issue) regarding the application area of CADImport.Net?
Thanks in advance,
Nicolas Goell