Fix Paint_Delegate.native_getRunAdvance()
Bug: 22249573 Change-Id: I29f7abe6448f439059547e1c1e310d3d651ac2d8
This commit is contained in:
@@ -1171,8 +1171,9 @@ public class Paint_Delegate {
|
||||
float[] advances = new float[count];
|
||||
native_getTextRunAdvances(nativePaint, nativeTypeface, text, start, count,
|
||||
contextStart, contextEnd - contextStart, isRtl, advances, 0);
|
||||
int startOffset = offset - start; // offset from start.
|
||||
float sum = 0;
|
||||
for (int i = 0; i < offset; i++) {
|
||||
for (int i = 0; i < startOffset; i++) {
|
||||
sum += advances[i];
|
||||
}
|
||||
return sum;
|
||||
|
||||
Reference in New Issue
Block a user