[gl2ps] minor revision gl2ps
Christophe Geuzaine
cag32 at case.edu
Thu Sep 7 02:08:44 CEST 2006
Baiju Devani wrote:
> Hi,
>
> Find attached a minor update to gl2ps1.2.8 submission made by Cosmin.
> Attached is the diff output (gl2ps1.2.8-cos and gl2ps1.2.8-cos2). Please
> feel free to email Cosmin or I if there are any questions.
>
Thanks for the patch. I've merged it in my tree.
(PS: you might want to use 1.3.1 instead of 1.2.8: SVG support is much
better in 1.3.1 and 1.3.1 also fixes a few bugs that were present in 1.2.8.)
> Thanks,
>
> Baiju
>
> diff -ru gl2ps-1.2.8-cos/gl2ps.c gl2ps-1.2.8-cos2/gl2ps.c
> --- gl2ps-1.2.8-cos/gl2ps.c Wed Jun 28 17:01:00 2006
> +++ gl2ps-1.2.8-cos2/gl2ps.c Wed Jul 05 11:29:00 2006
> @@ -4598,22 +4598,27 @@
>
> static void gl2psPrintSVGHeader(void)
> {
> + int x, y, width, height;
> time_t now;
> time(&now);
>
> + if (gl2ps->options & GL2PS_LANDSCAPE){
> + x = (int)gl2ps->viewport[1];
> + y = (int)gl2ps->viewport[0];
> + width = (int)gl2ps->viewport[3];
> + height = (int)gl2ps->viewport[2];
> + }
> + else{
> + x = (int)gl2ps->viewport[0];
> + y = (int)gl2ps->viewport[1];
> + width = (int)gl2ps->viewport[2];
> + height = (int)gl2ps->viewport[3];
> + }
> fprintf(gl2ps->stream,
> - "<svg viewBox=\"%d %d %d %d\" xmlns=\"
> http://www.w3.org/2000/svg\">\n",
> - (gl2ps->options & GL2PS_LANDSCAPE) ? (int)gl2ps->viewport[1] :
> - (int)gl2ps->viewport[0],
> - (gl2ps->options & GL2PS_LANDSCAPE) ? (int)gl2ps->viewport[0] :
> - (int)gl2ps->viewport[1],
> - (gl2ps->options & GL2PS_LANDSCAPE) ? (int)gl2ps->viewport[3] :
> - (int)gl2ps->viewport[2],
> - (gl2ps->options & GL2PS_LANDSCAPE) ? (int)gl2ps->viewport[2] :
> - (int)gl2ps->viewport[3]);
> - fprintf(gl2ps->stream, "<title>\n");
> - fprintf(gl2ps->stream, "%s\n",gl2ps->title);
> - fprintf(gl2ps->stream, "</title>\n");
> + "<svg width=\"%dpx\" height=\"%dpx\" viewBox=\"%d %d %d %d\"\n"
> + " xmlns=\"http://www.w3.org/2000/svg\
> <http://www.w3.org/2000/svg\>">\n",
> + width, height, x, y, width, height);
> + fprintf(gl2ps->stream, "<title>%s</title>\n",gl2ps->title);
> fprintf(gl2ps->stream, "<desc>\n");
> fprintf(gl2ps->stream,
> "Creator: GL2PS %s\n"
> diff -ru gl2ps-1.2.8-cos/gl2ps.h gl2ps-1.2.8-cos2/gl2ps.h
> --- gl2ps-1.2.8-cos/gl2ps.h Wed Jun 28 12:15:00 2006
> +++ gl2ps-1.2.8-cos2 /gl2ps.h Wed Jul 05 11:29:00 2006
> @@ -83,7 +83,7 @@
> 0.01 * GL2PS_MINOR_VERSION + \
> 0.0001 * GL2PS_PATCH_VERSION)
>
> -#define GL2PS_VERSION_STRING "1.2.8-cos "
> +#define GL2PS_VERSION_STRING "1.2.8-cos2"
>
> /* Output file formats (the values and the ordering are important!) */
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> gl2ps mailing list
> gl2ps at geuz.org
> http://www.geuz.org/mailman/listinfo/gl2ps
--
Christophe Geuzaine
Assistant Professor, Case Western Reserve University, Mathematics
http://www.case.edu/artsci/math/geuzaine