Convert svgtiny colours to BGR ordering when passing them to plotter APIs.

svn path=/trunk/netsurf/; revision=4784
This commit is contained in:
John Mark Bell 2008-07-28 23:26:54 +00:00
parent 28f45754d5
commit 430ac1db21

View File

@ -104,13 +104,15 @@ bool svg_redraw(struct content *c, int x, int y,
transform[4] = x;
transform[5] = y;
#define BGR(c) ((c) == svgtiny_TRANSPARENT ? TRANSPARENT : ((svgtiny_RED((c))) | (svgtiny_GREEN((c)) << 8) | (svgtiny_BLUE((c)) << 16)))
for (unsigned int i = 0; i != diagram->shape_count; i++) {
if (diagram->shape[i].path) {
ok = plot.path(diagram->shape[i].path,
diagram->shape[i].path_length,
diagram->shape[i].fill,
BGR(diagram->shape[i].fill),
diagram->shape[i].stroke_width,
diagram->shape[i].stroke,
BGR(diagram->shape[i].stroke),
transform);
if (!ok)
return false;
@ -130,6 +132,8 @@ bool svg_redraw(struct content *c, int x, int y,
}
}
#undef BGR
return true;
}