summaryrefslogtreecommitdiff
path: root/src/svg
diff options
context:
space:
mode:
Diffstat (limited to 'src/svg')
-rw-r--r--src/svg/cdsvg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/svg/cdsvg.c b/src/svg/cdsvg.c
index 677a91f..a1fdf8e 100644
--- a/src/svg/cdsvg.c
+++ b/src/svg/cdsvg.c
@@ -1196,7 +1196,7 @@ static void set_opacity_attrib(cdCtxCanvas *ctxcanvas, char* data)
static char* get_opacity_attrib(cdCtxCanvas *ctxcanvas)
{
static char data[50];
- sprintf(data, "%d", ctxcanvas->opacity);
+ sprintf(data, "%d", cdRound(ctxcanvas->opacity*255.0));
return data;
}
@@ -1209,7 +1209,7 @@ static cdAttribute opacity_attrib =
static void set_cmd_attrib(cdCtxCanvas *ctxcanvas, char* data)
{
- fprintf(ctxcanvas->file, data);
+ fprintf(ctxcanvas->file, "%s", data);
}
static cdAttribute cmd_attrib =