[gl2ps] minor revision gl2ps
Baiju Devani
b.devani at gmail.com
Wed Sep 6 17:25:45 CEST 2006
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,
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\">\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!) */
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gl2ps/attachments/20060906/0a76b095/attachment.html>