SVG Parser and transforms from matrix


#1

There seems to be a problem in the new SVG parser related to the stroke width and transforms in the matrix notation. I have an SVG file with the following transform:   transform="matrix(-1,0,0,1,128,0)"

The getScaleFactor() in the AffineTransform class then returns (mat00 + mat11) / 2.0f as scale factor - in this case zero. The scale factor is used to scale the stroke width, so the image disappears. Using  (abs(mat00) + abs(mat11)) / 2.0f instead seems to solve the issue. Does that have any side effects, Jules?


#2

Yes, good point.. that would probably make more sense when dealing with negative transforms, thanks!