138 |
#endif |
#endif |
139 |
|
|
140 |
#ifdef GL |
#ifdef GL |
141 |
XmString gl_eps; |
XmString gl2ps_eps, gl2ps_pdf; |
142 |
#endif |
#endif |
143 |
|
|
144 |
switch(item_no){ |
switch(item_no){ |
318 |
#endif |
#endif |
319 |
|
|
320 |
#ifdef GL |
#ifdef GL |
321 |
gl_eps = XmStringCreateLocalized("GL EPS"); |
gl2ps_eps = XmStringCreateLocalized("GL2PS (EPS)"); |
322 |
|
gl2ps_pdf = XmStringCreateLocalized("GL2PS (PDF)"); |
323 |
#endif |
#endif |
324 |
|
|
325 |
title=XmStringCreateLocalized ("File type"); |
title=XmStringCreateLocalized ("File type"); |
336 |
#endif |
#endif |
337 |
|
|
338 |
#ifdef GL |
#ifdef GL |
339 |
XmVaPUSHBUTTON, gl_eps, 'G', NULL, NULL, |
XmVaPUSHBUTTON, gl2ps_eps, 'G', NULL, NULL, |
340 |
|
XmVaPUSHBUTTON, gl2ps_pdf, 'P', NULL, NULL, |
341 |
#endif |
#endif |
342 |
|
|
343 |
NULL); |
NULL); |
354 |
#endif |
#endif |
355 |
|
|
356 |
#ifdef GL |
#ifdef GL |
357 |
XmStringFree (gl_eps); |
XmStringFree (gl2ps_eps); |
358 |
|
XmStringFree (gl2ps_pdf); |
359 |
#endif |
#endif |
360 |
|
|
361 |
XmStringFree(title); |
XmStringFree(title); |
1972 |
#endif /* XPM */ |
#endif /* XPM */ |
1973 |
|
|
1974 |
#ifdef GL |
#ifdef GL |
1975 |
void write_gl_eps (char *); |
void write_gl2ps (char *, GLint); |
1976 |
#endif |
#endif |
1977 |
|
|
1978 |
switch (export_type) |
switch (export_type) |
2008 |
|
|
2009 |
#ifdef GL |
#ifdef GL |
2010 |
case 5: |
case 5: |
2011 |
write_gl_eps (file_name); |
write_gl2ps (file_name, GL2PS_EPS); |
2012 |
|
break; |
2013 |
|
case 6: |
2014 |
|
write_gl2ps (file_name, GL2PS_PDF); |
2015 |
break; |
break; |
2016 |
#endif |
#endif |
2017 |
} |
} |
2780 |
#endif |
#endif |
2781 |
|
|
2782 |
#ifdef GL |
#ifdef GL |
2783 |
void write_gl_eps (char *filename) |
void write_gl2ps (char *filename, GLint type) |
2784 |
{ |
{ |
2785 |
FILE *fp = fopen (filename, "w"); |
FILE *fp = fopen (filename, "w"); |
2786 |
GLint buffsize = 0, state = GL2PS_OVERFLOW; |
GLint buffsize = 0, state = GL2PS_OVERFLOW; |
2792 |
{ |
{ |
2793 |
buffsize += 1024*1024; |
buffsize += 1024*1024; |
2794 |
gl2psBeginPage ( "Title", "XMakemol", viewport, |
gl2psBeginPage ( "Title", "XMakemol", viewport, |
2795 |
GL2PS_EPS, GL2PS_BSP_SORT, |
type, GL2PS_BSP_SORT, |
2796 |
GL2PS_DRAW_BACKGROUND | |
GL2PS_DRAW_BACKGROUND | |
2797 |
GL2PS_SIMPLE_LINE_OFFSET | GL2PS_SILENT | |
GL2PS_SIMPLE_LINE_OFFSET | GL2PS_SILENT | |
2798 |
GL2PS_OCCLUSION_CULL | GL2PS_BEST_ROOT, |
GL2PS_OCCLUSION_CULL | GL2PS_BEST_ROOT, |