diff options
| author | mathog <> | 2015-02-09 20:58:45 +0000 |
|---|---|---|
| committer | mathog <> | 2015-02-09 20:58:45 +0000 |
| commit | 3f2f43974a62918269b0d464a8f15b8be7d8069a (patch) | |
| tree | 8d27bcfbc5bcf5aa08a43ae5f994fdba5d573361 /src/extension/internal/wmf-inout.cpp | |
| parent | fix for bug 1405292 (diff) | |
| download | inkscape-3f2f43974a62918269b0d464a8f15b8be7d8069a.tar.gz inkscape-3f2f43974a62918269b0d464a8f15b8be7d8069a.zip | |
fix for bug 1419926
(bzr r13914)
Diffstat (limited to 'src/extension/internal/wmf-inout.cpp')
| -rw-r--r-- | src/extension/internal/wmf-inout.cpp | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/src/extension/internal/wmf-inout.cpp b/src/extension/internal/wmf-inout.cpp index 2b0e00084..bffe06695 100644 --- a/src/extension/internal/wmf-inout.cpp +++ b/src/extension/internal/wmf-inout.cpp @@ -1308,6 +1308,9 @@ void Wmf::common_dib_to_image(PWMF_CALLBACK_DATA d, const char *dib, int dibparams = U_BI_UNKNOWN; // type of image not yet determined tmp_image << "\n\t <image\n"; + if (d->dc[d->level].clip_id){ + tmp_image << "\tclip-path=\"url(#clipEmfPath" << d->dc[d->level].clip_id << ")\"\n"; + } tmp_image << " y=\"" << dy << "\"\n x=\"" << dx <<"\"\n "; MEMPNG mempng; // PNG in memory comes back in this @@ -1405,6 +1408,9 @@ void Wmf::common_bm16_to_image(PWMF_CALLBACK_DATA d, U_BITMAP16 Bm16, const char SVGOStringStream tmp_image; tmp_image << "\n\t <image\n"; + if (d->dc[d->level].clip_id){ + tmp_image << "\tclip-path=\"url(#clipEmfPath" << d->dc[d->level].clip_id << ")\"\n"; + } tmp_image << " y=\"" << dy << "\"\n x=\"" << dx <<"\"\n "; MEMPNG mempng; // PNG in memory comes back in this @@ -1752,13 +1758,15 @@ std::cout << "BEFORE DRAW" ) ){ // std::cout << "PATH DRAW at TOP <<+++++++++++++++++++++++++++++++++++++" << std::endl; - d->outsvg += " <path "; // this is the ONLY place <path should be used!!!! - output_style(d); - d->outsvg += "\n\t"; - d->outsvg += "\n\td=\""; // this is the ONLY place d=" should be used!!!! - d->outsvg += d->path; - d->outsvg += " \" /> \n"; - d->path = ""; //reset the path + if(!(d->path.empty())){ + d->outsvg += " <path "; // this is the ONLY place <path should be used!!!! + output_style(d); + d->outsvg += "\n\t"; + d->outsvg += "\n\td=\""; // this is the ONLY place d=" should be used!!!! + d->outsvg += d->path; + d->outsvg += " \" /> \n"; + d->path = ""; //reset the path + } // reset the flags d->mask = 0; d->drawtype = 0; @@ -2600,9 +2608,9 @@ std::cout << "BEFORE DRAW" if(status==-1){ // change of escapement, emit what we have and reset TR_layout_analyze(d->tri); if (d->dc[d->level].clip_id){ - SVGOStringStream tmp_clip; - tmp_clip << "\n<g\n\tclip-path=\"url(#clipWmfPath" << d->dc[d->level].clip_id << ")\"\n>"; - d->outsvg += tmp_clip.str().c_str(); + SVGOStringStream tmp_clip; + tmp_clip << "\n<g\n\tclip-path=\"url(#clipWmfPath" << d->dc[d->level].clip_id << ")\"\n>"; + d->outsvg += tmp_clip.str().c_str(); } TR_layout_2_svg(d->tri); ts << d->tri->out; @@ -2610,7 +2618,7 @@ std::cout << "BEFORE DRAW" d->tri = trinfo_clear(d->tri); (void) trinfo_load_textrec(d->tri, &tsp, tsp.ori,TR_EMFBOT); // ignore return status, it must work if (d->dc[d->level].clip_id){ - d->outsvg += "\n</g>\n"; + d->outsvg += "\n</g>\n"; } } |
