MCPcopy Create free account
hub / github.com/SpartanJ/eepp / drawBeforeLineText

Method drawBeforeLineText

src/tools/ecode/plugins/xmltools/xmltoolsplugin.cpp:354–374  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

352}
353
354void XMLToolsPlugin::drawBeforeLineText( UICodeEditor* editor, const Int64& index,
355 Vector2f /*position*/, const Float& /*fontSize*/,
356 const Float& lineHeight ) {
357 if ( !isOverMatch( &editor->getDocument(), index ) )
358 return;
359 Primitives p;
360 Color color( editor->getColorScheme().getEditorSyntaxStyle( "matching_bracket"_sst ).color );
361 Color blendedColor( Color( color, 50 ) );
362 p.setColor( blendedColor );
363
364 const ClientMatch& match = mMatches[&editor->getDocument()];
365 auto screenScroll = editor->getScreenScroll();
366 for ( const auto& range : { match.matchBracket, match.currentBracket } ) {
367 if ( range.start().line() != index || !range.inSameLine() )
368 continue;
369 auto rects =
370 editor->getTextRangeRectangles( range.normalized(), screenScroll, {}, lineHeight );
371 for ( const auto& rect : rects )
372 p.drawRectangle( rect );
373 }
374}
375
376void XMLToolsPlugin::minimapDrawAfter( UICodeEditor* editor, const DocumentLineRange& docLineRange,
377 const DocumentViewLineRange&, const Vector2f& /*linePos*/,

Callers

nothing calls this directly

Calls 7

getDocumentMethod · 0.80
getScreenScrollMethod · 0.80
normalizedMethod · 0.80
setColorMethod · 0.45
startMethod · 0.45
drawRectangleMethod · 0.45

Tested by

no test coverage detected