diff --git a/qrenc.c b/qrenc.c
index 78f1c120..52529fab 100644
--- a/qrenc.c
+++ b/qrenc.c
@@ -189,7 +189,7 @@ static int color_set(unsigned char color[4], const char *value)
{
int len = strlen(value);
int i, count;
- unsigned int col[3];
+ unsigned int col[4];
if(len == 6) {
count = sscanf(value, "%02x%02x%02x%n", &col[0], &col[1], &col[2], &len);
if(count < 3 || len != 6) {
@@ -494,24 +494,17 @@ static int writeEPS(const QRcode *qrcode, const char *outfile)
return 0;
}
-static void writeSVG_writeRect(FILE *fp, int x, int y, int width, const char* col, float opacity)
+static void writeSVG_writeRect(FILE *fp, int x, int y, int width)
{
- if(fg_color[3] != 255) {
- fprintf(fp, "\t\t\t\n",
- x, y, width, col, opacity );
- } else {
- fprintf(fp, "\t\t\t\n",
- x, y, width, col );
- }
+ fprintf(fp, "\t\t\t\n",
+ x, y, width);
}
static int writeSVG(const QRcode *qrcode, const char *outfile)
{
FILE *fp;
unsigned char *row, *p;
- int x, y, x0, pen;
+ int x, y, x0, x1, pen, abs;
int symwidth, realwidth;
float scale;
char fg[7], bg[7];
@@ -547,25 +540,69 @@ static int writeSVG(const QRcode *qrcode, const char *outfile)
QRcode_APIVersionString() );
/* SVG code start */
- fprintf( fp, "