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

1.3.3

parent 4786cbfe
No related branches found
No related tags found
No related merge requests found
% $Id: gl2ps.tex,v 1.227 2009-02-27 21:25:56 geuzaine Exp $ % $Id: gl2ps.tex,v 1.228 2009-02-28 22:02:11 geuzaine Exp $
% %
% GL2PS, an OpenGL to PostScript Printing Library % GL2PS, an OpenGL to PostScript Printing Library
% Copyright (C) 1999-2007 Christophe Geuzaine <geuz@geuz.org> % Copyright (C) 1999-2009 C. Geuzaine
% %
% This program is free software; you can redistribute it and/or % This program is free software; you can redistribute it and/or
% modify it under the terms of either: % modify it under the terms of either:
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
\title{GL2PS: an OpenGL to PostScript printing library} \title{GL2PS: an OpenGL to PostScript printing library}
\author{Christophe Geuzaine} \author{Christophe Geuzaine}
\date{Version 1.3.3, ? ? 2009} \date{Version 1.3.3, 28 February 2009}
\maketitle \maketitle
...@@ -999,8 +999,9 @@ seem to be available anymore). ...@@ -999,8 +999,9 @@ seem to be available anymore).
\item[1.3.2] (Nov 5, 2006) Fixed bug in polygon offset computation; \item[1.3.2] (Nov 5, 2006) Fixed bug in polygon offset computation;
fixed landscape mode in SVG; fixed potential out-of-bounds array fixed landscape mode in SVG; fixed potential out-of-bounds array
access in stippling pattern parser. access in stippling pattern parser.
\item[1.3.3] (, 2009) Fixed memory leak in PDF code; added \item[1.3.3] (Feb 28, 2009) Fixed memory leak in PDF code; added
\dd{gl2psGetOptions}; nicer SVG rendering (crispEdges, font attributes). \dd{gl2psGetOptions}; nicer SVG rendering (crispEdges, font attributes);
fixed possible divisions by zero.
\end{description} \end{description}
\end{document} \end{document}
/* $Id: gl2ps.c,v 1.252 2009-02-27 21:30:19 geuzaine Exp $ */
/* /*
* GL2PS, an OpenGL to PostScript Printing Library * GL2PS, an OpenGL to PostScript Printing Library
* Copyright (C) 1999-2007 Christophe Geuzaine <geuz@geuz.org> * Copyright (C) 1999-2009 C. Geuzaine
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of either: * modify it under the terms of either:
...@@ -1691,20 +1690,20 @@ static void gl2psRescaleAndOffset() ...@@ -1691,20 +1690,20 @@ static void gl2psRescaleAndOffset()
(prim->verts[2].xyz[0] - prim->verts[1].xyz[0]) * (prim->verts[2].xyz[0] - prim->verts[1].xyz[0]) *
(prim->verts[1].xyz[1] - prim->verts[0].xyz[1]); (prim->verts[1].xyz[1] - prim->verts[0].xyz[1]);
if(!GL2PS_ZERO(area)){ if(!GL2PS_ZERO(area)){
dZdX = dZdX =
((prim->verts[2].xyz[1] - prim->verts[1].xyz[1]) * ((prim->verts[2].xyz[1] - prim->verts[1].xyz[1]) *
(prim->verts[1].xyz[2] - prim->verts[0].xyz[2]) - (prim->verts[1].xyz[2] - prim->verts[0].xyz[2]) -
(prim->verts[1].xyz[1] - prim->verts[0].xyz[1]) * (prim->verts[1].xyz[1] - prim->verts[0].xyz[1]) *
(prim->verts[2].xyz[2] - prim->verts[1].xyz[2])) / area; (prim->verts[2].xyz[2] - prim->verts[1].xyz[2])) / area;
dZdY = dZdY =
((prim->verts[1].xyz[0] - prim->verts[0].xyz[0]) * ((prim->verts[1].xyz[0] - prim->verts[0].xyz[0]) *
(prim->verts[2].xyz[2] - prim->verts[1].xyz[2]) - (prim->verts[2].xyz[2] - prim->verts[1].xyz[2]) -
(prim->verts[2].xyz[0] - prim->verts[1].xyz[0]) * (prim->verts[2].xyz[0] - prim->verts[1].xyz[0]) *
(prim->verts[1].xyz[2] - prim->verts[0].xyz[2])) / area; (prim->verts[1].xyz[2] - prim->verts[0].xyz[2])) / area;
maxdZ = (GLfloat)sqrt(dZdX * dZdX + dZdY * dZdY); maxdZ = (GLfloat)sqrt(dZdX * dZdX + dZdY * dZdY);
} }
else{ else{
maxdZ = 0.0F; maxdZ = 0.0F;
} }
dZ = factor * maxdZ + units; dZ = factor * maxdZ + units;
prim->verts[0].xyz[2] += dZ; prim->verts[0].xyz[2] += dZ;
......
/* $Id: gl2ps.h,v 1.115 2007-05-02 20:57:15 geuzaine Exp $ */
/* /*
* GL2PS, an OpenGL to PostScript Printing Library * GL2PS, an OpenGL to PostScript Printing Library
* Copyright (C) 1999-2007 Christophe Geuzaine <geuz@geuz.org> * Copyright (C) 1999-2009 C. Geuzaine
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of either: * modify it under the terms of either:
...@@ -85,7 +84,7 @@ ...@@ -85,7 +84,7 @@
0.01 * GL2PS_MINOR_VERSION + \ 0.01 * GL2PS_MINOR_VERSION + \
0.0001 * GL2PS_PATCH_VERSION) 0.0001 * GL2PS_PATCH_VERSION)
#define GL2PS_COPYRIGHT "(C) 1999-2007 Christophe Geuzaine (geuz@geuz.org)" #define GL2PS_COPYRIGHT "(C) 1999-2009 C. Geuzaine"
/* Output file formats (the values and the ordering are important!) */ /* Output file formats (the values and the ordering are important!) */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment