|
|
6002e98 |
diff -up drgeo-1.1.0/geo/drgeo_postscriptdrawable.cc.format-security drgeo-1.1.0/geo/drgeo_postscriptdrawable.cc
|
|
|
6002e98 |
--- drgeo-1.1.0/geo/drgeo_postscriptdrawable.cc.format-security 2003-11-05 16:29:13.000000000 -0700
|
|
|
6002e98 |
+++ drgeo-1.1.0/geo/drgeo_postscriptdrawable.cc 2014-06-12 22:24:29.887507667 -0600
|
|
|
6002e98 |
@@ -130,8 +130,8 @@ drgeoPostScriptDrawable::drawPoint (drge
|
|
|
6002e98 |
p = areaToPostScript (point);
|
|
|
6002e98 |
|
|
|
6002e98 |
/* we're initializing color and line width */
|
|
|
6002e98 |
- fprintf (fileHandle, postscriptColor[style.color]);
|
|
|
6002e98 |
- fprintf (fileHandle, postscriptLineWidth[drgeoThicknessNormal + 1]);
|
|
|
6002e98 |
+ fprintf (fileHandle, "%s", postscriptColor[style.color]);
|
|
|
6002e98 |
+ fprintf (fileHandle, "%s", postscriptLineWidth[drgeoThicknessNormal + 1]);
|
|
|
6002e98 |
|
|
|
6002e98 |
switch (style.pointShape)
|
|
|
6002e98 |
{
|
|
|
6002e98 |
@@ -207,9 +207,9 @@ drawPolygon (drgeoStyle & style, drgeoPo
|
|
|
6002e98 |
gint nb;
|
|
|
6002e98 |
|
|
|
6002e98 |
/* we're initializing color and line width */
|
|
|
6002e98 |
- fprintf (fileHandle, postscriptColor[style.color]);
|
|
|
6002e98 |
+ fprintf (fileHandle, "%s", postscriptColor[style.color]);
|
|
|
6002e98 |
/* Invisible line. */
|
|
|
6002e98 |
- fprintf (fileHandle, postscriptLineWidth[0]);
|
|
|
6002e98 |
+ fprintf (fileHandle, "%s", postscriptLineWidth[0]);
|
|
|
6002e98 |
|
|
|
6002e98 |
fprintf (fileHandle, "%%Polygon\nnewpath\n");
|
|
|
6002e98 |
|
|
|
6002e98 |
@@ -235,11 +235,11 @@ drawSegment (drgeoStyle & style, drgeoPo
|
|
|
6002e98 |
p2 = areaToPostScript (end);
|
|
|
6002e98 |
p1 = areaToPostScript (start);
|
|
|
6002e98 |
|
|
|
6002e98 |
- fprintf (fileHandle, postscriptColor[style.color]);
|
|
|
6002e98 |
+ fprintf (fileHandle, "%s", postscriptColor[style.color]);
|
|
|
6002e98 |
if (style.mask == yes)
|
|
|
6002e98 |
- fprintf (fileHandle, postscriptLineWidth[0]);
|
|
|
6002e98 |
+ fprintf (fileHandle, "%s", postscriptLineWidth[0]);
|
|
|
6002e98 |
else
|
|
|
6002e98 |
- fprintf (fileHandle, postscriptLineWidth[style.thick + 1]);
|
|
|
6002e98 |
+ fprintf (fileHandle, "%s", postscriptLineWidth[style.thick + 1]);
|
|
|
6002e98 |
fprintf (fileHandle,
|
|
|
6002e98 |
"%% Segment\n%f %f moveto %f %f lineto stroke\n",
|
|
|
6002e98 |
p1.getX () * PostScriptScale, p1.getY () * PostScriptScale,
|
|
|
6002e98 |
@@ -263,11 +263,11 @@ drawCircle (drgeoStyle & style, drgeoPoi
|
|
|
6002e98 |
drgeoPoint p;
|
|
|
6002e98 |
|
|
|
6002e98 |
p = areaToPostScript (center);
|
|
|
6002e98 |
- fprintf (fileHandle, postscriptColor[style.color]);
|
|
|
6002e98 |
+ fprintf (fileHandle, "%s", postscriptColor[style.color]);
|
|
|
6002e98 |
if (style.mask == yes)
|
|
|
6002e98 |
- fprintf (fileHandle, postscriptLineWidth[0]);
|
|
|
6002e98 |
+ fprintf (fileHandle, "%s", postscriptLineWidth[0]);
|
|
|
6002e98 |
else
|
|
|
6002e98 |
- fprintf (fileHandle, postscriptLineWidth[style.thick + 1]);
|
|
|
6002e98 |
+ fprintf (fileHandle, "%s", postscriptLineWidth[style.thick + 1]);
|
|
|
6002e98 |
fprintf (fileHandle,
|
|
|
6002e98 |
/* is there a better way to draw a circle in ps ? */
|
|
|
6002e98 |
"%% Circle\n%f %f moveto %f %f %f 0 360 arc closepath stroke\n",
|
|
|
6002e98 |
@@ -285,11 +285,11 @@ drawArc (drgeoStyle & style, drgeoPoint
|
|
|
6002e98 |
drgeoPoint p, startPoint;
|
|
|
6002e98 |
|
|
|
6002e98 |
p = areaToPostScript (center);
|
|
|
6002e98 |
- fprintf (fileHandle, postscriptColor[style.color]);
|
|
|
6002e98 |
+ fprintf (fileHandle, "%s", postscriptColor[style.color]);
|
|
|
6002e98 |
if (style.mask == yes)
|
|
|
6002e98 |
- fprintf (fileHandle, postscriptLineWidth[0]);
|
|
|
6002e98 |
+ fprintf (fileHandle, "%s", postscriptLineWidth[0]);
|
|
|
6002e98 |
else
|
|
|
6002e98 |
- fprintf (fileHandle, postscriptLineWidth[style.thick + 1]);
|
|
|
6002e98 |
+ fprintf (fileHandle, "%s", postscriptLineWidth[style.thick + 1]);
|
|
|
6002e98 |
|
|
|
6002e98 |
|
|
|
6002e98 |
|
|
|
6002e98 |
@@ -336,7 +336,7 @@ drawText (drgeoPoint & where, char *text
|
|
|
6002e98 |
// FIXME: how to handle this correctly ?
|
|
|
6002e98 |
convString = g_convert (text, -1, "iso8859-1", "utf-8", NULL, NULL, NULL);
|
|
|
6002e98 |
|
|
|
6002e98 |
- fprintf (fileHandle, postscriptColor[fontColor]);
|
|
|
6002e98 |
+ fprintf (fileHandle, "%s", postscriptColor[fontColor]);
|
|
|
6002e98 |
/* The size of the font is arbitrary : 10 points */
|
|
|
6002e98 |
fprintf (fileHandle,
|
|
|
6002e98 |
"%% Text\n/Times findfont 10 scalefont setfont %f %f moveto (%s) show\n",
|