| 3908 | } |
| 3909 | |
| 3910 | void UICodeEditor::drawMatchingBrackets( const Vector2f& startScroll, const Float& lineHeight ) { |
| 3911 | if ( mMatchingBrackets.isValid() ) { |
| 3912 | Primitives primitive; |
| 3913 | primitive.setForceDraw( false ); |
| 3914 | primitive.setColor( Color( mMatchingBracketColor ).blendAlpha( mAlpha ) ); |
| 3915 | auto drawBracket = [&]( const TextPosition& pos ) { |
| 3916 | auto info = mDocView.getVisibleLineRange( pos ); |
| 3917 | if ( !info.range.isValid() ) |
| 3918 | return; |
| 3919 | auto offset = getTextPositionOffset( pos, lineHeight ); |
| 3920 | primitive.drawRectangle( |
| 3921 | Rectf( Vector2f( startScroll.x + offset.x, startScroll.y + offset.y ), |
| 3922 | Sizef( getGlyphWidth(), lineHeight ) ) ); |
| 3923 | }; |
| 3924 | drawBracket( mMatchingBrackets.start() ); |
| 3925 | drawBracket( mMatchingBrackets.end() ); |
| 3926 | primitive.setForceDraw( true ); |
| 3927 | } |
| 3928 | } |
| 3929 | |
| 3930 | void UICodeEditor::drawSelectionMatch( const DocumentLineRange& lineRange, |
| 3931 | const Vector2f& startScroll, const Float& lineHeight, |
nothing calls this directly
no test coverage detected