Fix slowdown when calculating outline of too many shapes
The original idea was to optimize-out inverted transformation. To achieve
that all outlines were grouped into a polygon and then invert-transformed.
But it seem that for big vector images (300+ shapes) aggregating this
polygon is a really expensive operation. Therefore, this patch just
does transformations for every shape separately.