
Tried this in inkscape using a test document with a nonzero background color
SPNamedView *nv=SP_NAMEDVIEW(style->object); std::cout << "nv defined? " << (nv ? "yes" : "no") << std::endl; uint32_t bgc = nv->pagecolor; std::cout << "doc background color:" << std::hex << bgc << std::endl;
but it emitted:
nv defined? yes doc background color:0
So that doesn't work. It sets nv to something, but not something actually linked to the document's pagecolor.
How to go about this?
This is needed for some cases in the EMF driver gradient handling. Default Inkscape gradients tend to be like: FF000000 -> FF0000FF. That won't work in an EMF file because these only use RGB, resulting in a R->R gradient, which is not at all useful. As a compromise I wanted to use the background color in place of the transparent stop, or I guess just black if the background color is itself fully transparent.
Thanks,
David Mathog mathog@...1176... Manager, Sequence Analysis Facility, Biology Division, Caltech