예제 #1
0
        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;
        }
예제 #2
0
 private void LayoutPlain(ITextMeasure measure, float maxWidth)
 {
     this.width = maxWidth;
     this.height = measure.CalcHeight(value, maxWidth);
 }
예제 #3
0
 private void LayoutPlain(ITextMeasure measure, float maxWidth)
 {
     this.width  = maxWidth;
     this.height = measure.CalcHeight(value, maxWidth);
 }
예제 #4
0
        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;
        }