mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-03 23:16:13 +00:00
Fix translate and rotate regressions.
This commit is contained in:
@@ -298,11 +298,9 @@ class GlyphContext {
|
||||
mRIndices.set(index, rotationIndex + 1);
|
||||
}
|
||||
|
||||
int nextIndex = mRIndex + 1;
|
||||
if (nextIndex < mRs.length) {
|
||||
mRIndex = nextIndex;
|
||||
mr = mRs[nextIndex];
|
||||
}
|
||||
mRIndex = Math.min(mRIndex + 1, mRs.length - 1);
|
||||
|
||||
mr = mRs[mRIndex];
|
||||
|
||||
return mr;
|
||||
}
|
||||
|
||||
@@ -187,7 +187,6 @@ class TSpanShadowNode extends TextShadowNode {
|
||||
matrix = new Matrix();
|
||||
|
||||
float xSum = offset + x + dx - width;
|
||||
float ySum = y + dy;
|
||||
|
||||
if (textPath != null) {
|
||||
float halfway = width / 2;
|
||||
@@ -202,11 +201,11 @@ class TSpanShadowNode extends TextShadowNode {
|
||||
assert pm != null;
|
||||
pm.getMatrix(midpoint, matrix, POSITION_MATRIX_FLAG | TANGENT_MATRIX_FLAG);
|
||||
|
||||
matrix.preTranslate(-halfway, 0);
|
||||
matrix.preTranslate(-halfway, dy);
|
||||
matrix.preScale(renderMethodScaling, renderMethodScaling);
|
||||
matrix.postTranslate(0, ySum);
|
||||
matrix.postTranslate(0, y);
|
||||
} else {
|
||||
matrix.setTranslate(xSum, ySum);
|
||||
matrix.setTranslate(xSum, y + dy);
|
||||
}
|
||||
|
||||
matrix.preRotate(r);
|
||||
|
||||
Reference in New Issue
Block a user