public LineTransform GetLineTransform()

in src/SyntacticFisheye/SyntacticFisheyeLineTransformSource.cs [82:115]


        public LineTransform GetLineTransform(ITextViewLine line, double yPosition, ViewRelativePosition placement)
        {
            if ((!(_compressBlankLines || _compressSimpleLines)) ||
                (line.Length > 100) || (line.End > line.Start.GetContainingLine().End) ||
                (!line.IsFirstTextViewLineForSnapshotLine) || (!line.IsLastTextViewLineForSnapshotLine))
            {
                return s_defaultTransform;   //Long or wrapped lines -- even if they don't contain interesting characters -- get the default transform to avoid the cost of checking the entire line.
            }

            bool allWhiteSpace = true;
            for (int i = line.Start; (i < line.End); ++i)
            {
                char c = line.Snapshot[i];
                if (char.IsLetterOrDigit(c))
                {
                    return s_defaultTransform;
                }
                else if (_compressBlankLines && _compressSimpleLines)
                {
                    //intentional no-op
                }
                else if (!char.IsWhiteSpace(c))
                {
                    if (!_compressSimpleLines)
                    {
                        return s_defaultTransform;
                    }

                    allWhiteSpace = false;
                }
            }

            return (allWhiteSpace && !_compressBlankLines) ? s_defaultTransform : s_simpleTransform;
        }