Exemplo n.º 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;
        }
Exemplo n.º 2
0
 private void LayoutPlain(ITextMeasure measure, float maxWidth)
 {
     this.width = maxWidth;
     this.height = measure.CalcHeight(value, maxWidth);
 }
Exemplo n.º 3
0
 private void LayoutPlain(ITextMeasure measure, float maxWidth)
 {
     this.width  = maxWidth;
     this.height = measure.CalcHeight(value, maxWidth);
 }
Exemplo n.º 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;
        }