Use mFontSize instead of getFontSize()

This commit is contained in:
Mikael Sand
2017-07-23 03:30:10 +03:00
parent d8afd7770f
commit 5b78c93c40
2 changed files with 9 additions and 9 deletions
@@ -285,9 +285,9 @@ class GlyphContext {
@Nullable ReadableMap font, @Nullable ReadableMap font,
@Nullable ReadableArray x, @Nullable ReadableArray x,
@Nullable ReadableArray y, @Nullable ReadableArray y,
@Nullable ReadableArray rotate,
@Nullable ReadableArray deltaX, @Nullable ReadableArray deltaX,
@Nullable ReadableArray deltaY @Nullable ReadableArray deltaY,
@Nullable ReadableArray rotate
) { ) {
if (reset) { if (reset) {
this.reset(); this.reset();
@@ -437,8 +437,8 @@ class GlyphContext {
if (nextIndex < mXs.length) { if (nextIndex < mXs.length) {
mDX = 0; mDX = 0;
mXIndex = nextIndex; mXIndex = nextIndex;
String val = mXs[nextIndex]; String string = mXs[nextIndex];
mX = PropHelper.fromRelativeToFloat(val, mWidth, 0, mScale, getFontSize()); mX = PropHelper.fromRelativeToFloat(string, mWidth, 0, mScale, mFontSize);
} }
mX += glyphWidth; mX += glyphWidth;
@@ -453,8 +453,8 @@ class GlyphContext {
if (nextIndex < mYs.length) { if (nextIndex < mYs.length) {
mDY = 0; mDY = 0;
mYIndex = nextIndex; mYIndex = nextIndex;
String val = mYs[nextIndex]; String string = mYs[nextIndex];
mY = PropHelper.fromRelativeToFloat(val, mHeight, 0, mScale, getFontSize()); mY = PropHelper.fromRelativeToFloat(string, mHeight, 0, mScale, mFontSize);
} }
return mY; return mY;
@@ -467,7 +467,7 @@ class GlyphContext {
if (nextIndex < mDXs.length) { if (nextIndex < mDXs.length) {
mDXIndex = nextIndex; mDXIndex = nextIndex;
String string = mDXs[nextIndex]; String string = mDXs[nextIndex];
float val = PropHelper.fromRelativeToFloat(string, mWidth, 0, 1, getFontSize()); float val = PropHelper.fromRelativeToFloat(string, mWidth, 0, 1, mFontSize);
mDX += val * mScale; mDX += val * mScale;
} }
@@ -481,7 +481,7 @@ class GlyphContext {
if (nextIndex < mDYs.length) { if (nextIndex < mDYs.length) {
mDYIndex = nextIndex; mDYIndex = nextIndex;
String string = mDYs[nextIndex]; String string = mDYs[nextIndex];
float val = PropHelper.fromRelativeToFloat(string, mHeight, 0, 1, getFontSize()); float val = PropHelper.fromRelativeToFloat(string, mHeight, 0, 1, mFontSize);
mDY += val * mScale; mDY += val * mScale;
} }
@@ -178,6 +178,6 @@ class TextShadowNode extends GroupShadowNode {
@Override @Override
void pushGlyphContext() { void pushGlyphContext() {
boolean isTextNode = !(this instanceof TextPathShadowNode) && !(this instanceof TSpanShadowNode); boolean isTextNode = !(this instanceof TextPathShadowNode) && !(this instanceof TSpanShadowNode);
getTextRootGlyphContext().pushContext(isTextNode, this, mFont, mPositionX, mPositionY, mRotate, mDeltaX, mDeltaY); getTextRootGlyphContext().pushContext(isTextNode, this, mFont, mPositionX, mPositionY, mDeltaX, mDeltaY, mRotate);
} }
} }