Open SergeySlice opened 6 years ago
There is a potencial issue in nsvg__getLocalBounds() When matrix contains negative transform like transform="matrix(0.6453 0.7639 0.7639 -0.6453 79.8232 84.2069)" then these compare will be wrong
bounds[0] = nsvg__minf(bounds[0], curveBounds[0]);
bounds[1] = nsvg__minf(bounds[1], curveBounds[1]);
bounds[2] = nsvg__maxf(bounds[2], curveBounds[2]);
bounds[3] = nsvg__maxf(bounds[3], curveBounds[3]);
because curveBounds[3] < curveBounds[1] So this comparison must be extended to both limits bounds[0] = nsvgminf(bounds[0], curveBounds[2]); bounds[2] = nsvgmaxf(bounds[2], curveBounds[0]); and so on...
The svg is follow
It is not fit into his bounds. I scaled it to real bounds instead of viewBox because it can be part of scene.![2018-09-11 19 13 44](https://user-images.githubusercontent.com/485515/45373634-98826780-b5f8-11e8-81da-05305013b6a5.png)