[gl2ps] Re: an update
Prabhu Ramachandran
prabhu at aero.iitm.ernet.in
Sat Nov 8 11:37:34 CET 2003
>>>>> "CG" == Christophe Geuzaine <geuzaine at acm.caltech.edu> writes:
CG> Prabhu Ramachandran wrote:
>> OK, that is fine by me too. I plan on doing something like
>> this for the vtkGL2PSExporter.
>>
>> if (gl2ps != NULL) { if (gl2ps->format == GL2PS_PDF) {
[snip]
CG> Why not add a function in vtk (in your wrapper class?) to do
CG> the name conversion in all cases? I think it might be a good
CG> idea to stick to the standard names with regular PostScript
CG> output, too.
Sorry, I made a mistake and miscommunicated what I wanted to say. The
variable 'gl2ps' is only defined in gl2ps.c. I thought it might be
available from gl2ps.h and was wrong. I was actually thinking of
adding this code inside VTK where the text strings are generated and
not inside gl2ps.c. This code is in the vtkOpenGLFreeTypeTextMapper
and not in vtkGL2PSExporter.
Since I can't access the gl2ps global variable I *have* to replace
fonts in both the PDF and EPS output with the suggested 14 because I
have no way of knowing if the current output format is PDF or not. So
your suggestion has actually been implemented. :) I've tested the
output on my local copy and it seems to work nicely for both EPS and
PDF output. I'll check it in shortly.
Perhaps it might be useful to add a few functions that let a user
query the state of gl2ps? i.e. it would be nice if the user can find
out if gl2ps has been initialized and also get information about the
format and options chosen.
Thanks!
cheers,
prabhu