浏览代码

Fix line height issue.

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

14
Runtime/ui/txt/paragraph.cs


float _alphabeticBaseline;
float _ideographicBaseline;
float[] _lineHeights;
int _lineCount;
List<PaintRecord> _paintRecords = new List<PaintRecord>();
List<CodeUnitRun> _codeUnitRuns = new List<CodeUnitRun>();
bool _didExceedMaxLines;

const float kFloatDecorationSpacing = 3.0f;
public float height {
get { return this._lineHeights?.last() ?? 0; }
get {
if (this._lineHeights == null) {
return 0;
}
return this._lineHeights[this.getLineCount() - 1];
}
}
public float minIntrinsicWidth {

}
}
this._lineCount = lineLimit;
this._maxIntrinsicWidth = 0;
float lineBlockWidth = 0;
for (int i = 0; i < this._lineWidths.Count; ++i) {

}
int yIndex;
for (yIndex = 0; yIndex < this._lineHeights.Length - 1; ++yIndex) {
for (yIndex = 0; yIndex < this.getLineCount() - 1; ++yIndex) {
if (dy < this._lineHeights[yIndex]) {
break;
}

}
public int getLineCount() {
return this._lineHeights?.Length ?? 0;
return this._lineCount;
}
void _computeLineBreak() {

正在加载...
取消
保存