
Hi all,
I'm trying to get clipping on text read in from EMF to work properly and r13463 (and maybe earlier) is doing something odd in that it is treating path and text coordinates differently, but ONLY when it reads the SVG "hot off the press" from the EMF read. If the exact same SVG is first emitted to a file and then read in directly, it works fine. Here is one such file(retrieve only directory):
http://saf.bio.caltech.edu/pub/pickup/mangle_clip.svg
that has the clipping more or less right when viewed in Firefox and when opened in Inkscape. But when the source EMF file is read directly, the coordinates of the <text> pieces are transformed and a <transform> tag is added to the <text>, the coordinates of the <path> draw are not transformed. Since both reference the same clipping path, this breaks clipping for text, because the coordinates of the clip-path must match up with those of the <text> IN the <text>, not AFTER it. If the text were not being clipped, the transform would not make a difference (but it is, so it does).
The link above is the output of the following code fragment:
(void) myEnhMetaFileProc(contents,length, &d); free(contents);
if (d.pDesc){ free( d.pDesc ); }
std::cout << std::endl << d.outsvg << std::endl;
SPDocument *doc = SPDocument::createNewDocFromMem(d.outsvg.c_str(), strlen(d.outsvg.c_str()), TRUE);
And things go wrong when the SVG as text in memory goes through createNewDocFromMem but not when the SVG as text in a file goes through whatever path the usual SVG file open uses.
Does this issue sound familiar to anyone, and if so, what is the workaround?
Thanks,
David Mathog mathog@...1176... Manager, Sequence Analysis Facility, Biology Division, Caltech