diff --git a/src/draw.c b/src/draw.c
index d656df44..3d2f877c 100644
--- a/src/draw.c
+++ b/src/draw.c
@@ -307,7 +307,7 @@ void cairo_draw_string_line(cairo_t *cairo_ctx, char *s,
}
/* CAIRO version */
-void draw_string(int layer, int what, const char *s, int rot, int flip, int hcenter, int vcenter,
+void draw_string(int layer, int what, const char *str, int rot, int flip, int hcenter, int vcenter,
double x, double y, double xscale, double yscale)
{
char *tt, *ss, *sss=NULL;
@@ -318,13 +318,13 @@ void draw_string(int layer, int what, const char *s, int rot, int flip, int hcen
int llength=0;
(void)what; /* UNUSED in cairo version, avoid compiler warning */
- if(s==NULL || !has_x ) return;
+ if(str==NULL || !has_x ) return;
size = xscale*52.*cairo_font_scale;
/*fprintf(errfp, "size=%.16g\n", size*xctx->mooz); */
if(size*xctx->mooz<3.0) return; /* too small */
if(size*xctx->mooz>1600) return; /* too big */
- text_bbox(s, xscale, yscale, rot, flip, hcenter, vcenter, x,y, &textx1,&texty1,&textx2,&texty2);
+ text_bbox(str, xscale, yscale, rot, flip, hcenter, vcenter, x,y, &textx1,&texty1,&textx2,&texty2);
if(!textclip(areax1,areay1,areax2,areay2,textx1,texty1,textx2,texty2)) {
return;
}
@@ -363,7 +363,7 @@ void draw_string(int layer, int what, const char *s, int rot, int flip, int hcen
cairo_set_font_size (cairo_save_ctx, size*xctx->mooz);
cairo_font_extents(cairo_ctx, &fext);
llength=0;
- my_strdup2(73, &sss, s);
+ my_strdup2(73, &sss, str);
tt=ss=sss;
for(;;) {
c=*ss;
diff --git a/src/svgdraw.c b/src/svgdraw.c
index 7bf631ca..19aa30cd 100644
--- a/src/svgdraw.c
+++ b/src/svgdraw.c
@@ -192,7 +192,7 @@ static void svg_drawarc(int gc, int fillarc, double x,double y,double r,double a
if(fillarc)
fprintf(fd,"style=\"fill:%02x%02x%02x;\" d=\"", svg_stroke.red, svg_stroke.green, svg_stroke.blue);
else
- fprintf(fd,"style=\"fill:none\" d=\"");
+ fprintf(fd,"style=\"fill:none;\" d=\"");
fprintf(fd, "M%g %g A%g %g 0 %d %d %g %g\"/>\n", xx1, yy1, rr, rr, fa, fs, xx2, yy2);
}
}
@@ -213,7 +213,11 @@ static void svg_drawline(int gc, double linex1,double liney1,double linex2,doubl
}
}
-static void svg_draw_string(int gctext, const char *str,
+/* TODO use regular svg text:
+ I qgv SVG
+ I love SVG
+ */
+static void svg_draw_string(int layer, const char *str,
int rot, int flip, int hcenter, int vcenter,
double x1,double y1,
double xscale, double yscale)
@@ -242,8 +246,7 @@ static void svg_draw_string(int gctext, const char *str,
if(cc>127) cc= '?';
if(cc=='\n')
{
- yy+=(FONTHEIGHT+FONTDESCENT+FONTWHITESPACE)*
- yscale;
+ yy+=(FONTHEIGHT+FONTDESCENT+FONTWHITESPACE)* yscale;
pos=0;
continue;
}
@@ -257,7 +260,7 @@ static void svg_draw_string(int gctext, const char *str,
ROTATION(rot, flip, x1,y1,curr_x1,curr_y1,rx1,ry1);
ROTATION(rot, flip, x1,y1,curr_x2,curr_y2,rx2,ry2);
ORDER(rx1,ry1,rx2,ry2);
- svg_drawline(gctext, rx1, ry1, rx2, ry2, 0);
+ svg_drawline(layer, rx1, ry1, rx2, ry2, 0);
}
pos++;
}