=== modified file 'src/extension/internal/wmf-inout.cpp' --- src/extension/internal/wmf-inout.cpp 2016-11-05 21:29:03 +0000 +++ src/extension/internal/wmf-inout.cpp 2017-02-17 01:59:51 +0000 @@ -1765,11 +1765,20 @@ << " test0 " << ( d->mask & U_DRAW_VISIBLE) << " test1 " << ( d->mask & U_DRAW_FORCE) << " test2 " << (wmr_mask & U_DRAW_ALTERS) + << " test2.5 " << ((d->mask & U_DRAW_NOFILL) != (wmr_mask & U_DRAW_NOFILL) ) << " test3 " << (wmr_mask & U_DRAW_VISIBLE) << " test4 " << !(d->mask & U_DRAW_ONLYTO) << " test5 " << ((d->mask & U_DRAW_ONLYTO) && !(wmr_mask & U_DRAW_ONLYTO) ) << std::endl; */ + /* spurious moveto records should not affect the drawing. However, they set the NOFILL + bit and that messes up the logic about when to emit a path. So prune out any + stray moveto records. That is those which were never followed by a lineto. + */ + if((d->mask & U_DRAW_NOFILL) && !(d->mask & U_DRAW_VISIBLE) && + !(wmr_mask & U_DRAW_ONLYTO) && (wmr_mask & U_DRAW_VISIBLE)){ + d->mask ^= U_DRAW_NOFILL; + } if( (wmr_mask != U_WMR_INVALID) && // next record is valid type @@ -1777,6 +1786,7 @@ ( (d->mask & U_DRAW_FORCE) || // This draw is forced by STROKE/FILL/STROKEANDFILL PATH (wmr_mask & U_DRAW_ALTERS) || // Next record would alter the drawing environment in some way + ((d->mask & U_DRAW_NOFILL) != (wmr_mask & U_DRAW_NOFILL)) || // Fill<->!Fill requires a draw between ( (wmr_mask & U_DRAW_VISIBLE) && // Next record is visible... ( ( !(d->mask & U_DRAW_ONLYTO) ) || // Non *TO records cannot be followed by any Visible