Skip to content
Snippets Groups Projects
Commit 4c37eac1 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

include g2psTestSimple in the distrib
parent 1fc94990
No related branches found
No related tags found
No related merge requests found
...@@ -38,7 +38,7 @@ distrib: ...@@ -38,7 +38,7 @@ distrib:
mkdir gl2ps-${RELEASE} mkdir gl2ps-${RELEASE}
cd doc && ${MAKE} cd doc && ${MAKE}
cp TODO COPYING.GL2PS COPYING.LGPL gl2ps.c gl2ps.h gl2psTest.c\ cp TODO COPYING.GL2PS COPYING.LGPL gl2ps.c gl2ps.h gl2psTest.c\
doc/gl2ps.pdf gl2ps-${RELEASE} gl2psTestSimple.c doc/gl2ps.pdf gl2ps-${RELEASE}
tar zcvf gl2ps-${RELEASE}.tgz gl2ps-${RELEASE} tar zcvf gl2ps-${RELEASE}.tgz gl2ps-${RELEASE}
@echo "********************************************************************" @echo "********************************************************************"
@echo "Did you remember to untabify both gl2ps.c and gl2ps.h?" @echo "Did you remember to untabify both gl2ps.c and gl2ps.h?"
...@@ -49,6 +49,6 @@ distrib-nightly: ...@@ -49,6 +49,6 @@ distrib-nightly:
mkdir gl2ps-${DATE} mkdir gl2ps-${DATE}
cd doc && ${MAKE} gl2ps.pdf cd doc && ${MAKE} gl2ps.pdf
cp TODO COPYING.GL2PS COPYING.LGPL gl2ps.c gl2ps.h gl2psTest.c\ cp TODO COPYING.GL2PS COPYING.LGPL gl2ps.c gl2ps.h gl2psTest.c\
doc/gl2ps.pdf gl2ps-${DATE} gl2psTestSimple.c doc/gl2ps.pdf gl2ps-${DATE}
tar zcvf gl2ps-nightly.tgz gl2ps-${DATE} tar zcvf gl2ps-nightly.tgz gl2ps-${DATE}
rm -rf gl2ps-${DATE} rm -rf gl2ps-${DATE}
% $Id: gl2ps.tex,v 1.198 2005-06-19 18:30:10 geuzaine Exp $ % $Id: gl2ps.tex,v 1.199 2005-06-19 19:18:35 geuzaine Exp $
% %
% GL2PS, an OpenGL to PostScript Printing Library % GL2PS, an OpenGL to PostScript Printing Library
% Copyright (C) 1999-2005 Christophe Geuzaine <geuz@geuz.org> % Copyright (C) 1999-2005 Christophe Geuzaine <geuz@geuz.org>
...@@ -621,7 +621,8 @@ fclose(fp); ...@@ -621,7 +621,8 @@ fclose(fp);
gl2psText("MyText", "Courier", 12); gl2psText("MyText", "Courier", 12);
\end{verbatim} \end{verbatim}
A complete example (\dd{gl2psTest.c}) is included in the distribution. Complete example programs (\dd{gl2psTestSimple.c} and \dd{gl2psTest.c})
are included in the distribution.
%\begin{figure} %\begin{figure}
%\scalebox{0.85}{\input{outLatex.tex}} %\scalebox{0.85}{\input{outLatex.tex}}
......
/* $Id: gl2psTest.c,v 1.68 2005-06-18 18:06:20 geuzaine Exp $ */ /* $Id: gl2psTest.c,v 1.69 2005-06-19 19:18:35 geuzaine Exp $ */
/* /*
* GL2PS, an OpenGL to PostScript Printing Library * GL2PS, an OpenGL to PostScript Printing Library
* Copyright (C) 1999-2005 Christophe Geuzaine <geuz@geuz.org> * Copyright (C) 1999-2005 Christophe Geuzaine <geuz@geuz.org>
...@@ -496,7 +496,7 @@ void writefile(int format, int sort, int options, int nbcol, ...@@ -496,7 +496,7 @@ void writefile(int format, int sort, int options, int nbcol,
while(state == GL2PS_OVERFLOW){ while(state == GL2PS_OVERFLOW){
buffsize += 1024*1024; buffsize += 1024*1024;
gl2psBeginPage(file, "test", viewport, format, sort, options, gl2psBeginPage(file, "gl2psTest", viewport, format, sort, options,
GL_RGBA, 0, NULL, nbcol, nbcol, nbcol, GL_RGBA, 0, NULL, nbcol, nbcol, nbcol,
buffsize, fp, file); buffsize, fp, file);
display(); display();
......
/* $Id: gl2psTestSimple.c,v 1.7 2005-06-19 18:56:47 geuzaine Exp $ */ /* $Id: gl2psTestSimple.c,v 1.8 2005-06-19 19:18:35 geuzaine Exp $ */
/* /*
* GL2PS, an OpenGL to PostScript Printing Library * GL2PS, an OpenGL to PostScript Printing Library
* Copyright (C) 1999-2005 Christophe Geuzaine <geuz@geuz.org> * Copyright (C) 1999-2005 Christophe Geuzaine <geuz@geuz.org>
...@@ -78,12 +78,12 @@ void keyboard(unsigned char key, int x, int y){ ...@@ -78,12 +78,12 @@ void keyboard(unsigned char key, int x, int y){
exit(0); exit(0);
break; break;
case 's': case 's':
fp = fopen("test.eps", "wb"); fp = fopen("out.eps", "wb");
while(state == GL2PS_OVERFLOW){ while(state == GL2PS_OVERFLOW){
buffsize += 1024*1024; buffsize += 1024*1024;
gl2psBeginPage("test", "test", NULL, GL2PS_EPS, GL2PS_BSP_SORT, gl2psBeginPage("test", "gl2psTestSimple", NULL, GL2PS_EPS, GL2PS_BSP_SORT,
GL2PS_DRAW_BACKGROUND | GL2PS_USE_CURRENT_VIEWPORT, GL2PS_DRAW_BACKGROUND | GL2PS_USE_CURRENT_VIEWPORT,
GL_RGBA, 0, NULL, 0, 0, 0, buffsize, fp, "test.eps"); GL_RGBA, 0, NULL, 0, 0, 0, buffsize, fp, "out.eps");
display(); display();
state = gl2psEndPage(); state = gl2psEndPage();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment