mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-21 14:25:14 +00:00
Improve coordinate system calculations for font-size, letter-spacing etc.
Fix parsing of transform to account for single parameter scale and translate correctly. Fix skewX, had opposite of intended effect. https://www.w3.org/TR/SVG/coords.html https://www.w3.org/TR/SVG2/coords.html https://www.w3.org/TR/SVGTiny12/coords.html https://www.w3.org/TR/SVG/coords.html#TransformAttribute https://www.w3.org/TR/SVG/coords.html#SkewXDefined
This commit is contained in:
@@ -215,7 +215,7 @@ export default class Matrix2D {
|
||||
// TODO: can this be combined into a single append operation?
|
||||
skewX *= DEG_TO_RAD;
|
||||
skewY *= DEG_TO_RAD;
|
||||
this.append(Math.cos(skewY), Math.sin(skewY), -Math.sin(skewX), Math.cos(skewX), x, y);
|
||||
this.append(Math.cos(skewY), Math.sin(skewY), Math.sin(skewX), Math.cos(skewX), x, y);
|
||||
this.append(cos * scaleX, sin * scaleX, -sin * scaleY, cos * scaleY, 0, 0);
|
||||
} else {
|
||||
this.append(cos * scaleX, sin * scaleX, -sin * scaleY, cos * scaleY, x, y);
|
||||
|
||||
Reference in New Issue
Block a user