translate then scale - fixes #98

This commit is contained in:
steve
2016-08-03 21:57:05 +01:00
parent 5482a667ca
commit c287b92862
@@ -159,8 +159,11 @@ public class RNSVGViewBoxShadowNode extends RNSVGGroupShadowNode {
}
mMatrix.postScale(scaleX, scaleY);
// The transform applied to content contained by the element is given by
// translate(translate-x, translate-y) scale(scale-x, scale-y).
mMatrix.postTranslate(-translateX * (mFromSymbol ? scaleX : 1), -translateY * (mFromSymbol ? scaleY : 1));
mMatrix.postScale(scaleX, scaleY);
super.draw(canvas, paint, opacity);
}