浏览代码

Remove _doLayout.

/main
Yuncong Zhang 5 年前
当前提交
2ce85e15
共有 2 个文件被更改,包括 3 次插入7 次删除
  1. 7
      Runtime/ui/txt/layout.cs
  2. 3
      Runtime/ui/txt/paragraph.cs

7
Runtime/ui/txt/layout.cs


}
}
public static float doLayout(float offset, string text, int start, int count, float[] advances, float[] positions, TextStyle style, TabStops tabStops, out UnityEngine.Rect bounds) {
return _doLayout(offset, text, start, count, style, advances, positions, 0,
tabStops, out bounds);
}
static float _doLayout(float offset, string text, int start, int count, TextStyle style,
public static float doLayout(float offset, string text, int start, int count, TextStyle style,
float[] advances, float[] positions, int advanceOffset, TabStops tabStops, out UnityEngine.Rect bounds) {
float advance = 0;
Font font = FontManager.instance.getOrCreate(style.fontFamily, style.fontWeight, style.fontStyle).font;

3
Runtime/ui/txt/paragraph.cs


if (positions == null || positions.Length < textCount) {
positions = new float[textCount];
}
float advance = Layout.doLayout(runXOffset, text, textStart, textCount, advances, positions, run.style, this._tabStops, out var bounds);
float advance = Layout.doLayout(runXOffset, text, textStart, textCount, run.style, advances, positions,
0, this._tabStops, out var bounds);
builder.allocRunPos(run.style, text, textStart, textCount);
// bounds relative to first character

正在加载...
取消
保存