VTK >> OGL >> EMF

Brian Henry Brian at QUANTEC.demon.co.uk
Fri Jul 30 06:25:23 EDT 1999


I would like to generate Windows enhanced metafiles from VTK. In my
naive way I fondly imagine that this will give me properly scaling
printed pictures cut from VTK output. If this is nonsense please let me
know, and ignore the questions that follow.

It seems to me that VTK 2.4 can almost do this, but not quite. I claim
to infer from MSDN that the crucial step is a call to
wglCreateContext(HDC), where the argument refers to a CMetaFileDC. In
all but two cases the calls to this function in VTK seem to derive their
device contexts from the screen; where they do so from a parameter, that
is an HWND. The exceptions are
vtkWin32OpenGLRenderWindow::SetupMemoryRendering and its namesake in
vtkWin32OpenGLImageWindow, each of which receives an HDC argument, but
then seems to put a bitmap into it.

How shall I proceed? Can I supply a handle to a CMetaFileDC to
SetupMemoryRendering? (I'll be having a go at this regardless.) Just
what is that function doing with that bitmap? Do I need new class which
will work with an HDC in a more abstract way? Or would I be better off
adding this functionality to the existing classes by splitting all these
functions into two layers? 

(Just to reassure people, I'm not going for contribution status with
this.)

Thanks for any suggestions
**********************************
Brian Henry

Quantec Ltd.
City Gate House
39-45 Finsbury Square
London EC2A 1NB
England

0 [044] 171 972 0303

http://quantec.demon.co.uk
**********************************




-----------------------------------------------------------------------------
This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.
-----------------------------------------------------------------------------





More information about the vtkusers mailing list