Robin Dunn wrote:
Diego Galho Prestes wrote:
Hi! Someone know if wxPython can open Corel Draw and Autocad archives
like images?
I don't think they are currently supported but all it would take is
somebody writing a wxImageHandler for them.
Is it difficult to make this wxImageHandler for this archives and how
can I do this or where I find a page that say about this.
Diego
Diego Prestes wrote:
Robin Dunn wrote:
Diego Galho Prestes wrote:
Hi! Someone know if wxPython can open Corel Draw and Autocad archives
like images?
I don't think they are currently supported but all it would take is
somebody writing a wxImageHandler for them.
Is it difficult to make this wxImageHandler for this archives and how
can I do this or where I find a page that say about this.
Diego
As a note, AutoCAD files are *not* easy things to render. They can contain 3D constructive-solid-geometry and other wonderfully complex objects, so writing an image handler for them is not going to be easy (they are a binary vector graphics format with 2D, 3D, inclusions of multiple files, database links, multiple layers, etceteras). In essence, you'd need to duplicate the entire AutoCAD rendering mechanism. I believe later versions of both file formats include a snapshot bitmap, but that's very different from a scalable image.
CorelDraw files are, again, not easy things to work with, though likely a little less hard than AutoCAD files, simply because they are 2D images.
Both applications have extensive export facilities, and if you can find an exporter that goes to a vector graphics format that retains all the data you care about and is supported by wxImageHandler you'd probably be better off. Even deciding to use something like SVG or DXF as your intermediate format and writing a handler for that would probably be a less painful task (there's free code to handle those formats lying about here and there I believe).
Another approach: you might be able to drive later versions of the apps via COM to generate images on Win32. Haven't got a recent version of either to check with.
Anyway, good luck,
Mike
ยทยทยท
_______________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://members.rogers.com/mcfletch/