private void LayoutException(ITextMeasure measure, StackTraceLine[] stackLines, float maxWidth) { float nextX = 0.0f; float totalHeight = measure.CalcHeight(value, maxWidth); if (stackLines != null) { for (int i = 0; i < stackLines.Length; ++i) { float lineHeight = measure.CalcHeight(stackLines[i].line, maxWidth); stackLines[i].frame = new Rect(nextX, totalHeight, maxWidth, lineHeight); if (stackLines[i].sourcePathStart != -1) { GUIStyleTextMeasure styleMeasure = measure as GUIStyleTextMeasure; if (styleMeasure != null) { ResolveSourceLink(styleMeasure, ref stackLines[i]); } } totalHeight += lineHeight; } } this.width = maxWidth; this.height = totalHeight; }
private void LayoutPlain(ITextMeasure measure, float maxWidth) { this.width = maxWidth; this.height = measure.CalcHeight(value, maxWidth); }
private void LayoutPlain(ITextMeasure measure, float maxWidth) { this.width = maxWidth; this.height = measure.CalcHeight(value, maxWidth); }
private void LayoutException(ITextMeasure measure, StackTraceLine[] stackLines, float maxWidth) { float nextX = 0.0f; float totalHeight = measure.CalcHeight(value, maxWidth); if (stackLines != null) { for (int i = 0; i < stackLines.Length; ++i) { float lineHeight = measure.CalcHeight(stackLines[i].line, maxWidth); stackLines[i].frame = new Rect(nextX, totalHeight, maxWidth, lineHeight); if (stackLines[i].sourcePathStart != -1) { GUIStyleTextMeasure styleMeasure = measure as GUIStyleTextMeasure; if (styleMeasure != null) { ResolveSourceLink(styleMeasure, ref stackLines[i]); } } totalHeight += lineHeight; } } this.width = maxWidth; this.height = totalHeight; }